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