]> ruin.nu Git - ndwebbie.git/blob - root/lib/inc/stats.tt2
2b714a9b0983902bff79eaa85a110c1b21be40c5
[ndwebbie.git] / root / lib / inc / stats.tt2
1 [% IF g %]
2 <table class="stats">
3         <tr align="center"><th colspan="4">Rank</th>
4         </tr>
5         <tr>
6         <th>Size</th>
7         <th>Score</th>
8         <th>Value</th>
9         <th>XP</th>
10         <th>Coords</th>
11         <th>Planets</th>
12         <th>Size</th>
13         <th>Score</th>
14         <th>Value</th>
15         <th>XP</th>
16         <th>Roided</th>
17         <th>Roiding</th>
18         [% IF intel %]<th>Last raid (tick)</th>[% END %]
19         </tr>
20         <tr align="right" class="odd">
21                 [% g.sizerankimg = (g.sizerank_gain_day == 0 ? 'stay' : (g.sizerank_gain_day < 0 ? 'up' : 'down')) %]
22                 <td title="[% g.sizerank_gain_day %] Today | [% g.sizerank_gain %] Tick">[% g.sizerank %] <img src="/static/images/[% g.sizerankimg %].png" alt="[% g.sizerankimg %]"> </td>
23                 [% g.scorerankimg = (g.scorerank_gain_day == 0 ? 'stay' : (g.scorerank_gain_day < 0 ? 'up' : 'down')) %]
24                 <td title="[% g.scorerank_gain_day %] Today | [% g.scorerank_gain %] Tick">[% g.scorerank %] <img src="/static/images/[% g.scorerankimg %].png" alt="[% g.scorerankimg %]"> </td>
25                 [% g.valuerankimg = (g.valuerank_gain_day == 0 ? 'stay' : (g.valuerank_gain_day < 0 ? 'up' : 'down')) %]
26                 <td title="[% g.valuerank_gain_day %] Today | [% g.valuerank_gain %] Tick">[% g.valuerank %] <img src="/static/images/[% g.valuerankimg %].png" alt="[% g.valuerankimg %]"> </td>
27                 [% g.xprankimg = (g.xprank_gain_day == 0 ? 'stay' : (g.xprank_gain_day < 0 ? 'up' : 'down')) %]
28                 <td title="[% g.xprank_gain_day %] Today | [% g.xprank_gain %] Tick">[% g.xprank %] <img src="/static/images/[% g.xprankimg %].png" alt="[% g.xprankimg %]"> </td>
29                 <td><a href="[% c.uri_for('/stats','galaxy',g.x,g.y) %]">[% g.x %]:[% g.y %]</a></td>
30                 [% g.planetsimg = (g.planets_gain_day == 0 ? 'stay' : (g.planets_gain_day > 0 ? 'up' : 'down')) %]
31                 <td title="[% g.planets_gain_day %] Today | [% g.planets_gain %] Tick">[% g.planets | commify %] <img src="/static/images/[% g.planetsimg %].png" alt="[% g.planetsimg %]"> </td>
32                 [% g.sizeimg = (g.size_gain_day == 0 ? 'stay' : (g.size_gain_day > 0 ? 'up' : 'down')) %]
33                 <td title="[% g.size_gain_day %] Today | [% g.size_gain %] Tick">[% g.size | commify %] <img src="/static/images/[% g.sizeimg %].png" alt="[% g.sizeimg %]"> </td>
34                 [% g.scoreimg = (g.score_gain_day == 0 ? 'stay' : (g.score_gain_day > 0 ? 'up' : 'down')) %]
35                 <td title="[% g.score_gain_day | commify %] Today | [% g.score_gain | commify %] Tick">[% g.score | commify %] <img src="/static/images/[% g.scoreimg %].png" alt="[% g.scoreimg %]"> </td>
36                 [% g.valueimg = (g.value_gain_day == 0 ? 'stay' : (g.value_gain_day > 0 ? 'up' : 'down')) %]
37                 <td title="[% g.value_gain_day | commify %] Today | [% g.value_gain | commify %] Tick">[% g.value | commify %] <img src="/static/images/[% g.valueimg %].png" alt="[% g.valueimg %]"> </td>
38                 [% g.xpimg = (g.xp_gain_day == 0 ? 'stay' : (g.xp_gain_day > 0 ? 'up' : 'down')) %]
39                 <td title="[% g.xp_gain_day | commify %] Today | [% g.xp_gain | commify %] Tick">[% g.xp | commify %] <img src="/static/images/[% g.xpimg %].png" alt="[% g.xpimg %]"> </td>
40                 <td>[% g.ticks_roided %]</td>
41                 <td>[% g.ticks_roiding %]</td>
42                 [% IF intel %]<td>[% IF g.raid %][% g.raid %] ([% g.last_raid %])[% ELSE %]No raid[% END %]</td>[% END %]
43         </tr>
44 </table>
45 [% END %]
46
47 <table>
48         <tr align="center"><th colspan="4">Rank</th>
49         </tr>
50         <tr><th>Size</th><th>Score</th><th>Value </th> <th>XP</th>
51                 <th>Coords</th><th>Planet</th><th>Race</th>
52                 <th>Size</th><th>Score</th><th>Value </th><th>XP</th>
53                 [% IF details %]<th>Gov</th><th>Fleet (Resource) value</th>[% END %]
54                 [% IF intel %]<th>Nick</th><th>Hit us</th><th>Alliance</th>[% END %]
55         </tr>
56 [% FOR p IN planets %]
57         <tr align="right" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
58                 [% p.sizerankimg = (p.sizerank_gain_day == 0 ? 'stay' : (p.sizerank_gain_day < 0 ? 'up' : 'down')) %]
59                 <td title="[% p.sizerank_gain_day %] Today | [% p.sizerank_gain %] Tick">[% p.sizerank %] <img src="/static/images/[% p.sizerankimg %].png" alt="[% p.sizerankimg %]"> </td>
60                 [% p.scorerankimg = (p.scorerank_gain_day == 0 ? 'stay' : (p.scorerank_gain_day < 0 ? 'up' : 'down')) %]
61                 <td title="[% p.scorerank_gain_day %] Today | [% p.scorerank_gain %] Tick">[% p.scorerank %] <img src="/static/images/[% p.scorerankimg %].png" alt="[% p.scorerankimg %]"> </td>
62                 [% p.valuerankimg = (p.valuerank_gain_day == 0 ? 'stay' : (p.valuerank_gain_day < 0 ? 'up' : 'down')) %]
63                 <td title="[% p.valuerank_gain_day %] Today | [% p.valuerank_gain %] Tick">[% p.valuerank %] <img src="/static/images/[% p.valuerankimg %].png" alt="[% p.valuerankimg %]"> </td>
64                 [% p.xprankimg = (p.xprank_gain_day == 0 ? 'stay' : (p.xprank_gain_day < 0 ? 'up' : 'down')) %]
65                 <td title="[% p.xprank_gain_day %] Today | [% p.xprank_gain %] Tick">[% p.xprank %] <img src="/static/images/[% p.xprankimg %].png" alt="[% p.xprankimg %]"> </td>
66
67                 <td><a href="[% c.uri_for('/stats','planet',p.id) %]">[% p.coords %]</a></td>
68                 <td align="center">[% p.ruler %] <b>OF</b> [% p.planet %]</td>
69                 <td align="center">[% p.race %]</td>
70                 [% p.sizeimg = (p.size_gain_day == 0 ? 'stay' : (p.size_gain_day > 0 ? 'up' : 'down')) %]
71                 <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>
72                 [% p.scoreimg = (p.score_gain_day == 0 ? 'stay' : (p.score_gain_day > 0 ? 'up' : 'down')) %]
73                 <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>
74                 [% p.valueimg = (p.value_gain_day == 0 ? 'stay' : (p.value_gain_day > 0 ? 'up' : 'down')) %]
75                 <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>
76                 [% p.xpimg = (p.xp_gain_day == 0 ? 'stay' : (p.xp_gain_day > 0 ? 'up' : 'down')) %]
77                 <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>
78         [% IF details %]
79                 <td align="center">[% p.gov %]</td>
80                 <td align="center">[% p.fleetvalue %] ([% p.resvalue %])</td>
81         [% END %]
82         [% IF intel %]
83         <td align="center" class="[% p.planet_status %]"><a href="[% c.uri_for('/intel','planet',p.id) %]">[% p.nick %]([% p.planet_stats %])</a></td>
84         <td>[% p.hit_us %]</td>
85         <td align="center" class="[% p.relationship %]">[% p.alliance %]</td>
86         [% END %]
87         </tr>
88 [% END %]
89 </table>