]> ruin.nu Git - ndwebbie.git/blob - root/src/calls/edit.tt2
Converted calls page, also using jquery.
[ndwebbie.git] / root / src / calls / edit.tt2
1 [% META title = 'Edit call' %]
2
3 [% BLOCK missiontable %]
4 <table>
5                 <tr><th></th><th>Coords</th><th>Name</th><th>Mission</th><th>Tick</th><th>ETA</th><th>Amount</th></tr>
6         [% FOR m IN missions %]
7                 <tr align="center" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]" onclick="$('#fleet[% m.id %]').toggle()">
8                         <td>
9                 [% IF m.ships %]
10                                 <b>&dArr;</b>
11                 [% END %]
12                         </td><td>
13                 [% IF m.planet %]
14                                 <a href="[% c.uri_for('/stats/planet', m.planet) %]">[% m.coords %]</a>
15                 [% END %]
16                         </td>
17                         <td>[% m.name %]</td>
18                         <td class="[% m.mission %]">[% m.mission %]</td>
19                         <td>[% m.tick %]</td>
20                         <td>[% m.eta %]</td>
21                         <td>[% m.amount %]</td>
22                         [% IF m.fleetcatch %]
23                         <td class="Hostile">FLEETCATCH!!</td>
24                         [% END %]
25                 </tr>
26                 [% IF m.ships %]
27                 <tr id="fleet[% m.id %]" class="missionrow">
28                         <td>
29                         <td colspan="5"><table>
30                         [% FOR s IN m.ships %]
31                                 <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
32                                         <td>[% s.ship %]</td><td>[% s.amount %]</td>
33                                 </tr>
34                         [% END %]
35                         </table></td>
36                 </tr>
37                 [% END %]
38         [% END %]
39         </table>
40 [% END %]
41
42 <form action="[% c.uri_for('postcallupdate',call.id) %]" method="post">
43 <fieldset> <legend>Call details, call# [% call.id %]</legend>
44 <table>
45 <tr>
46 <td>
47 <ul>
48         <li>Current DC: [% call.dc %]</li>
49         <li>Member: [% call.member %] </li>
50         <li>SMS: [% call.sms %] </li>
51         <li>Coords: <a href="[% c.uri_for('/stats/planet', call.planet) %]">[% call.coords %]</a></li>
52         <li>Landing at tick: <br>
53                 <input type="text" name="tick" value="[% call.landing_tick %]">
54                 <input type="checkbox" name="ctick"></li>
55         <li>Current ETA: [% call.landing_tick - TICK %]</li>
56 </ul>
57 </td>
58 <td>
59         <textarea rows="8" cols="40" name="info">[% call.info %]</textarea>
60 </td>
61 <td><ul>
62         <li>Change Notes? <input type="checkbox" name="cinfo"></li>
63         <li><input type="submit" name="cmd" value="Submit"></li>
64         <li><input type="submit" name="cmd" value="Take call"></li>
65         <li><input type="submit" name="cmd" value="[% cover %] call"></li>
66         <li><input type="submit" name="cmd" value="[% ignore %] call"></li>
67 </ul></td>
68 </tr>
69 </table>
70 </fieldset>
71 </form>
72 <fieldset><legend>Attackers:</legend>
73 <form action="[% c.uri_for('postattackerupdate',call.id) %]" method="post">
74         <table>
75         <tr>
76         <th></th>
77         <th>Coords</th>
78         <th>Planet status</th>
79         <th>Alliance</th>
80         <th>Race</th>
81         <th>Initial ETA</th>
82         <th>Amount</th>
83         <th>Shiptypes</th>
84         <th>Fleet</th>
85         <th>Change/remove?</th>
86         </tr>
87 [% FOR a IN attackers %]
88         <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
89                 <td><input type="button" onclick="$('#attacker[% a.id %]').toggle()" value="&dArr;" title="Show fleets"></td>
90                 <td><a href="[% c.uri_for('/stats/planet',a.id) %]">[% a.coords %]</a></td>
91                 <td class="[% a.planet_status %]">[% a.planet_status %]</td>
92                 <td class="[% a.relationship %]">[% a.alliance %] ([% a.relationship %])</td>
93                 <td>[% a.race %]</td>
94                 <td>[% a.eta %]</td>
95                 <td>[% a.amount %]</td>
96                 <td><input class="coord" type="text" name="shiptype:[% a.id %]" value="[% a.shiptype %]"></td>
97                 <td>[% a.fleet %]</td>
98                 <td><input type="checkbox" name="change:[% a.id %]"></td>
99         </tr>
100         <tr id="attacker[% a.id %]" class="missionrow">
101         <td></td>
102         <td colspan="8">
103         [% PROCESS missiontable missions=a.missions %]
104         </td></tr>
105 [% END %]
106         </table>
107         <p>
108         <input type="submit" name="cmd" value="Change">
109         <input type="submit" name="cmd" value="Remove">
110         </p>
111 </form>
112 </fieldset>
113 <fieldset><legend>Member fleet</legend>
114 [% PROCESS missiontable missions=fleets %]
115 </fieldset>
116 <fieldset><legend>Defenders</legend>
117 [% PROCESS missiontable missions=defenders %]
118 </fieldset>
119
120 <div>
121 [% FOR post IN posts %]
122 <fieldset class="forum-post">
123 <legend class="unread:[% post.unread %]"><b>[% post.username %]</b> : [% post.time %]</legend>
124         [% post.message %]
125 </fieldset>
126 [% END %]
127
128 <form action="[% c.uri_for('postcallcomment', call.id) %]" method="post"><fieldset class="forum-post"> <legend>New Reply</legend>
129         <textarea rows="10" cols="60" name="message"></textarea>
130         <input type="submit" value="Submit">
131 </fieldset></form>
132 </div>
133
134 <script type="text/javascript">
135 <!--
136 $(document).ready(function(){
137         $('.missionrow').hide();
138 });
139 -->
140 </script>