mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
CustomActions : Added hideLabel feature
This commit is contained in:
parent
f77741d23c
commit
296e646967
3 changed files with 11 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
<![CDATA[$GLOBALS['LSobjects']['[nom du type d'LSobject]']['customActions'] = array (
|
||||
'action1' => 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 @@
|
|||
<varlistentry>
|
||||
<term>label</term>
|
||||
<listitem>
|
||||
<simpara>Le label de la relation.</simpara>
|
||||
<simpara>Le label de l'action.</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>hideLabel</term>
|
||||
<listitem>
|
||||
<simpara>Cache le label dans le bouton de l'action.</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<ul class='LSview-actions'>
|
||||
{foreach from=$LSview_actions item=item}
|
||||
{if is_array($item)}
|
||||
<li class='LSview-actions'><a href='{$item.url}' class='LSview-actions{if $item.class} {$item.class}{/if}' ><img src='{$LS_IMAGES_DIR}/{$item.action}.png' alt='{$item.label}' title='{$item.label}' /> {$item.label}</a></li>
|
||||
<li class='LSview-actions'><a href='{$item.url}' class='LSview-actions{if $item.class} {$item.class}{/if}' ><img src='{$LS_IMAGES_DIR}/{$item.action}.png' alt='{$item.label}' title='{$item.label}' />{if !isset($item.hideLabel) || !$item.hideLabel} {$item.label}{/if}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
|
|
@ -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':'')
|
||||
|
|
Loading…
Reference in a new issue