From 7af6b8356cefbe434fa03a0a8e1151eaeacbc4ad Mon Sep 17 00:00:00 2001 From: bojovyletoun <> Date: Thu, 8 Dec 2022 13:34:30 +0100 Subject: [PATCH] =?UTF-8?q?Pou=C5=BEit=C3=AD=20addColumnLink=20pro=20bu?= =?UTF-8?q?=C5=88ky=20s=20odkazem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminModule/Components/GroupsGridControl.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/AdminModule/Components/GroupsGridControl.php b/app/AdminModule/Components/GroupsGridControl.php index c3e793afa..9222a5171 100644 --- a/app/AdminModule/Components/GroupsGridControl.php +++ b/app/AdminModule/Components/GroupsGridControl.php @@ -88,12 +88,8 @@ public function createComponentPatrolsGrid(string $name): DataGrid $grid->addColumnText('variableSymbol', 'VS ',"variableSymbolText")->setSortable() // je stejný jako název skupiny ->setFilterText(); - $grid->addColumnText('leader', 'Vedoucí')->setSortable() - ->setRenderer(function (Troop $t) { - $leader = $t->getLeader(); - - return Html::el('a')->setAttribute('href', $this->getPresenter()->link('detail', $leader->getId()))->setText($leader->getDisplayName()); - }) + $grid->addColumnLink('leader', 'Vedoucí', ":detail", "leader.displayName" ,["id"=>"leader.id"])->setSortable() +// return Html::el('a')->setAttribute('href', $this->getPresenter()->link('detail', $leader->getId()))->setText($leader->getDisplayName()); ->setFilterText(); $grid->addColumnDateTime('applicationDate', 'Datum založení')