Merge pull request #16175 from nicolas-eoxia/12_fix_missing_hook
fix: add missing hook addMoreActionsButtons in viewcat.php
This commit is contained in:
commit
d8c262691b
@ -269,16 +269,19 @@ dol_fiche_end();
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
print "<div class='tabsAction'>\n";
|
print "<div class='tabsAction'>\n";
|
||||||
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
if (empty($reshook)) {
|
||||||
|
if ($user->rights->categorie->creer)
|
||||||
|
{
|
||||||
|
$socid = ($object->socid ? "&socid=".$object->socid : "");
|
||||||
|
print "<a class='butAction' href='edit.php?id=".$object->id.$socid."&type=".$type."'>".$langs->trans("Modify")."</a>";
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->categorie->creer)
|
if ($user->rights->categorie->supprimer)
|
||||||
{
|
{
|
||||||
$socid = ($object->socid ? "&socid=".$object->socid : "");
|
print "<a class='butActionDelete' href='".DOL_URL_ROOT."/categories/viewcat.php?action=delete&id=".$object->id."&type=".$type."'>".$langs->trans("Delete")."</a>";
|
||||||
print "<a class='butAction' href='edit.php?id=".$object->id.$socid."&type=".$type."'>".$langs->trans("Modify")."</a>";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->categorie->supprimer)
|
|
||||||
{
|
|
||||||
print "<a class='butActionDelete' href='".DOL_URL_ROOT."/categories/viewcat.php?action=delete&id=".$object->id."&type=".$type."'>".$langs->trans("Delete")."</a>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user