Object custom action question view: add some LSview actions links

This commit is contained in:
Benjamin Renard 2020-06-04 16:35:54 +02:00
parent 6f612199a0
commit 6f3edba986

View file

@ -1254,6 +1254,24 @@ function handle_LSobject_customAction($request) {
LStemplate :: assign('validation_url', "object/$LSobject/".urlencode($dn)."/customAction/".urlencode($customAction)."?valid");
LStemplate :: assign('validation_label', _('Validate'));
// List user available actions for this LSobject
$LSview_actions = array(
array(
'label' => _('View'),
'url' => "object/$LSobject/".urlencode($dn),
'action' => 'view'
),
);
if (LSsession :: canEdit($LSobject, $dn)) {
$LSview_actions[] = array(
'label' => _('Modify'),
'url' => "object/$LSobject/".urlencode($dn)."/modify",
'action' => 'modify'
);
}
LStemplate :: assign('LSview_actions',$LSview_actions);
// Set & display template
LSsession :: setTemplate('question.tpl');
LSsession :: displayTemplate();