dolibarr 24.0.0-beta
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
25if ($formCard->action != 'presend' && $formCard->action != 'editline') { ?>
26<div id="actions_buttons"><?php
27 $parameters = array();
28 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $context);
29if ($reshook < 0) {
30 $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
31} elseif (empty($reshook)) {
32 // Edit card
33 if ($formCard->permissiontoadd) { ?>
34 <a href="<?php print $url . "&action=edit" ?>" role="button"><?php print $langs->trans('Modify') ?></a>
35 <?php }
36}
37?></div>
38<?php }
$context
@method int call_trigger(string $triggerName, ?User $user)
Definition logout.php:42