Missing addMoreActionsButtons hook
This commit is contained in:
parent
520facd55e
commit
8a63298102
@ -484,55 +484,60 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
if ($action != 'edit')
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||||
|
// modified by hook
|
||||||
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
/*
|
if ($action != 'edit')
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
// Modify
|
|
||||||
if ($user->rights->projet->creer)
|
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&withproject='.$withproject.'">'.$langs->trans('Modify').'</a>';
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
|
// Modify
|
||||||
|
if ($user->rights->projet->creer)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&withproject='.$withproject.'">'.$langs->trans('Modify').'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Modify').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete
|
||||||
|
if ($user->rights->projet->supprimer && ! $object->hasChildren())
|
||||||
|
{
|
||||||
|
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&withproject='.$withproject.'">'.$langs->trans('Delete').'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Delete').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<table width="100%"><tr><td width="50%" valign="top">';
|
||||||
|
print '<a name="builddoc"></a>'; // ancre
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Documents generes
|
||||||
|
*/
|
||||||
|
$filename=dol_sanitizeFileName($projectstatic->ref). "/". dol_sanitizeFileName($object->ref);
|
||||||
|
$filedir=$conf->projet->dir_output . "/" . dol_sanitizeFileName($projectstatic->ref). "/" .dol_sanitizeFileName($object->ref);
|
||||||
|
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||||
|
$genallowed=($user->rights->projet->lire);
|
||||||
|
$delallowed=($user->rights->projet->creer);
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
$somethingshown=$formfile->show_documents('project_task',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print '</td></tr></table>';
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Modify').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete
|
|
||||||
if ($user->rights->projet->supprimer && ! $object->hasChildren())
|
|
||||||
{
|
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&withproject='.$withproject.'">'.$langs->trans('Delete').'</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Delete').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td width="50%" valign="top">';
|
|
||||||
print '<a name="builddoc"></a>'; // ancre
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Documents generes
|
|
||||||
*/
|
|
||||||
$filename=dol_sanitizeFileName($projectstatic->ref). "/". dol_sanitizeFileName($object->ref);
|
|
||||||
$filedir=$conf->projet->dir_output . "/" . dol_sanitizeFileName($projectstatic->ref). "/" .dol_sanitizeFileName($object->ref);
|
|
||||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
|
||||||
$genallowed=($user->rights->projet->lire);
|
|
||||||
$delallowed=($user->rights->projet->creer);
|
|
||||||
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
$somethingshown=$formfile->show_documents('project_task',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '</td></tr></table>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user