summaryrefslogtreecommitdiff
path: root/data/tpl/userlist
blob: 578d320e075c3736db2184d4eee2badd624467bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<h2>[[: $p{PageTitle} ]]</h2>
<p class="chr">
 -[[= $d{chr} ne 'all' ? '<a href="/u/list/all">all</a>' : 'all' ]]- |
 [[ for('a'..'z', 0) { ]]-
 -[[ if($d{chr} eq $_) { ]][[= $_?$_:'#' ]][[ } else { ]]<a href="/u/list/[[= $_ ]]">[[= $_?$_:'#' ]]</a>[[ } ]]
 [[ } ]]-
 <br /><br />
</p>

[[ if($#{$d{users}} < 0) { ]]-
<p>
 No users found...
</p>
[[ } else {
  my $url = sprintf '/u/list/%s', $d{chr}; 
  my $surl = sprintf '%s?s=%s&amp;o=%s', $url, $d{order}[0], $d{order}[1];
]]
[[= pagebut($surl) ]]-
<table id="tul">
 <thead><tr>
  <td class="tc1">Username [[= sortbut($url, 'username') ]]</td>
[[ if($p{Authusermod}) { ]]-
  <td class="tc2">Mail [[= sortbut($url, 'mail') ]]</td>
  <td class="tc3">Rank [[= sortbut($url, 'rank') ]]</td>[[ } ]]-
  <td class="tc4">Registered [[= sortbut($url, 'registered') ]]</td>
  <td class="tc6">Votes</td>
  <td class="tc7">Changes</td>
[[ if($p{Authusermod}) { ]]-
  <td class="tc8">&nbsp;</td>[[ } ]]-
 </tr></thead>
 [[ for (@{$d{users}}) { ]]-
 <tr>
  <td class="tc1"><a href="/u[[= $_->{id} ]]">[[: $_->{username} ]]</a></td>
[[ if($p{Authusermod}) { ]]-
  <td class="tc2">[[: $_->{mail} ]]</td>
  <td class="tc3">[[: $VNDB::VNDBopts{ranks}[0][0][$_->{rank}] ]]</td>[[ } ]]-
  <td class="tc4">[[= formatdate('%Y-%m-%d', $_->{registered}, 'wd') ]]</td>
  <td class="tc6">[[ if($_->{flags} & $VNDB::UFLAGS->{list} && $_->{votes}) { ]]
   <a href="/u[[= $_->{id} ]]/list" title="[[: $_->{username} ]]'s votes">[[= $_->{votes} ]]</a>
   [[ } else { ]][[= $_->{flags} & $VNDB::UFLAGS->{list} ? 0 : '-' ]][[ } ]]</td>
  <td class="tc7">[[ if($_->{changes}) { ]]
   <a href="/u[[= $_->{id} ]]/hist" title="Recent changes by -[[: $_->{username} ]]">[[= $_->{changes} ]]</a>
   [[ } else { ]]0[[ } ]]</td>
[[ if($p{Authusermod}) { ]]-
  <td class="tc8">( <a href="/u[[= $_->{id} ]]/edit">edit</a> )</td>[[ } ]]-
 </tr>
 [[ } ]]-
</table>
-[[= pagebut($surl) ]]-
[[ } ]]