source: extensions/UserAdvManager/trunk/admin/template/userlist.tpl @ 26947

Last change on this file since 26947 was 26947, checked in by Eric, 10 years ago

HTML5 recommandation improvement
tablesorter and tablepager jquery plugin customization (step 1)

Left to do : Detecting admin panel theme color to improve zebra colors display in tables

  • Property svn:eol-style set to LF
File size: 4.1 KB
Line 
1{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
2{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
3{combine_script id='jquery.tablesorter' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.min.js'}
4{combine_script id='jquery.tablesorter.pager' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.pager.min.js'}
5
6{combine_css path= $UAM_PATH|@cat:'admin/template/uam.css'}
7
8
9<script type="text/javascript">
10jQuery().ready(function()
11{ldelim}
12  jQuery('.cluetip').cluetip(
13  {ldelim}
14    width: 600,
15    splitTitle: '|'
16  {rdelim});
17{rdelim});
18
19$(document).ready(function()
20    {ldelim}
21      $("#sorting")
22      .tablesorter(
23      {ldelim}
24          sortList:[[3,0]],
25          // pass the headers argument and assing a object
26          headers:
27          {ldelim}
28              // assign the second column (we start counting zero)
29              1:
30              {ldelim}
31                  // disable it by setting the property sorter to false
32                  sorter: false
33              {rdelim},
34              // assign the fifth column (we start counting zero)
35              4:
36              {ldelim}
37                  // disable it by setting the property sorter to false
38                  sorter: false
39              {rdelim}
40          {rdelim}
41      {rdelim})
42      .tablesorterPager({ldelim}container: $("#pager"), page: 0, size: 20, output: '{ldelim}page{rdelim} / {ldelim}totalPages{rdelim}'{rdelim});
43    {rdelim}
44);
45</script>
46
47<div class="titrePage">
48  <h2>{'UAM_Title_Tab'|@translate} {$UAM_VERSION}<br/>{'UAM_Tracking registered users'|@translate}</h2>
49</div>
50
51<form method="post" class="general">
52  <fieldset>
53        <legend class="cluetip" title="{'UAM_Tracking registered users'|translate}|{'UAM_userlistTitle_d'|translate}">{'UAM_Tracking registered users'|@translate}</legend>
54    {if count($users) > 0}
55      <table id="sorting" class="table2">
56                        <thead>
57                        <tr class="throw">
58                        <th>{'Username'|@translate}</th>
59            <th>{'Profile'|@translate}</th>
60                        <th>{'Email address'|@translate}</th>
61            <th>{'UAM_LastVisit_Date'|@translate}</th>
62            <th>{'UAM_Nb_Days'|@translate}</th>
63                        </tr>
64                        </thead>
65        <tbody>
66        {foreach from=$users item=user name=users_loop}
67          <tr class="{if $smarty.foreach.users_loop.index is odd}row1{else}row2{/if}">
68            <td><label>{$user.USERNAME}</label></td>
69            <td style="text-align:center;"><a href="./admin.php?page=profile&amp;user_id={$user.ID}" title="{'Profile'|@translate}" onclick="window.open(this.href); return false;"><img src="{$UAM_PATH}admin/template/icon/edit_s.png" alt=""/></a></td>
70            <td>{$user.EMAIL}</td>
71            <td style="text-align:center;">{$user.LASTVISIT}</td>
72{if $user.DISPLAY == 'green'}
73            <td style="color:lime;text-align:center;">{$user.DAYS}</td>
74{elseif $user.DISPLAY == 'orange'}
75            <td style="color:orange;text-align:center;">{$user.DAYS}</td>
76{elseif $user.DISPLAY == 'red'}
77            <td style="color:red;text-align:center;">{$user.DAYS}</td>
78{else}
79            <td style="text-align:center;">{$user.DAYS}</td>
80{/if}
81            {foreach from=$user.plugin_columns item=data}
82              <td>{$data}</td>
83            {/foreach}                         
84          </tr>
85        {/foreach}
86        </tbody>
87      </table>
88<div id="pager" class="pager">
89                <img src="{$UAM_PATH}admin/template/icon/first.png" class="first" alt=""/>
90                <img src="{$UAM_PATH}admin/template/icon/prev.png" class="prev" alt=""/>
91                <input type="text" class="pagedisplay"/>
92                <img src="{$UAM_PATH}admin/template/icon/next.png" class="next" alt=""/>
93                <img src="{$UAM_PATH}admin/template/icon/last.png" class="last" alt=""/>
94                <select class="pagesize" title="{'UAM_Select page size'|@translate}">
95                        <option  value="10">10</option>
96                        <option selected="selected" value="20">20</option>
97                        <option value="30">30</option>
98                        <option value="40">40</option>
99                </select>
100    <select class="gotoPage" title="{'UAM_Select page number'|@translate}"></select>
101</div>
102        <br/>
103  </fieldset>
104                {else}
105                <div>
106                        {'UAM_No_Userlist'|@translate}
107                </div>
108                {/if}
109</form>
Note: See TracBrowser for help on using the repository browser.