1e529d76ea91432eabdacf6d6da4a5e55f5660d6
[ldapsaisie.git] / trunk / templates / default / select_table.tpl
1 <table class='LSobject-list' id='LSselect-object' caption='{$LSsearch->LSobject}'>
2   <tr class='LSobject-list'>
3     <th class='LSobject-list LSobject-select-check'></th>
4     <th class='LSobject-list{if $LSsearch->sort} sortBy_displayName{/if}'>
5       {if $LSsearch->sortBy == 'displayName'}
6         <strong>{$LSsearch->label_objectName}</strong>
7         <img src='{$LS_IMAGES_DIR}/{$LSsearch->sortDirection}.png' class='LSobject-list-ordersense' alt='{$LSsearch->sortDirection}'/>
8       {else}
9         {$LSsearch->label_objectName}
10       {/if}
11     </th>
12     {if $LSsearch->displaySubDn}
13       <th class='LSobject-list LSobject-list-subdn{if $LSsearch->sort} sortBy_subDn{/if}'>
14         {if $LSsearch->sort}
15           {if $LSsearch->sortBy == 'subDn'}
16             <strong>{$LSsearch->label_level}</strong>
17             <img src='{$LS_IMAGES_DIR}/{$LSsearch->sortDirection}.png' class='LSobject-list-ordersense' alt='{$LSsearch->sortDirection}'/>
18           {else}
19             {$LSsearch->label_level}
20           {/if}
21         {else}
22           {$LSsearch->label_level}
23         {/if}
24       </th>
25     {/if}
26   </tr>
27 {foreach from=$page.list item=object}
28     <tr class='{cycle values="LSobject-list,LSobject-list LSobject-list-bis"}'>
29         <td class='LSobject-list LSobject-select-check'><input type='{if $searchForm.multiple}checkbox{else}radio{/if}' name='LSobjects_selected[]' value='{$object->dn}' {if $object->LSselect}checked="true"{/if} class='LSobject-select' /></td>
30         <td class='LSobject-list LSobject-select-names'>{$object->displayName}</td>
31         {if $LSsearch->displaySubDn}
32           <td class='LSobject-list LSobject-select-level'>{$object->subDn}</td>
33         {/if}
34     </tr>
35 {foreachelse}
36     <tr class='LSobject-list'>
37       <td colspan='3' class='LSobject-list-without-result'>{$LSsearch->label_no_result}</td>
38     </tr> 
39 {/foreach}
40 </table>
41
42
43 {if $page.nbPages > 1}
44   <p class='LSobject-list-page'>
45   {if $page.nbPages > 10}
46     {php}$this->assign('range', range(0,10));{/php}
47     {if $page.nb > 5}
48       {if $page.nb > $page.nbPages-6}
49         {assign var=start value=$page.nbPages-12}
50        {else}
51         {assign var=start value=$page.nb-6}
52       {/if}
53     {else}
54       {assign var=start value=0}
55     {/if}
56     <a href='select.php?LSobject={$LSsearch->LSobject}&amp;page=0&amp;multiple={$searchForm.multiple}' class='LSobject-list-page'><</a> 
57     {foreach from=$range item=i}
58       {if $page.nb==$start+$i}
59         <strong class='LSobject-list-page'>{$page.nb+1}</strong> 
60       {else}
61         <a href='select.php?LSobject={$LSsearch->LSobject}&amp;page={$i+$start}&amp;multiple={$searchForm.multiple}'  class='LSobject-list-page'>{$i+$start+1}</a> 
62       {/if}
63     {/foreach}
64     <a href='select.php?LSobject={$LSsearch->LSobject}&amp;page={$page.nbPages-1}&amp;multiple={$searchForm.multiple}' class='LSobject-list-page'>></a> 
65   {else}
66     {section name=listpage loop=$page.nbPages step=1}
67       {if $page.nb == $smarty.section.listpage.index}
68         <strong class='LSobject-list-page'>{$page.nb+1}</strong> 
69       {else}
70         <a href='select.php?LSobject={$LSsearch->LSobject}&amp;page={$smarty.section.listpage.index}&amp;multiple={$searchForm.multiple}'  class='LSobject-list-page'>{$smarty.section.listpage.index+1}</a> 
71       {/if}
72     {/section}
73   {/if}
74   </p>
75 {/if}
76
77 <div id='LSdebug_txt_ajax' style='display: none'>{$LSdebug_txt}</div>
78 <div id='LSerror_txt_ajax' style='display: none'>{$LSerror_txt}</div>