dolibarr 23.0.3
card-view-actions-buttons.tpl.php
1<!-- file card-view-actions-buttons.tpl.php -->
2<?php
3/* Copyright (C) 2025 Open-Dsi <support@open-dsi.fr>
4 */
5// Protection to avoid direct call of template
6if (empty($context) || !is_object($context)) {
7 print "Error, template page can't be called as URL";
8 exit(1);
9}
10'@phan-var-force Context $context';
11'@phan-var-force AbstractCardController $this';
12
21$formCard = $this->formCard;
22
23$url = $context->getControllerUrl($context->controller). '&id=' . $formCard->object->id;
24
25?>
26
27<?php if ($formCard->action != 'presend' && $formCard->action != 'editline') { ?>
28<div id="actions_buttons">
29 <?php
30 $parameters = array();
31 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $context);
32 if ($reshook < 0) {
33 $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
34 } elseif (empty($reshook)) {
35 // Edit card
36 if ($formCard->permissiontoadd) { ?>
37 <a href="<?php print $url . "&action=edit" ?>" role="button"><?php print $langs->trans('Modify') ?></a>
38 <?php }
39 }
40 ?>
41</div>
42<?php } ?>
$context
@method int call_trigger(string $triggerName, ?User $user)
Definition logout.php:42