Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (63 sloc) 1.84 KB
* This file is part of the Nextras community extensions of Nette Framework
* @license MIT
* @link
<div class="grid" data-grid-name="{$control->getUniqueId()}">
{snippet rows}
{var $_templates = []}
{foreach $cellsTemplates as $cellsTemplate}
$_template = $this->createTemplate($cellsTemplate, $this->params, "includeblock");
$_templates[] = $_template;
{form form class => 'ajax'}
$hasActionsColumn =
(bool) $control->getEditFormFactory() /* we may render only one row so the form[filter] may not be created */
|| isset($this->blockQueue["row-actions"]);
$hasGlobalActionsColumn = isset($form['actions']);
foreach ($_templates as $_template):
$_template->params['hasActionsColumn'] = $hasActionsColumn;
$_template->params['hasGlobalActionsColumn'] = $hasGlobalActionsColumn;
$this->params['hasActionsColumn'] = $hasActionsColumn;
$this->params['hasGlobalActionsColumn'] = $hasGlobalActionsColumn;
{include #table-open-tag}
{include #row-head-columns}
{ifset $form['filter']}
{include #row-head-filter}
{if count($data)}
{foreach $data as $row}
{var $primary = $control->getter($row, $rowPrimaryKey)}
{var $rowId = $this->global->snippetDriver->getHtmlId("rows-$primary")}
{include #row row => $row, rowId => $rowId}
{ifset #empty-result}{include #empty-result}{/ifset}
<tfoot n:if="isset($paginator) || $hasGlobalActionsColumn">
<th colspan="{=count($columns) + $hasGlobalActionsColumn + $hasActionsColumn}">
{if $hasGlobalActionsColumn}
{include #global-actions}
{ifset $paginator}
{include #pagination}
{include #table-close-tag}
You can’t perform that action at this time.