contributte / datagrid

:muscle: DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc
https://contributte.org/packages/contributte/datagrid/
MIT License
285 stars 189 forks source link

Latte\CompileException in paginator when Latte is in strict mode #1100

Closed Libig closed 1 month ago

Libig commented 9 months ago
[ERROR]      ./src/Components/DatagridPaginator/templates/data_grid_paginator.latte:12:2    
Unexpected '{else}', expecting </a> for element started on line 11 at column 3 (on line 12 at column 2)
chemix commented 1 month ago

I can prepare pull request with this fix, are you ok with that @f3l1x

    {capture $firstButton}
        <i n:block = "icon-arrow-left" class="{$iconPrefix}arrow-left"></i> {='ublaboo_datagrid.previous'|translate}
    {/capture}

    {if $paginator->isFirst()}
        <a class="first btn btn-sm {$btnSecondaryClass} disabled">{$firstButton}</a>
    {else}
        <a class="btn btn-sm {$btnSecondaryClass} ajax" href="{$link('page!', ['page' => $paginator->page - 1])}" rel="prev">{$firstButton}</a>
    {/if}
chemix commented 1 month ago

there is link to original file : https://github.com/contributte/datagrid/blob/master/src/Components/DatagridPaginator/templates/data_grid_paginator.latte