mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSview actions: factorize templates in LSview_actions.tpl and improve responsive view
This commit is contained in:
parent
c221bbffdb
commit
9848e3d30e
8 changed files with 52 additions and 69 deletions
|
@ -13,6 +13,9 @@ ul.LSform_layout_active {
|
|||
margin: 1em;
|
||||
margin-bottom: 0;
|
||||
clear: both;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
li.LSform_layout a {
|
||||
|
@ -32,7 +35,7 @@ li.LSform_layout_active {
|
|||
border-radius: 3px 3px 0px 0px;
|
||||
padding: 4px;
|
||||
display: inline;
|
||||
margin-right: 1px;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
|
||||
li.LSform_layout_current {
|
||||
|
@ -56,7 +59,7 @@ div.LSform_layout {
|
|||
|
||||
div.LSform_layout_active {
|
||||
display: none;
|
||||
margin-top: 4px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.LSform_layout_current {
|
||||
|
@ -171,6 +174,10 @@ p.LSform_listAvailableDataEntryForm {
|
|||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
dl.LSform {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
dt.LSform {
|
||||
width: 34vw;
|
||||
}
|
||||
|
|
|
@ -308,6 +308,10 @@ li.LSview-actions {
|
|||
margin-right: 0.1rem;
|
||||
}
|
||||
|
||||
li.LSview-actions-hidden-label a span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
*******************
|
||||
* question
|
||||
|
@ -518,6 +522,10 @@ input[type='submit'].LSview_search {
|
|||
margin-top: 22px;
|
||||
border-top: 1px solid #0072b8;
|
||||
}
|
||||
|
||||
ul.LSview-actions-dropdown li.LSview-actions-hidden-label a span {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
|
|
28
src/templates/default/LSview_actions.tpl
Normal file
28
src/templates/default/LSview_actions.tpl
Normal file
|
@ -0,0 +1,28 @@
|
|||
{if isset($LSview_actions) && is_array($LSview_actions) && !empty($LSview_actions)}
|
||||
<ul class='LSview-actions'>
|
||||
{foreach from=$LSview_actions item=item}
|
||||
{if is_array($item)}
|
||||
<li class='LSview-actions{if isset($item['hideLabel']) && $item.hideLabel} LSview-actions-hidden-label{/if}'>
|
||||
<a
|
||||
href='{$item.url}'
|
||||
class='
|
||||
LSview-actions
|
||||
{if isset($item['class'])}{$item.class|escape:"quotes"}{/if}
|
||||
{if isset($item['helpInfo']) || (isset($item['hideLabel']) && $item.hideLabel && isset($item.label) && $item.label)} LStips{/if}
|
||||
'
|
||||
{if isset($item['helpInfo']) || (isset($item['hideLabel']) && $item.hideLabel && isset($item.label) && $item.label)}title='{if $item.helpInfo}{$item.helpInfo|escape:"htmlall"}{else}{$item.label|escape:"htmlall"}{/if}'{/if}
|
||||
{if isset($item['id']) && $item.id}id='{$item.id|escape:"quotes"}'{/if}
|
||||
{if isset($item['data']) && is_array($item['data']) && !empty($item['data'])}
|
||||
{foreach $item['data'] as $data_key => $data_value}
|
||||
data-{$data_key}='{$data_value|escape:'htmlall'}'
|
||||
{/foreach}
|
||||
{/if}
|
||||
>
|
||||
<img src="{img name=$item.action}" alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' />
|
||||
<span>{$item.label}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
|
@ -8,15 +8,7 @@
|
|||
|
||||
<h1>{tr msg="Global search"}</h1>
|
||||
|
||||
{if $LSview_actions != ''}
|
||||
<ul class='LSview-actions LSview_search'>
|
||||
{foreach from=$LSview_actions item=item}
|
||||
{if is_array($item)}
|
||||
<li class='LSview-actions'><a href='{$item.url}' class='LSview-actions'><img src='{img name=$item.action}' alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' /> {$item.label|escape:"htmlall"}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{include file='ls:LSview_actions.tpl'}
|
||||
|
||||
{foreach from=$pages item=page}
|
||||
{$page}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{extends file='ls:base_connected.tpl'}
|
||||
{block name="content"}
|
||||
{if $pagetitle != ''}<h1 id='LSform_title'>{$pagetitle|escape:"htmlall"}</h1>{/if}
|
||||
{if $LSview_actions != ''}
|
||||
<ul class='LSview-actions'>
|
||||
{foreach from=$LSview_actions item=item}
|
||||
<li class='LSview-actions'><a href='{$item.url}' class='LSview-actions'><img src='{img name=$item.action}' alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' /> {$item.label|escape:"htmlall"}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{include file='ls:LSview_actions.tpl'}
|
||||
|
||||
{include file='ls:LSform.tpl'}
|
||||
{/block}
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
{extends file='ls:base_connected.tpl'}
|
||||
{block name="content"}
|
||||
{if $pagetitle != ''}<h1>{$pagetitle|escape:"htmlall"}</h1>{/if}
|
||||
{if $LSview_actions != ''}
|
||||
<p class='LSview-actions'>
|
||||
{foreach from=$LSview_actions item=item}
|
||||
<a href='{$item.url}' class='LSview-actions'><img src='{img name=$item.action}' alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' /></a>
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
{include file='ls:LSview_actions.tpl'}
|
||||
|
||||
<p class='question'>{$question}</p>
|
||||
<a href='{$validation_url}' class='question'>{$validation_label|escape:"htmlall"}</a>
|
||||
|
|
|
@ -1,28 +1,8 @@
|
|||
{extends file='ls:base_connected.tpl'}
|
||||
{block name="content"}
|
||||
{if $pagetitle != ''}<h1 id='LSview_title'>{$pagetitle|escape:"htmlall"}</h1>{/if}
|
||||
{if $LSview_actions != ''}
|
||||
<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 isset($item['class'])}{$item.class|escape:"quotes"}{/if}
|
||||
{if isset($item['helpInfo']) || (isset($item['hideLabel']) && $item.hideLabel && isset($item.label) && $item.label)} LStips{/if}
|
||||
'
|
||||
{if isset($item['helpInfo']) || (isset($item['hideLabel']) && $item.hideLabel && isset($item.label) && $item.label)}title='{if $item.helpInfo}{$item.helpInfo|escape:"htmlall"}{else}{$item.label|escape:"htmlall"}{/if}'{/if}
|
||||
>
|
||||
<img src="{img name=$item.action}" alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' />
|
||||
{if !isset($item.hideLabel) || !$item.hideLabel} {$item.label}{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{include file='ls:LSview_actions.tpl'}
|
||||
|
||||
{include file='ls:LSform_view.tpl'}
|
||||
|
||||
|
|
|
@ -19,28 +19,7 @@
|
|||
{$pagetitle|escape:"htmlall"}
|
||||
</h1>
|
||||
|
||||
{if $LSview_actions != ''}
|
||||
<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 isset($item['class'])}{$item.class|escape:"quotes"}{/if}
|
||||
{if isset($item['helpInfo']) || (isset($item['hideLabel']) && $item.hideLabel && isset($item.label) && $item.label)} LStips{/if}
|
||||
'
|
||||
{if isset($item['helpInfo']) || (isset($item['hideLabel']) && $item.hideLabel && isset($item.label) && $item.label)}title='{if $item.helpInfo}{$item.helpInfo|escape:"htmlall"}{else}{$item.label|escape:"htmlall"}{/if}'{/if}
|
||||
>
|
||||
<img src="{img name=$item.action}" alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' />
|
||||
{if !isset($item.hideLabel) || !$item.hideLabel} {$item.label}{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{include file='ls:LSview_actions.tpl'}
|
||||
|
||||
{if count($LSsearch->predefinedFilters) != 0}
|
||||
<select id='LSview_search_predefinedFilter' name='predefinedFilter'>
|
||||
|
|
Loading…
Reference in a new issue