Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and few new features (insert, delete) #92

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
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