LSsearch : add cssStyle extraDisplayedColumns's parameter

This commit is contained in:
Benjamin Renard 2015-08-12 14:26:50 +02:00
parent 3f350d331c
commit 24aa3412a7
2 changed files with 13 additions and 2 deletions

View file

@ -52,6 +52,7 @@ configuration des &LSobjects;, dans la variable <varname>LSsearch</varname>
'[LSformat 2]' '[LSformat 2]'
), ),
'formaterLSformat' => '[LSformat]', 'formaterLSformat' => '[LSformat]',
'cssStyle' => '[CSS style]',
) )
), ),
'customActions' => array ( 'customActions' => array (
@ -282,6 +283,16 @@ contexte dans lequel cette recherche est effectuée.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>cssStyle</term>
<listitem>
<simpara>Ce paramètre permet de définir un style CSS personnalisé pour la colonne.
S'il est défini, le contenu de ce paramètre sera ajouté en tant qu'attribut <literal>
style</literal> des balises <literal>th</literal> et <literal>td</literal> de la
colone.</simpara>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</listitem> </listitem>
</varlistentry> </varlistentry>

View file

@ -72,7 +72,7 @@
{/if} {/if}
{if $LSsearch->extraDisplayedColumns} {if $LSsearch->extraDisplayedColumns}
{foreach from=$LSsearch->extraDisplayedColumns item=conf key=cid} {foreach from=$LSsearch->extraDisplayedColumns item=conf key=cid}
<th class='LSobject-list'> <th class='LSobject-list'{if $conf.cssStyle} style="{$conf.cssStyle}"{/if}>
{if $LSsearch->sort} {if $LSsearch->sort}
<a href='view.php?LSobject={$LSsearch->LSobject}&amp;sortBy={$cid}&amp;nocache={$smarty.now}'> <a href='view.php?LSobject={$LSsearch->LSobject}&amp;sortBy={$cid}&amp;nocache={$smarty.now}'>
{if $LSsearch->sortBy == $cid} {if $LSsearch->sortBy == $cid}
@ -96,7 +96,7 @@
{if $LSsearch->displaySubDn}<td class='LSobject-list'>{$object->subDn}</td>{/if} {if $LSsearch->displaySubDn}<td class='LSobject-list'>{$object->subDn}</td>{/if}
{if $LSsearch->extraDisplayedColumns} {if $LSsearch->extraDisplayedColumns}
{foreach from=$LSsearch->extraDisplayedColumns item=conf key=cid} {foreach from=$LSsearch->extraDisplayedColumns item=conf key=cid}
<td class='LSobject-list'>{$object->$cid}</th> <td class='LSobject-list'{if $conf.cssStyle} style="{$conf.cssStyle}"{/if}>{$object->$cid}</td>
{/foreach} {/foreach}
{/if} {/if}
<td class='LSobject-list LSobject-list-actions'> <td class='LSobject-list LSobject-list-actions'>