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 (
|
<![CDATA[$GLOBALS['LSobjects']['[nom du type d'LSobject]']['customActions'] = array (
|
||||||
'action1' => array(
|
'action1' => array(
|
||||||
'label' => '[label l'action]',
|
'label' => '[label l'action]',
|
||||||
|
'hideLabel' => '[booléen]',
|
||||||
'icon' => '[nom de l'icône de l'action]',
|
'icon' => '[nom de l'icône de l'action]',
|
||||||
'function' => '[fonction à exécuter]',
|
'function' => '[fonction à exécuter]',
|
||||||
'question_format' => '[LSformat de la question de confirmation]',
|
'question_format' => '[LSformat de la question de confirmation]',
|
||||||
|
@ -30,7 +31,14 @@
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>label</term>
|
<term>label</term>
|
||||||
<listitem>
|
<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>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<ul class='LSview-actions'>
|
<ul class='LSview-actions'>
|
||||||
{foreach from=$LSview_actions item=item}
|
{foreach from=$LSview_actions item=item}
|
||||||
{if is_array($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}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -69,6 +69,7 @@ if(LSsession :: startLSsession()) {
|
||||||
if (LSsession :: canExecuteCustomAction($dn,$LSobject,$name)) {
|
if (LSsession :: canExecuteCustomAction($dn,$LSobject,$name)) {
|
||||||
$LSview_actions[] = array (
|
$LSview_actions[] = array (
|
||||||
'label' => ((isset($config['label']))?__($config['label']):__($name)),
|
'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,
|
'url' => 'custom_action.php?LSobject='.$LSobject.'&dn='.urlencode($dn).'&customAction='.$name,
|
||||||
'action' => ((isset($config['icon']))?$config['icon']:'generate'),
|
'action' => ((isset($config['icon']))?$config['icon']:'generate'),
|
||||||
'class' => 'LScustomActions'.(($config['noConfirmation'])?' LScustomActions_noConfirmation':'')
|
'class' => 'LScustomActions'.(($config['noConfirmation'])?' LScustomActions_noConfirmation':'')
|
||||||
|
|
Loading…
Reference in a new issue