2014-03-08 19:49:57 +01:00
|
|
|
<?php
|
2015-03-16 17:38:07 +01:00
|
|
|
|
|
|
|
// add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201
|
|
|
|
$newTabInfo = sprintf('<span class="info-box display-on-hover"> %s </span>', $this->translate('opens in new window'));
|
|
|
|
|
2015-05-28 14:58:16 +02:00
|
|
|
$links = $object->getActionUrls();
|
2015-05-28 10:47:44 +02:00
|
|
|
foreach ($links as $i => $link) {
|
2015-05-28 14:58:16 +02:00
|
|
|
$links[$i] = sprintf('<a href="%s" target="_blank">%s ' . $newTabInfo . '</a>', $link, 'Action');
|
2014-03-08 19:49:57 +01:00
|
|
|
}
|
|
|
|
|
2015-05-18 11:45:39 +02:00
|
|
|
if (isset($this->actions)) {
|
|
|
|
foreach ($this->actions as $id => $action) {
|
2015-05-28 10:47:44 +02:00
|
|
|
$links[] = sprintf('<a href="%s">%s</a>', $action, $id);
|
2015-01-14 11:02:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-14 11:50:03 +01:00
|
|
|
if (empty($links)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-03-08 19:49:57 +01:00
|
|
|
?>
|
|
|
|
<tr>
|
2015-01-14 11:50:03 +01:00
|
|
|
<th><?= $this->translate('Actions') ?></th>
|
2015-05-28 15:31:50 +02:00
|
|
|
<td><?= implode("<br>", $links) ?></td>
|
2014-03-08 19:49:57 +01:00
|
|
|
</tr>
|