]> ruin.nu Git - ndwebbie.git/blob - root/src/raids/targetlist.tt2
Use filter instead of having to stash the function everywhere
[ndwebbie.git] / root / src / raids / targetlist.tt2
1 [% META title = 'Target List' %]
2
3 <form action="[% c.uri_for('posttargetalliances',raid.id) %]" method="post">
4         <fieldset> <legend>Pick alliances</legend>
5                 <select name="alliances" multiple size="5">
6                 [% FOR a IN alliances %]
7                                 <option value="[% a.id %]" [% IF selected %]selected="selected"[% END %]>[% a.name %]</option>
8                 [% END %]
9                         </select>
10                         <br><input type="submit" value="Show">
11         </fieldset>
12 </form>
13
14 <form action="[% c.uri_for('postcreate') %]" method="post">
15 <table class="stats">
16         <tr>
17                 <th>Coords</th>
18                 <th>Alliance</th>
19                 <th>Race</th>
20                 <th><a href="[% c.uri_for('targetlist',allies,'scorerank') %]">Score</a></th>
21                 <th><a href="[% c.uri_for('targetlist',allies,'valuerank') %]">Value</a></th>
22                 <th><a href="[% c.uri_for('targetlist',allies,'xprank') %]">XP</a></th>
23                 <th><a href="[% c.uri_for('targetlist',allies,'sizerank') %]">Size</a></th>
24                 <th><a href="[% c.uri_for('targetlist',allies,'nfvalue') %]">NF Value</a></th>
25                 <th><a href="[% c.uri_for('targetlist',allies,'nfvalue2') %]">NF Value - Ally Value</a></th>
26                 <th>Add to raid</th>
27                 <th>Add whole gal</th>
28         </tr>
29 [% x = 0; y = 0; %]
30 [% FOR p IN planets %]
31         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd ' %]">
32                 <td><a href="[% c.uri_for('/stats/planet',p.id) %]">[% p.coords %]</a></td>
33                 <td>[% p.alliance %]</td>
34                 <td>[% p.race %]</td>
35                 <td>[% p.score | commify %]</td>
36                 <td>[% p.value | commify %]</td>
37                 <td>[% p.xp | commify %]</td>
38                 <td>[% p.size | commify %]</td>
39                 <td>[% p.nfvalue | commify %]</td>
40                 <td>[% p.nfvalue2 | commify %]</td>
41                 <td><input type="checkbox" name="target" value="[% p.id %]"></td>
42         [% IF x != p.x OR y != p.y %]
43                 [% x = p.x; y = p.y; %]
44                 <td><input type="checkbox" name="gal" value="[% p.id %]"> [% p.x %]:[% p.y %]</td>
45         [% END %]
46         </tr>
47 [% END %]
48 </table>
49 <p>Landing tick: <input type="text" name="tick" value="[% landingtick %]"></p>
50 <p>Number of waves: <input type="text" name="waves" value="[% waves %]"></p>
51 <p>Sizelimit: <input type="text" name="sizelimit" value="0"></p>
52
53 <p>Raid message here</p>
54 <p><textarea rows="15" cols="40" name="message"></textarea></p>
55 <p><input type="submit" value="Create raid"></p>
56 </form>