mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
Add helpInfo parameter for customActions
This commit is contained in:
parent
e76a25b22b
commit
002e83e1ab
4 changed files with 12 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
||||||
'action1' => array(
|
'action1' => array(
|
||||||
'label' => '[label l'action]',
|
'label' => '[label l'action]',
|
||||||
'hideLabel' => '[booléen]',
|
'hideLabel' => '[booléen]',
|
||||||
|
'helpInfo' => '[label d'aide]',
|
||||||
'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]',
|
||||||
|
@ -42,6 +43,13 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>helpInfo</term>
|
||||||
|
<listitem>
|
||||||
|
<simpara>Le label du message d'aide qui sera affiché au survole du bouton de l'action.</simpara>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>icon</term>
|
<term>icon</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -131,6 +131,7 @@ if (loadDir(LS_OBJECTS_DIR) && loadDir(LS_LOCAL_DIR.LS_OBJECTS_DIR)) {
|
||||||
if (is_array($conf['customActions'])) {
|
if (is_array($conf['customActions'])) {
|
||||||
foreach($conf['customActions'] as $act) {
|
foreach($conf['customActions'] as $act) {
|
||||||
add($act['label']);
|
add($act['label']);
|
||||||
|
add($act['helpInfo']);
|
||||||
add($act['question_format']);
|
add($act['question_format']);
|
||||||
add($act['onSuccessMsgFormat']);
|
add($act['onSuccessMsgFormat']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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="{img name=$item.action}" alt="{$item.label}" title="{$item.label}" />{if !isset($item.hideLabel) || !$item.hideLabel} {$item.label}{/if}</a></li>
|
<li class='LSview-actions'><a href="{$item.url}" class="LSview-actions{if $item.class} {$item.class|escape:"quotes"}{/if}{if $item.helpInfo || ($item.hideLabel && $item.label)} LStips{/if}" {if $item.helpInfo || ($item.hideLabel && $item.label)}title="{if $item.helpInfo}{$item.helpInfo|escape:"quotes"}{else}{$item.label|escape:"quotes"}{/if}"{/if}><img src="{img name=$item.action}" alt="{$item.label|escape:"quotes"}" title="{$item.label|escape:"quotes"}" />{if !isset($item.hideLabel) || !$item.hideLabel} {$item.label}{/if}</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -70,6 +70,7 @@ if(LSsession :: startLSsession()) {
|
||||||
$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),
|
'hideLabel' => ((isset($config['hideLabel']))?$config['hideLabel']:False),
|
||||||
|
'helpInfo' => ((isset($config['helpInfo']))?__($config['helpInfo']):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':'')
|
||||||
|
@ -167,6 +168,7 @@ if(LSsession :: startLSsession()) {
|
||||||
$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),
|
'hideLabel' => ((isset($config['hideLabel']))?$config['hideLabel']:False),
|
||||||
|
'helpInfo' => ((isset($config['helpInfo']))?__($config['helpInfo']):False),
|
||||||
'url' => 'custom_search_action.php?LSobject='.$LSobject.'&customAction='.$name,
|
'url' => 'custom_search_action.php?LSobject='.$LSobject.'&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