TemplatesTable: link hosts to "edit" as long as...

...usage is missing
This commit is contained in:
Thomas Gelf 2017-07-05 07:16:37 +02:00
parent 9e044c558e
commit 1a7a83e28b
1 changed files with 10 additions and 3 deletions

View File

@ -48,9 +48,16 @@ class TemplatesTable extends ZfQueryBasedTable
)
];
$url = Url::fromPath("director/${type}template/usage", [
'name' => $row->object_name
]);
// TODO: remove this once we have host template usage
if ($type === 'host') {
$url = Url::fromPath("director/host", [
'name' => $row->object_name
]);
} else {
$url = Url::fromPath("director/${type}template/usage", [
'name' => $row->object_name
]);
}
return $this::tr([
$this::td(new Link($caption, $url)),