root/yapcasia2008-test/actdocs/templates/user/stats

Revision 2476 (checked in by kaminogoya, 12 years ago)

added user templates

Line 
1 [% WRAPPER ui title = loc('<conf name> Statistics', global.conference.name) %]
2
3 <p>
4  [% loc('There are n registered people', stats.users, stats.countries.size, stats.pm.size, stats.committed) %]
5 </p>
6
7 <p>
8  [% loc("You can have a look at country / mongers or cities statistics.", make_uri('stats'), make_uri('stats', 'show', 'cities')) %]
9 </p>
10 <p>
11  {{The number of committed users is listed between parentheses}}
12 </p>
13 <p>
14  {{Click on the various links to find the corresponding users!}}
15 </p>
16
17 [% SWITCH global.request.args.show %]
18 [% CASE [ 'cities', 'towns' ] %]
19 <p>
20  {{Note: the country total is not always equal to the city total.}}
21 </p>
22 <center>
23 [% count = 0 %]
24 [% cols = 3 %]
25 <table border="1" cellspacing="0" cellpadding="4">
26  <tr>
27   <th colspan="[% cols %]">{{Cities}}</th>
28  </tr>
29   <!-- cities within countries -->
30   [% IF stats.towns.size == 0 %]
31   <td>{{No city information entered}}</td>
32   [% END %]
33   [% FOREACH c = stats.countries %]
34   [% UNLESS count %]<tr>[% END %]
35    [% UNLESS stats.towns.${c.iso} %][% NEXT %][% END %]
36    <td valign="top"><table width="100%">
37    [% FOREACH t = stats.towns.${c.iso} %]
38    [% IF loop.count == 1 %]
39     <tr><th colspan="2"><a href="[% make_uri('search', 'country', c.iso) %]">[% c.name %]</a> [% c.count %]&nbsp;([% c.committed %])</th></tr>
40    [% END %]
41     <tr><td><a href="[% make_uri('search', 'town', t.name, 'country', c.iso) %]">[% t.name %]</a></td><td align="right">[% t.count %]&nbsp;([% t.committed %])</td></tr>
42    [% END %]
43    </td></tr></table></td>
44    [% IF count == cols - 1 %]</tr>[% END %]
45    [% count = ( count + 1) % cols %]
46   [% END %]
47   </tr>
48 </table>
49 </center>
50 [% CASE DEFAULT %]
51 <center>
52 <table border="1" cellspacing="0" cellpadding="4">
53  <tr>
54   <th>{{Countries}}</th>
55   <th>{{Monger groups}}</th>
56  </tr>
57  <tr>
58   <!-- Countries -->
59   <td valign="top">
60    <table cellpadding="4">
61     [% FOREACH c = stats.countries %]
62     <tr>
63      [% IF loop.count == 1 %]
64      <th valign="top" align="left">
65      <a href="[% make_uri('search', 'country', c.iso) %]">[% c.name %]</a>
66      </th><th valign="top" align="right">[% c.count %]&nbsp;([% c.committed %])</th>
67      [% ELSE %]
68      <td valign="top" align="left">
69      <a href="[% make_uri('search', 'country', c.iso) %]">[% c.name %]</a>
70      </td><td valign="top" align="right">[% c.count %]&nbsp;([% c.committed %])</td>
71      [% END %]
72     </tr>
73     [% END %]
74    </table>
75   </td>
76   <!-- PM groups -->
77   <td valign="top">
78    <table cellpadding="4">
79     [% '&nbsp;' UNLESS stats.pm.size %]
80     [% FOREACH pm = stats.pm %]
81     <tr>
82      [% IF loop.count == 1 %]
83       <th valign="top" align="left">
84       <a href="[% make_uri('search', 'pm_group', pm.name) %]">[% pm.name %]</th>
85       <th align="right">[% pm.count %]&nbsp;([% pm.committed %])</th>
86      [% ELSE %]
87       <td valign="top" align="left">
88       <a href="[% make_uri('search', 'pm_group', pm.name) %]">[% pm.name %]</td>
89       <td align="right">[% pm.count %]&nbsp;([% pm.committed %])</td>
90      [% END %]
91      </tr>
92     [% END %]
93    </table>
94   </td>
95  </tr>
96 </table>
97 </center>
98 [% END %]
99
100 </form>
101 [% END %]
Note: See TracBrowser for help on using the browser.