fix: [meta-template-direcotry:index] Pass baseurl to the anonymous function

pull/151/head
Sami Mokaddem 2023-03-23 14:29:22 +01:00
parent 8e2718a0ae
commit 768bbcb996
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ echo $this->element('genericElements/IndexTable/index_table', [
'sort' => 'meta_template.id',
'data_path' => 'meta_template.id',
'element' => 'function',
'function' => function($row, $viewContext) {
'function' => function($row, $viewContext) use ($baseurl) {
return $viewContext->Bootstrap->node('a', [
'href' => h($baseurl . '/metaTemplates/view/' . $row->meta_template->id ?? ''),
], !empty($row->meta_template->name) ? (sprintf('%s (v%s)', h($row->meta_template->name), h($row->meta_template->version))) :'');