]> ruin.nu Git - ndwebbie.git/blob - root/src/rankings/planets.tt2
Escape planet and rule names in templates.
[ndwebbie.git] / root / src / rankings / planets.tt2
1 [% META title = 'Planet Rankings' %]
2 <p>[% IF offset > 0 %]<a href="[% c.uri_for('planets', order, offset - 100) %]">Previous 100</a>[% END %]
3         [% IF planets.size == 100 %]<a href="[% c.uri_for('planets', order, offset + 100) %]">Next 100</a>[% END %]
4 </p>
5 <table class="stats">
6         <tr align="center"><th colspan="4">Rank</th>
7         </tr>
8         <tr>
9         <th><a href="[% c.uri_for('planets', 'sizerank', offset) %]">Size</a></th>
10         <th><a href="[% c.uri_for('planets', 'scorerank', offset) %]">Score</a></th>
11         <th><a href="[% c.uri_for('planets', 'valuerank', offset) %]">Value</a></th>
12         <th><a href="[% c.uri_for('planets', 'xprank', offset) %]">XP</a></th>
13         <th>X</th><th>Y</th><th>Z</th><th>Planet</th><th>Race</th>
14         <th><a href="[% c.uri_for('planets', 'sizerank', offset) %]">Size</a></th>
15         <th><a href="[% c.uri_for('planets', 'scorerank', offset) %]">Score</a></th>
16         <th><a href="[% c.uri_for('planets', 'valuerank', offset) %]">Value</a></th>
17         <th><a href="[% c.uri_for('planets', 'xprank', offset) %]">XP</a></th>
18 [% IF extracolumns %]
19         <th>Nick</th>
20         <th><a href="[% c.uri_for('planets', 'hit_us', offset) %]">Hit us</a></th>
21         <th>Alliance</th>
22 [% END %]
23         </tr>
24 [% FOR p IN planets %]
25         <tr align="right" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
26                 [% p.sizerankimg = (p.sizerank_gain_day == 0 ? 'stay' : (p.sizerank_gain_day < 0 ? 'up' : 'down')) %]
27                 <td title="[% p.sizerank_gain_day %] Today | [% p.sizerank_gain %] Tick">[% p.sizerank %] <img src="/static/images/[% p.sizerankimg %].png" alt="[% p.sizerankimg %]"> </td>
28                 [% p.scorerankimg = (p.scorerank_gain_day == 0 ? 'stay' : (p.scorerank_gain_day < 0 ? 'up' : 'down')) %]
29                 <td title="[% p.scorerank_gain_day %] Today | [% p.scorerank_gain %] Tick">[% p.scorerank %] <img src="/static/images/[% p.scorerankimg %].png" alt="[% p.scorerankimg %]"> </td>
30                 [% p.valuerankimg = (p.valuerank_gain_day == 0 ? 'stay' : (p.valuerank_gain_day < 0 ? 'up' : 'down')) %]
31                 <td title="[% p.valuerank_gain_day %] Today | [% p.valuerank_gain %] Tick">[% p.valuerank %] <img src="/static/images/[% p.valuerankimg %].png" alt="[% p.valuerankimg %]"> </td>
32                 [% p.xprankimg = (p.xprank_gain_day == 0 ? 'stay' : (p.xprank_gain_day < 0 ? 'up' : 'down')) %]
33                 <td title="[% p.xprank_gain_day %] Today | [% p.xprank_gain %] Tick">[% p.xprank %] <img src="/static/images/[% p.xprankimg %].png" alt="[% p.xprankimg %]"> </td>
34
35                 <td>[% p.x %] </td>
36                 <td><a href="[% c.uri_for('/stats','galaxy',p.x,p.y) %]">[% p.y %]</a></td>
37                 <td><a href="[% c.uri_for('/stats','planet',p.id) %]">[% p.z %]</a></td>
38                 <td align="center">[% p.ruler | html %] <b>OF</b> [% p.planet | html %]</td>
39                 <td align="center">[% p.race %]</td>
40                 [% p.sizeimg = (p.size_gain_day == 0 ? 'stay' : (p.size_gain_day > 0 ? 'up' : 'down')) %]
41                 <td title="[% p.size_gain_day %] Today | [% p.size_gain %] Tick">[% p.size | commify %] <img src="/static/images/[% p.sizeimg %].png" alt="[% p.sizeimg %]"> </td>
42                 [% p.scoreimg = (p.score_gain_day == 0 ? 'stay' : (p.score_gain_day > 0 ? 'up' : 'down')) %]
43                 <td title="[% p.score_gain_day | commify %] Today | [% p.score_gain | commify %] Tick">[% p.score | commify %] <img src="/static/images/[% p.scoreimg %].png" alt="[% p.scoreimg %]"> </td>
44                 [% p.valueimg = (p.value_gain_day == 0 ? 'stay' : (p.value_gain_day > 0 ? 'up' : 'down')) %]
45                 <td title="[% p.value_gain_day | commify %] Today | [% p.value_gain | commify %] Tick">[% p.value | commify %] <img src="/static/images/[% p.valueimg %].png" alt="[% p.valueimg %]"> </td>
46                 [% p.xpimg = (p.xp_gain_day == 0 ? 'stay' : (p.xp_gain_day > 0 ? 'up' : 'down')) %]
47                 <td title="[% p.xp_gain_day | commify %] Today | [% p.xp_gain | commify %] Tick">[% p.xp | commify %] <img src="/static/images/[% p.xpimg %].png" alt="[% p.xpimg %]"> </td>
48
49         [% IF extracolumns %]
50         <td align="center" class="[% p.planet_status %]"><a href="[% c.uri_for('/intel','planet',p.id) %]">[% p.nick %]([% p.planet_stats %])</a></td>
51         <td>[% p.hit_us %]</td>
52         <td align="center" class="[% p.relationship %]">[% p.alliance %]</td>
53         [% END %]
54         </tr>
55 [% END %]
56 </table>
57 <p>[% IF offset > 0 %]<a href="[% c.uri_for('planets', order, offset - 100) %]">Previous 100</a>[% END %]
58         [% IF planets.size == 100 %]<a href="[% c.uri_for('planets', order, offset + 100) %]">Next 100</a>[% END %]
59 </p>