Skip to content

Commit

Permalink
Použití addColumnLink pro buňky s odkazem
Browse files Browse the repository at this point in the history
  • Loading branch information
bojovyletoun committed Dec 8, 2022
1 parent c41bf1c commit 7af6b83
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/AdminModule/Components/GroupsGridControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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í')
Expand Down

0 comments on commit 7af6b83

Please sign in to comment.