From 296e64696712f6174096b6e85d94ac0f20683d80 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 4 Oct 2012 14:49:30 +0200 Subject: [PATCH] CustomActions : Added hideLabel feature --- doc/conf/LSobject/customActions.docbook | 10 +++++++++- public_html/templates/default/view.tpl | 2 +- public_html/view.php | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/conf/LSobject/customActions.docbook b/doc/conf/LSobject/customActions.docbook index 0e33ebe7..6370a073 100644 --- a/doc/conf/LSobject/customActions.docbook +++ b/doc/conf/LSobject/customActions.docbook @@ -8,6 +8,7 @@ array( 'label' => '[label l'action]', + 'hideLabel' => '[booléen]', 'icon' => '[nom de l'icône de l'action]', 'function' => '[fonction à exécuter]', 'question_format' => '[LSformat de la question de confirmation]', @@ -30,7 +31,14 @@ label - Le label de la relation. + Le label de l'action. + + + + + hideLabel + + Cache le label dans le bouton de l'action. diff --git a/public_html/templates/default/view.tpl b/public_html/templates/default/view.tpl index b73dc626..4d314a41 100644 --- a/public_html/templates/default/view.tpl +++ b/public_html/templates/default/view.tpl @@ -4,7 +4,7 @@ diff --git a/public_html/view.php b/public_html/view.php index 46dcfc2e..259c0191 100644 --- a/public_html/view.php +++ b/public_html/view.php @@ -69,6 +69,7 @@ if(LSsession :: startLSsession()) { if (LSsession :: canExecuteCustomAction($dn,$LSobject,$name)) { $LSview_actions[] = array ( 'label' => ((isset($config['label']))?__($config['label']):__($name)), + 'hideLabel' => ((isset($config['hideLabel']))?$config['hideLabel']:False), 'url' => 'custom_action.php?LSobject='.$LSobject.'&dn='.urlencode($dn).'&customAction='.$name, 'action' => ((isset($config['icon']))?$config['icon']:'generate'), 'class' => 'LScustomActions'.(($config['noConfirmation'])?' LScustomActions_noConfirmation':'')