Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Datagrid.blocks.latte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
{/if}
{/define}

{define row-head-cell}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document this.

{$column->label}
{/define}

{define row-head-columns}
<tr class="grid-columns">
{ifset $form[actions]}
Expand All @@ -28,7 +32,7 @@
{foreach $columns as $column}
<th class="grid-col-{$column->name}">
{if $column->canSort()}
<a href="{link sort! orderColumn => $column->name, orderType => $column->getNewState()}" class="ajax">{$column->label}</a>
<a href="{link sort! orderColumn => $column->name, orderType => $column->getNewState()}" class="ajax">{include #row-head-cell column => $column}</a>
{if $column->isAsc()}
<span class="grid-sort-symbol grid-sort-symbol-asc"><em>&#9650;</em></span>
{elseif $column->isDesc()}
Expand All @@ -37,7 +41,7 @@
<span class="grid-sort-symbol grid-sort-symbol-no"></span>
{/if}
{else}
{$column->label}
{include #row-head-cell column => $column}
{/if}
</th>
{/foreach}
Expand Down