components/actions: show links if available
Now we show links regardless of whether we have host actions, there might be hook-provided links only. Renamed "Foreign URLs" to "Actions" and made it translatable.
This commit is contained in:
parent
3038de5ad0
commit
b4c47c51e7
|
@ -1,9 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (! $object->action_url && ! $object->notes_url) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$links = array();
|
$links = array();
|
||||||
$linkText = '<a href="%s" target="_blank">%s</a>';
|
$linkText = '<a href="%s" target="_blank">%s</a>';
|
||||||
$localLinkText = '<a href="%s">%s</a>';
|
$localLinkText = '<a href="%s">%s</a>';
|
||||||
|
@ -39,8 +35,12 @@ if (isset($this->hostActions)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($links)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Foreign URLs</th>
|
<th><?= $this->translate('Actions') ?></th>
|
||||||
<td><?= implode("\n ", $links) . "\n" ?></td>
|
<td><?= implode("\n ", $links) . "\n" ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue