Skip to content
Extraits de code Groupes Projets
Valider 2fbfbf76 rédigé par Timo Besenreuther's avatar Timo Besenreuther
Parcourir les fichiers

refs #3813 another data table improvement: refactor data table header to a separate template

 * removes code duplication (we already had a minor inconsistent bug fix - shame on us!)
 * show the sorted column and report documentation after using the search box

@Stefan: the issues I reported are fixed now

@Everyone: this is turning into a general data table improvement ticket
parent 72c2839e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -16,24 +16,9 @@
{else}
<a name="{$properties.uniqueId}"></a>
<table cellspacing="0" class="dataTable">
<thead>
<tr>
{foreach from=$dataTableColumns item=column name=head}
<th class="sortable {if $smarty.foreach.head.first}first{elseif $smarty.foreach.head.last}last{/if}" id="{$column}">
{if !empty($columnDocumentation[$column])}
<div class="columnDocumentation">
<div class="columnDocumentationTitle">
{$columnTranslations[$column]|escape:'html'|replace:"&amp;nbsp;":"&nbsp;"}
</div>
{$columnDocumentation[$column]|escape:'html'}
</div>
{/if}
<div id="thDIV">{$columnTranslations[$column]|escape:'html'|replace:"&amp;nbsp;":"&nbsp;"}</div>
</th>
{/foreach}
</tr>
</thead>
{include file="CoreHome/templates/datatable_head.tpl"}
<tbody>
{foreach from=$arrayDataTable item=row}
<tr {if $row.idsubdatatable && $javascriptVariablesToSet.controllerActionCalledWhenRequestSubTable != null}class="subDataTable"
......
......@@ -11,23 +11,8 @@
<div class="pk-emptyDataTable">{'CoreHome_ThereIsNoDataForThisReport'|translate}</div>
{else}
<table cellspacing="0" class="dataTable dataTableActions">
<thead>
<tr>
{foreach from=$dataTableColumns item=column name=head}
<th class="sortable {if $smarty.foreach.head.first}first{elseif $smarty.foreach.head.last}last{/if}" id="{$column}">
{if !empty($columnDocumentation[$column])}
<div class="columnDocumentation">
<div class="columnDocumentationTitle">
{$columnTranslations[$column]|escape:'html'|replace:"&amp;nbsp;":"&nbsp;"}
</div>
{$columnDocumentation[$column]|escape:'html'}
</div>
{/if}
<div id="thDIV">{$columnTranslations[$column]|escape:'html'}</div>
</th>
{/foreach}
</tr>
</thead>
{include file="CoreHome/templates/datatable_head.tpl"}
<tbody>
{foreach from=$arrayDataTable item=row}
......
......@@ -7,14 +7,9 @@
<div class="pk-emptyDataTable">{'CoreHome_ThereIsNoDataForThisReport'|translate}</div>
{else}
<table cellspacing="0" class="dataTable dataTableActions">
<thead>
<tr>
{foreach from=$dataTableColumns item=column}
<th class="sortable" id="{$column}">{$columnTranslations[$column]|escape:'html'}</th>
{/foreach}
</tr>
</thead>
{include file="CoreHome/templates/datatable_head.tpl"}
<tbody>
{foreach from=$arrayDataTable item=row}
<tr {if $row.idsubdatatable}class="level{$row.level} rowToProcess subActionsDataTable" id="{$row.idsubdatatable}"
......
<thead>
<tr>
{foreach from=$dataTableColumns item=column name=head}
<th class="sortable {if $smarty.foreach.head.first}first{elseif $smarty.foreach.head.last}last{/if}" id="{$column}">
{if !empty($columnDocumentation[$column])}
<div class="columnDocumentation">
<div class="columnDocumentationTitle">
{$columnTranslations[$column]|escape:'html'|replace:"&amp;nbsp;":"&nbsp;"}
</div>
{$columnDocumentation[$column]|escape:'html'}
</div>
{/if}
<div id="thDIV">{$columnTranslations[$column]|escape:'html'|replace:"&amp;nbsp;":"&nbsp;"}</div>
</th>
{/foreach}
</tr>
</thead>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter