]> ruin.nu Git - ndwebbie.git/blob - root/src/raids/edit.tt2
Converted editRaid page
[ndwebbie.git] / root / src / raids / edit.tt2
1 [% META title = 'Edit raid' %]
2 [% FOR e IN errors %]
3 <h3 style="color: red">[% e %]</h3>
4 [% END %]
5 <div class="leftinfo">
6 <form action="[% c.uri_for('postraidupdate',raid.id) %]" method="post">
7         <fieldset> <legend>Edit raid</legend>
8                 <div class="leftinfo">
9                         <p><a href="[% c.uri_for((raid.open ? 'close' : 'open'),raid.id) %]">[% raid.open ? 'Close' : 'Open'%] raid.</a></p>
10                         <p><a href="[% c.uri_for((raid.released_coords ? 'hidecoords' : 'showcoords'),raid.id) %]">[% raid.released_coords ? 'Hide' : 'Show' %] coords.</a></p>
11                         <p><a href="[% c.uri_for('remove',raid.id) %]">Remove raid</a></p>
12                         <p>Landing tick: <input type="text" name="tick" value="[% raid.tick %]"></p>
13                         <p>Number of waves: <input type="text" name="waves" value="[% raid.waves %]"></p>
14                 [% IF removegroups.size > 0 %]
15                         <p>The following groups has access to the raid</p>
16                         <table>
17                         <tr><th>Group</th><th>Remove</th></tr>
18                         [% FOR g IN removegroups %]
19                         <tr><td>[% g.groupname %]</td><td><input type="checkbox"
20                                 name="[% g.gid %]" value="remove"></td>
21                         </tr>
22                         [% END %]
23                         </table>
24                 [% END %]
25                 [% IF addgroups.size > 0 %]
26                         <p>These does not have access to the raid</p>
27                         <table>
28                         <tr><th>Group</th><th>Add</th></tr>
29                         [% FOR g IN addgroups %]
30                         <tr><td>[% g.groupname %]</td><td><input type="checkbox"
31                                 name="[% g.gid %]" value="add"></td>
32                         </tr>
33                         [% END %]
34                         </table>
35                 [% END %]
36                 </div>
37                 <p>Raid message here</p>
38                 <textarea rows="15" cols="40" name="message">[% raid.message %]</textarea>
39                 <p><input type="submit" value="Change"></p>
40         </fieldset>
41 </form>
42 </div>
43 <div class="leftinfo">
44 <form action="[% c.uri_for('postaddtargets',raid.id) %]" method="post">
45         <fieldset> <legend>Add targets</legend>
46                 <p>List all target coords here</p>
47                 <textarea rows="15" cols="40" name="targets"></textarea>
48                 <p>Add all coords from: <select name="alliance">
49                 [% FOR a IN alliances %]
50                                 <option value="[% a.id %]" [% IF selected %]selected="selected"[% END %]>[% a.name %]</option>
51                 [% END %]
52                         </select>
53                         <br>Size limit (Filters out smaller planets): 
54                         <input type="text" name="sizelimit" value="">
55                         <br><input type="submit" value="Add">
56                 </p>
57         </fieldset>
58 </form>
59 </div>
60 <div class="clear">&nbsp;</div>
61 <p>Sort by:
62         <a href="[% c.uri_for('edit',raid.id,'coords') %]">Coords</a>
63         <a href="[% c.uri_for('edit',raid.id,'race') %]">Race</a>
64         <a href="[% c.uri_for('edit',raid.id,'sizerank') %]">Size</a>
65         <a href="[% c.uri_for('edit',raid.id,'scorerank') %]">Score</a>
66         <a href="[% c.uri_for('edit',raid.id,'valuerank') %]">Value</a>
67         <a href="[% c.uri_for('edit',raid.id,'xprank') %]">XP</a>
68 </p>
69 <div class="leftinfo">
70 <form action="[% c.uri_for('posttargetupdates',raid.id) %]" method="post">
71 [% FOR t IN targets %]
72         <fieldset> <legend>Target: #[% t.id %] [% t.coords %]</legend>
73         <div class="leftinfo">
74         <p style="color:red;font-weight:bold">Remove target: <input type="checkbox" name="remove:[% t.id %]" value="remove"></p>
75                 <ul>
76                         <li>Size: [% t.size %]</li>
77                         <li>Score: [% t.score %]</li>
78                         <li>Value: [% t.value %]</li>
79                         <li>Race: [% t.race %]</li>
80                 </ul>
81                 <table>
82                         <tr><th>Planet status</th><th>Alliance relationship</th></tr>
83                         <tr>
84                                 <td class="[% t.planet_status %]">[% t.planet_status %]</td>
85                                 <td class="[% t.relationship %]">[% t.relationship %]</td>
86                         </tr>
87                 </table>
88         </div>
89         <div class="leftinfo">
90         <p>     Comment:<br>
91                 <textarea rows="5" cols="20" name="comment:[% t.id %]">[% t.comment %]</textarea>
92         </p>
93         [% t.planetscan %]
94         </div>
95         <table>
96         <tr><th>Tick</th><th>Scan</th></tr>
97         [% FOR s IN t.scans %]
98         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
99                 <td>[% s.3 %]</td>
100                 <td><a href="http://game.planetarion.com/showscan.pl?scan_id=[% s.1 %]">[% s.2 %]</a></td>
101         </tr>
102         [% END %]
103         </table>
104         <div class="clear">&nbsp;</div>
105         <table>
106         [% FOR w IN t.waves %]
107                 <tr>
108                 <td>
109                 [% IF w.claimers %]
110                         Unclaim wave [% w.wave %] ([% w.claimers %]): <input type="checkbox" name="unclaim:[% t.id %]:[% w.wave %]" value="unclaim">
111                 [% ELSE %]
112                         Block wave [% w.wave %]: <input type="checkbox" name="block:[% t.id %]:[% w.wave %]" value="block">
113                 [% END %]
114                 </td>
115                 <td><input type="text" name="claim:[% t.id %]:[% w.wave %]" value=""></td>
116                 </tr>
117         [% END %]
118         </table>
119         </fieldset>
120 [% END %]
121 <p><input type="submit" value="Submit target changes"></p>
122 </form>
123 </div>