Skip to content

Commit

Permalink
DataGrid.latte: record passed strictly as $recordVariable everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
uestla committed Mar 19, 2017
1 parent a933850 commit 6539cd0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/TwiGrid/DataGrid.latte
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@

{foreach $dataLoader() as $record}
{include #body-row,
record => $record,
$recordVariable => $record,
primaryString => ($primaryString = ($record |primaryToString)),
isInlineEdited => $hasInlineEdit && $iePrimary === $primaryString
}
Expand All @@ -368,7 +368,7 @@

<tr n:class="$isInlineEdited ? success">
{include #body-row-cells,
record => $record,
$recordVariable => $$recordVariable,
primaryString => ($primaryString = ($record |primaryToString)),
isInlineEdited => $hasInlineEdit && $iePrimary === $primaryString
}
Expand All @@ -388,7 +388,7 @@
{foreach $columns as $name => $column}
{var $params = [
column => $name,
$recordVariable => $record,
$recordVariable => $$recordVariable,
isInlineEdited => $isInlineEdited,
]}

Expand All @@ -412,9 +412,9 @@

{if $hasFilters || $hasRowActions || $hasInlineEdit}
{include #body-cell-row-actions,
record => $record,
primaryString => $primaryString,
isInlineEdited => $isInlineEdited
isInlineEdited => $isInlineEdited,
$recordVariable => $$recordVariable
}
{/if}

Expand Down Expand Up @@ -442,10 +442,10 @@
</td>

{elseifset #body-cell-$column}
{include #"body-cell-$column", column => $column, record => $record}
{include #"body-cell-$column", column => $column, $recordVariable => $$recordVariable}

{else}
{include #body-cell, column => $column, record => $record}
{include #body-cell, column => $column, $recordVariable => $$recordVariable}
{/ifset}

{/define}
Expand Down

0 comments on commit 6539cd0

Please sign in to comment.