0
0
Fork 0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2025-02-21 12:46:09 +00:00

buildSelectedObjectsSpan(): moving hardcoded template into smarty template.

This commit is contained in:
Daniel Samson 2016-07-05 13:15:58 +01:00
parent 6b27a556e3
commit b9d990f7fc
2 changed files with 13 additions and 1 deletions

View file

@ -406,7 +406,15 @@ class ListViewDisplay {
global $app_strings;
$displayStyle = $total > 0 ? "" : "display: none;";
$selectedObjectSpan = "<span style='$displayStyle' id='selectedRecordsTop'>{$app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}<input style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' id='selectCountTop' readonly name='selectCount[]' value='{$total}' /></span>";
$template = new Sugar_Smarty();
$displayStyle = $total > 0 ? "" : "display: none;";
$selectedObjectSpan = "";
$template->assign('DISPLAY_STYLE', $displayStyle);
$template->assign('APP', $app_strings);
$template->assign('TOTAL_ITEMS_SELECTED', $total);
$selectedObjectSpan = $template->fetch('include/ListView/ListViewSelectObjects.tpl');
return $selectedObjectSpan;
}

View file

@ -0,0 +1,4 @@
<span style='{$DISPLAY_STYLE}' id='selectedRecordsTop'>
{$APP.LBL_LISTVIEW_SELECTED_OBJECTS}
<input style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' id='selectCountTop' type='text' id='selectCountTop' readonly name='selectCount[]' value='{$TOTAL_ITEMS_SELECTED}' />
</span>