467b3df7e34c4306ff9a14356e34521f40993c6c
[ldapsaisie.git] / public_html / templates / default / viewSearch.tpl
1 {include file='top.tpl'}
2 <form action='{$searchForm.action}' method='post' class='LSview_search'>
3   
4   {foreach from=$searchForm.hiddenFields item=value key=name}
5     <input type='hidden' name='{$name}' value='{$value}' />
6   {/foreach}
7   
8   <input type='text' name='pattern' class='LSview_search' value="{$searchForm.values.pattern}"/>
9   <input type='submit' value='{$searchForm.labels.submit}' name='{$searchForm.names.submit}' class='LSview_search' />
10   <p id='LSview_search_param'>
11     <label class='LSview_search'>{$searchForm.labels.approx} : <input type='checkbox' name='approx' class='LSview_search' {if $searchForm.values.approx!=''}checked="true"{/if} /></label>
12     {if $searchForm.recursive}<label class='LSview_search'>{$searchForm.labels.recursive} : <input type='checkbox' name='recursive' class='LSview_search' {if $searchForm.values.recursive!=''}checked="true"{/if}/></label>{/if}
13   </p>
14 </form>
15
16 <h1>
17   {$pagetitle}
18 </h1>
19
20 {if $LSview_actions != ''}
21 <ul class='LSview-actions'>
22   {foreach from=$LSview_actions item=item}
23     {if is_array($item)}
24       <li class='LSview-actions'><a href='{$item.url}' class='LSview-actions'><img src='{$LS_IMAGES_DIR}/{$item.action}.png' alt='{php}tr('label');{/php}' title='{php}tr('label');{/php}' /> {php}tr('item','label');{/php}</a></li>
25     {/if}
26   {/foreach}
27 </ul>
28 {/if}
29
30 <table class='LSobject-list'>
31     <tr class='LSobject-list'>
32       <th class='LSobject-list'>
33         {if $LSsearch->sort}
34         <a href='view.php?LSobject={$LSsearch->LSobject}&amp;sortBy=displayName&amp;nocache={$smarty.now}'>
35           {if $LSsearch->sortBy == 'displayName'}
36             <strong>{$LSsearch->label_objectName}</strong>
37             <img src='{$LS_IMAGES_DIR}/{$LSsearch->sortDirection}.png' class='LSobject-list-ordersense' alt='{$LSsearch->sortDirection}'/>
38           {else}
39             {$LSsearch->label_objectName}
40           {/if}
41         </a>
42         {else}
43           {$LSsearch->label_objectName}
44         {/if}
45       </th>
46       {if $LSsearch->displaySubDn}
47         <th class='LSobject-list LSobject-list-subdn'>
48         {if $LSsearch->sort}
49           <a href='view.php?LSobject={$LSsearch->LSobject}&amp;sortBy=subDn&amp;nocache={$smarty.now}'>
50           {if $LSsearch->sortBy == 'subDn'}
51             <strong>{$LSsearch->label_level}</strong>
52             <img src='{$LS_IMAGES_DIR}/{$LSsearch->sortDirection}.png' class='LSobject-list-ordersense' alt='{$LSsearch->sortDirection}'/>
53           {else}
54             {$LSsearch->label_level}
55           {/if}
56           </a>
57         {else}
58           {$LSsearch->label_level}
59         {/if}
60         </th>
61       {/if}
62       <th class='LSobject-list'>{$LSsearch->label_actions}</th>
63     </tr>
64     {foreach from=$page.list item=object}
65     <tr class='{cycle values="LSobject-list,LSobject-list LSobject-list-bis"}'>
66         <td class='LSobject-list LSobject-list-names'><a href='view.php?LSobject={$LSsearch->LSobject}&amp;dn={$object->dn}'  class='LSobject-list'>{$object->displayName}</a> </td>
67         {if $LSsearch->displaySubDn}<td class='LSobject-list'>{$object->subDn}</td>{/if}
68         <td class='LSobject-list LSobject-list-actions'>
69         {foreach from=$object->actions item=item}
70           <a href='{$item.url}'  class='LSobject-list-actions'><img src='{$LS_IMAGES_DIR}/{$item.action}.png' alt='{$item.label}' title='{$item.label}'/></a>
71         {/foreach}
72         </td>
73     </tr>
74     {foreachelse}
75       <tr class='LSobject-list'>
76         <td colspan='3' class='LSobject-list-without-result'>{$LSsearch->label_no_result}</td>
77       </tr>   
78     {/foreach}
79 </table>
80 <span id='LSobject_list_nbresult'>{$LSsearch->label_total}</span>
81 {if $page.nbPages > 1}
82   <p class='LSobject-list-page'>
83     
84   {if $page.nbPages > 10}
85     {php}$this->assign('range', range(0,10));{/php}
86     {if $page.nb > 5}
87       {if $page.nb > $page.nbPages-6}
88         {assign var=start value=$page.nbPages-12}
89        {else}
90         {assign var=start value=$page.nb-6}
91       {/if}
92     {else}
93       {assign var=start value=0}
94     {/if}
95     <a href='view.php?LSobject={$LSsearch->LSobject}&amp;page=0' class='LSobject-list-page'><</a> 
96     {foreach from=$range item=i}
97       {if $page.nb==$start+$i}
98         <strong class='LSobject-list-page'>{$page.nb+1}</strong> 
99       {else}
100         <a href='view.php?LSobject={$LSsearch->LSobject}&amp;page={$i+$start}'  class='LSobject-list-page'>{$i+$start+1}</a> 
101       {/if}
102     {/foreach}
103     <a href='view.php?LSobject={$LSsearch->LSobject}&amp;page={$page.nbPages-1}' class='LSobject-list-page'>></a> 
104   {else}
105     {section name=listpage loop=$page.nbPages step=1}
106       {if $page.nb == $smarty.section.listpage.index}
107         <strong class='LSobject-list-page'>{$page.nb+1}</strong> 
108       {else}
109         <a href='view.php?LSobject={$LSsearch->LSobject}&amp;page={$smarty.section.listpage.index}'  class='LSobject-list-page'>{$smarty.section.listpage.index+1}</a> 
110       {/if}
111     {/section}
112   {/if}
113   </p>
114 {/if}
115 {include file='bottom.tpl'}