]> ruin.nu Git - ndwebbie.git/blob - root/src/alliances/edit.tt2
Escape planet and rule names in templates.
[ndwebbie.git] / root / src / alliances / edit.tt2
1 [% META title = 'Edit Alliance' %]
2
3 <fieldset> <legend>Alliances: </legend>
4 <form action="[% c.uri_for('postallianceupdate',a.id) %]" method="post">
5 <div class="leftinfo">
6         <p>Alliance: [% a.name %]</p>
7         <p>Relationship: <select name="relationship">
8 [% FOR rel IN ['','Friendly','NAP','Hostile'] %]
9                 <option value="[% rel %]"[% IF rel == a.relationship %]selected[% END %]>[% rel %]</option>
10 [% END %]
11                 </select>
12                 <input type="checkbox" name="crelationship"></p>
13         <p>Paste a list of coords that you want to add to this alliance</p>
14         <textarea rows="10" cols="40" name="coords"></textarea>
15         <p class="claimlinks"><input type="submit" value="Submit"></p>
16 </div>
17 </form>
18 <div class="leftinfo">
19 <fieldset> <legend></legend>
20 <form action="[% c.uri_for('postremoveallplanets',a.id) %]" method="post">
21         <p>Yes, remove all planets <input type="checkbox" name="cremoveall"
22                 onclick="$('#removeall').attr('disabled',null)"></p>
23         <p><input type="submit" id='removeall' disabled value="Remove All Planets"></p>
24 </form>
25 </fieldset>
26 </div>
27 </fieldset>
28 <p>Export information <a href="[% c.uri_for('/textexport/alliance',a.id) %]">as text</a>.</p>
29 <div class="leftinfo">
30 <img class="graph" src="[% c.uri_for('/graphs/alliancevsintel',a.id,STICK) %]" alt="Alliance size and score vs members" height="300" width="500">
31 <img class="graph" src="[% c.uri_for('/graphs/avgalliancevsintel',a.id,STICK) %]" alt="Avg alliance size and score vs members" height="300" width="500">
32 </div>
33 <div class="leftinfo">
34 <table class="stats">
35         <tr>
36                 <th><a href="[% c.uri_for('edit',a.id,'coords') %]">Coords</a></th>
37                 <th>Nick</th>
38                 <th><a href="[% c.uri_for('edit',a.id,'hit_us') %]">Hit us</a></th>
39                 <th>Planet</th>
40                 <th><a href="[% c.uri_for('edit',a.id,'race') %]">Race</a></th>
41                 <th><a href="[% c.uri_for('edit',a.id,'sizerank') %]">Size (rank)</a></th>
42                 <th><a href="[% c.uri_for('edit',a.id,'scorerank') %]">Score (rank)</a></th>
43                 <th><a href="[% c.uri_for('edit',a.id,'valuerank') %]">Value (rank)</a></th>
44                 <th><a href="[% c.uri_for('edit',a.id,'xprank') %]">XP (rank)</a></th>
45         </tr>
46 [% FOR m IN members %]
47         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
48                 <td><a href="[% c.uri_for('/stats/planet',m.id) %]">[% m.coords %]</a></td>
49                 <td class="[% m.planet_status %]"><a href="[% c.uri_for('/intel/planet',m.id) %]">[% m.nick %]([% m.planet_status %])</a></td>
50                 <td>[% m.hit_us %]</td>
51                 <td>[% m.ruler | html %] <b>OF</b> [% m.planet | html %]</td>
52                 <td>[% m.race %]</td>
53                 <td>[% m.size %] ([% m.sizerank %])</td>
54                 <td>[% m.score %] ([% m.scorerank %])</td>
55                 <td>[% m.value %] ([% m.valuerank %])</td>
56                 <td>[% m.xp %] ([% m.xprank %])</td>
57         </tr>
58 [% END %]
59 </table>
60 </div>
61 <div class="leftinfo">
62 <form action="[% c.uri_for('edit',a.id,order) %]" method="post">
63         <p>Show last <input type="text" name="ticks" value="[% showticks %]"> ticks <input type="submit" value="Show"></p>
64 </form>
65 <table class="stats">
66         <tr>
67                 <th>Alliance</th><th>Sender</th>
68                 <th>Mission</th><th>Landing tick</th><th>ETA</th><th>Amount</th>
69                 <th>Target</th><th>Alliance</th>
70                 <th>Reported by</th>
71         </tr>
72 [% FOR i IN intel %]
73         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
74         <td>[% i.salliance %]</td>
75         <td><a href="[% c.uri_for('/intel/planet',i.sender) %]">[% i.scoords %]</a></td>
76         <td class="[% i.mission %]">[% i.mission %]</td>
77         <td align="center">[% i.landingtick %]</td>
78         <td align="center">[% i.eta %]</td>
79         <td>[% i.amount %]</td>
80         <td><a href="[% c.uri_for('/intel/planet',i.target) %]">[% i.tcoords %]</a></td>
81         <td>[% i.talliance %]</td>
82         <td>[% i.username %]</td>
83         </tr>
84 [% END %]
85 </table>
86 </div>