Skip to content

Commit

Permalink
Fixed table rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
o5 committed Jul 26, 2013
1 parent 2a66412 commit 72ad021
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Grido/Grid.latte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

{var $columnCount = count($control[Grido\Components\Columns\Column::ID]->getComponents())}
{var $columnCount = $control->hasOperations() ? $columnCount + 1 : $columnCount}
{var $showActionsColumn = $control->filterRenderType == Grido\Components\Filters\Filter::RENDER_INNER || $control->hasActions()}
{var $showActionsColumn = $control->hasActions() || ($control->hasFilters() && $control->filterRenderType == Grido\Components\Filters\Filter::RENDER_INNER)}

{if $control->filterRenderType == Grido\Components\Filters\Filter::RENDER_OUTER}
<div n:block="outerFilter" class="grido filter outer">
Expand Down Expand Up @@ -67,7 +67,7 @@
{_'Actions'}
</th>
</tr>
<tr n:if="$control->filterRenderType == Grido\Components\Filters\Filter::RENDER_INNER" class="filter inner">
<tr n:if="$control->filterRenderType == Grido\Components\Filters\Filter::RENDER_INNER && $control->hasFilters()" class="filter inner">
{foreach $control[Grido\Components\Columns\Column::ID]->getComponents() as $column}
{if $column->hasFilter()}
{!$control->getFilter($column->getName())->getWrapperPrototype()->startTag()}
Expand Down Expand Up @@ -152,10 +152,14 @@
{/if}
{!$column->getCellPrototype()->endTag()}
{/foreach}
<td n:if="$control->hasActions()" class="actions center">
{foreach $control[\Grido\Components\Actions\Action::ID]->getComponents() as $action}
{control $action $row}
{/foreach}
<td n:if="$showActionsColumn" class="actions center">
{if $control->hasActions()}
{foreach $control[\Grido\Components\Actions\Action::ID]->getComponents() as $action}
{control $action $row}
{/foreach}
{else}
&nbsp;
{/if}
</td>
{!$tr->endTag()}
{/foreach}
Expand Down

0 comments on commit 72ad021

Please sign in to comment.