From 4983d46dd7e99a583a62c0b9266c5bccdd00747b Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 7 Sep 2015 09:53:53 +0200 Subject: [PATCH] actions.phtml: Use the new Navigation to load and render action urls refs #5600 --- .../scripts/show/components/actions.phtml | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/actions.phtml b/modules/monitoring/application/views/scripts/show/components/actions.phtml index 329a06fb9..9e228887d 100644 --- a/modules/monitoring/application/views/scripts/show/components/actions.phtml +++ b/modules/monitoring/application/views/scripts/show/components/actions.phtml @@ -1,25 +1,34 @@ %s ', $this->translate('opens in new window')); -$links = $object->getActionUrls(); -foreach ($links as $i => $link) { - $links[$i] = sprintf('%s ' . $newTabInfo . '', $link, 'Action'); +foreach ($object->getActionUrls() as $i => $link) { + $navigation->addItem( + 'Action ' . ($i + 1) . $newTabInfo, + array( + 'url' => $link, + 'target' => '_blank' + ) + ); } if (isset($this->actions)) { foreach ($this->actions as $id => $action) { - $links[] = sprintf('%s', $action, $id); + $navigation->addItem($id, array('url' => $action)); } } -if (empty($links)) { +if ($navigation->isEmpty()) { return; } ?> - translate('Actions') ?> - ", $links) ?> - + translate('Actions'); ?> + getRenderer()->setElementTag('td'); ?> + \ No newline at end of file