Skip to content

Commit

Permalink
update for late 3
Browse files Browse the repository at this point in the history
  • Loading branch information
stepapo committed May 27, 2022
1 parent 3f80c29 commit 3cd9e09
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"nette/application": "^3.1",
"nette/neon": "^3.0",
"nette/utils": "^3.1",
"nextras/orm": ">=4.0"
"nextras/orm": "^4.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions src/UI/DatasetControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Stepapo\Dataset\UI;

use Latte\Engine;
use Latte\Essential\RawPhpExtension;
use Nette\Application\UI\Template;
use Nette\Localization\Translator;
use Nextras\Orm\Entity\IEntity;
Expand Down Expand Up @@ -36,6 +38,9 @@ protected function createTemplate(): Template
$template->setTranslator($this->getTranslator());
$template->addFilter('intlDate', [Filters::class, 'intlDate']);
$template->addFilter('plural', [Filters::class, 'plural']);
if (version_compare(Engine::VERSION, '3', '>=')) {
$template->getLatte()->addExtension(new RawPhpExtension);
}
return $template;
}

Expand Down
2 changes: 1 addition & 1 deletion src/UI/FilterList/list.latte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div n:snippet>
{foreach $columns as $column}
{if $column->filter && !$column->filter->hide}
{control filter-$column->name}
{control 'filter-' . $column->name}
{/}
{/}
</div>

0 comments on commit 3cd9e09

Please sign in to comment.