]> ruin.nu Git - ndwebbie.git/blob - root/src/stats/planet.tt2
Converted check/stats page
[ndwebbie.git] / root / src / stats / planet.tt2
1 [% META title = 'Planet stats' %]
2 [% PROCESS inc/stats.tt2 %]
3
4 [% IF planetdata %]
5 <div class="leftinfo">
6 <table>
7         <tr><th>Tick</th><th>Type</th><th>Amount</th></tr>
8         [% FOR pd IN planetdata %]
9         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
10                 <td>[% pd.tick %]</td>
11                 <td>[% pd.category %] [% pd.name %]</td>
12                 <td>[% comma(pd.amount) %]</td>
13         </tr>
14         [% END %]
15 </table>
16 </div>
17 [% END %]
18 <div class="leftinfo">
19 <table>
20         <tr><th>Tick</th><th>Value</th><th>Gain</th></tr>
21 [% FOR v IN values %]
22         <tr>
23                 <td>[% v.tick %]</td><td>[% v.value %]</td>
24                 <td class="[% v.gain < 0 ? 'Attack' : 'Defend' %]">[% v.gain %]</td>
25         </tr>
26 [% END %]
27 </table>
28 </div>
29 <div class="leftinfo">
30 <table>
31 [% IF scans %]
32         <tr><th>Tick</th><th>Scan</th></tr>
33         [% FOR s IN scans %]
34         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
35                 <td>[% s.tick %]</td>
36                 <td><a href="http://game.planetarion.com/showscan.pl?scan_id=[% s.scan_id %]" rel="external">[% s.type %]</a></td>
37 </tr>
38         [% END %]
39 [% END %]
40         <tr><th>Tick</th><th>Coords</th></tr>
41 [% FOR coords IN oldcoords %]
42         <tr>
43                 <td>[% coords.tick %]</td>
44                 <td>[% coords.x %]:[% coords.y %]:[% coords.z %]</td>
45         </tr>
46 [% END %]
47 </table>
48 </div>
49 [% IF outgoings %]
50 <div class="leftinfo">
51 <p>Outgoing fleets</p>
52         [% PROCESS inc/missionlist.tt2 missions=outgoings %]
53 <p>Incoming fleets</p>
54         [% PROCESS inc/missionlist.tt2 missions=incomings %]
55 </div>
56 [% END %]
57
58 <div class="leftinfo">
59 <img class="graph" src="[% c.uri_for('/graphs/planetstats',p.id,STICK) %]" alt="stats" height="300" width="500">
60 <img class="graph" src="[% c.uri_for('/graphs/planetranks',p.id,STICK) %]" alt="ranks" height="300" width="500">
61 </div>