]> ruin.nu Git - ndwebbie.git/blobdiff - root/src/calls/edit.tt2
Add missing forum database file
[ndwebbie.git] / root / src / calls / edit.tt2
index 14c2175fead9bb3e3f4ea8e6449cce445059bcc2..4c4cb3da105052b37ef3f43be7676c306a08eaa4 100644 (file)
@@ -1,46 +1,7 @@
 [% META title = 'Edit call' %]
 
-[% BLOCK missiontable %]
-<table>
-               <tr><th></th><th>Coords</th><th>Name</th><th>Mission</th><th>Tick</th><th>ETA</th><th>Amount</th></tr>
-       [% FOR m IN missions %]
-               <tr align="center" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]" onclick="$('#fleet[% m.id %]').toggle()">
-                       <td>
-               [% IF m.ships %]
-                               <b>&dArr;</b>
-               [% END %]
-                       </td><td>
-               [% IF m.planet %]
-                               <a href="[% c.uri_for('/stats/planet', m.planet) %]">[% m.coords %]</a>
-               [% END %]
-                       </td>
-                       <td>[% m.name %]</td>
-                       <td class="[% m.mission %]">[% m.mission %]</td>
-                       <td>[% m.tick %]</td>
-                       <td>[% m.eta %]</td>
-                       <td>[% m.amount %]</td>
-                       [% IF m.fleetcatch %]
-                       <td class="Hostile">FLEETCATCH!!</td>
-                       [% END %]
-               </tr>
-               [% IF m.ships %]
-               <tr id="fleet[% m.id %]" class="missionrow">
-                       <td>
-                       <td colspan="5"><table>
-                       [% FOR s IN m.ships %]
-                               <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
-                                       <td>[% s.ship %]</td><td>[% s.amount %]</td>
-                               </tr>
-                       [% END %]
-                       </table></td>
-               </tr>
-               [% END %]
-       [% END %]
-       </table>
-[% END %]
-
-<form action="[% c.uri_for('postcallupdate',call.id) %]" method="post">
-<fieldset> <legend>Call details, call# [% call.id %]</legend>
+<form action="[% c.uri_for('postcallupdate',call.call) %]" method="post">
+<fieldset> <legend>Call details, call# [% call.call %]</legend>
 <table>
 <tr>
 <td>
@@ -48,7 +9,7 @@
        <li>Current DC: [% call.dc %]</li>
        <li>Member: [% call.member %] </li>
        <li>SMS: [% call.sms %] </li>
-       <li>Coords: <a href="[% c.uri_for('/stats/planet', call.planet) %]">[% call.coords %]</a></li>
+       <li>Coords: <a href="[% c.uri_for('/stats/planet', call.pid) %]">[% call.coords %]</a></li>
        <li>Landing at tick: <br>
                <input type="text" name="tick" value="[% call.landing_tick %]">
                <input type="checkbox" name="ctick"></li>
 </ul>
 </td>
 <td>
-       <textarea rows="8" cols="40" name="info">[% call.info %]</textarea>
+       <textarea rows="8" cols="40" name="info">[% call.info | html %]</textarea>
 </td>
 <td><ul>
+       <li>Calc: <input type="text" name="calc" value="[% call.calc | html %]">
+               <input type="checkbox" name="ccalc"></li>
        <li>Change Notes? <input type="checkbox" name="cinfo"></li>
+       <li>Status: <select name="status">[% FOR s IN statuses %]
+               <option value="[% s.status %]"[% IF s.status == call.status %] selected[% END %]>[% s.status %]</option>
+               [% END %]</select><input type="checkbox" name="cstatus"></li>
        <li><input type="submit" name="cmd" value="Submit"></li>
        <li><input type="submit" name="cmd" value="Take call"></li>
-       <li><input type="submit" name="cmd" value="[% cover %] call"></li>
-       <li><input type="submit" name="cmd" value="[% ignore %] call"></li>
 </ul></td>
 </tr>
 </table>
 </fieldset>
 </form>
 <fieldset><legend>Attackers:</legend>
-<form action="[% c.uri_for('postattackerupdate',call.id) %]" method="post">
+<form action="[% c.uri_for('postattackerupdate',call.call) %]" method="post">
        <table>
        <tr>
        <th></th>
        </tr>
 [% FOR a IN attackers %]
        <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
-               <td><input type="button" onclick="$('#attacker[% a.id %]').toggle()" value="&dArr;" title="Show fleets"></td>
-               <td><a href="[% c.uri_for('/stats/planet',a.id) %]">[% a.coords %]</a></td>
+               <td><input type="button" onclick="$('#attacker[% a.inc %]').toggle()" value="&dArr;" title="Show fleets"></td>
+               <td><a href="[% c.uri_for('/stats/planet',a.pid) %]">[% a.coords %]</a></td>
                <td class="[% a.planet_status %]">[% a.planet_status %]</td>
                <td class="[% a.relationship %]">[% a.alliance %] ([% a.relationship %])</td>
                <td>[% a.race %]</td>
                <td>[% a.eta %]</td>
                <td>[% a.amount %]</td>
-               <td><input class="coord" type="text" name="shiptype:[% a.id %]" value="[% a.shiptype %]"></td>
+               <td><input class="coord" type="text" name="shiptype:[% a.inc %]" value="[% a.shiptype %]"></td>
                <td>[% a.fleet %]</td>
-               <td><input type="checkbox" name="change:[% a.id %]"></td>
+               <td><input type="checkbox" name="change:[% a.inc %]"></td>
        </tr>
-       <tr id="attacker[% a.id %]" class="missionrow">
+       <tr id="attacker[% a.inc %]" class="hidden">
        <td></td>
        <td colspan="8">
-       [% PROCESS missiontable missions=a.missions %]
+       [% PROCESS inc/missionlist.tt2 missions=a.missions %]
        </td></tr>
 [% END %]
        </table>
 </form>
 </fieldset>
 <fieldset><legend>Member fleet</legend>
-[% PROCESS missiontable missions=fleets %]
+[% PROCESS inc/missionlist.tt2 missions=fleets %]
 </fieldset>
 <fieldset><legend>Defenders</legend>
-[% PROCESS missiontable missions=defenders %]
+[% PROCESS inc/missionlist.tt2 missions=defenders %]
 </fieldset>
 
 <div>
 </fieldset>
 [% END %]
 
-<form action="[% c.uri_for('postcallcomment', call.id) %]" method="post"><fieldset class="forum-post"> <legend>New Reply</legend>
+<form action="[% c.uri_for('postcallcomment', call.call) %]" method="post"><fieldset class="forum-post"> <legend>New Reply</legend>
        <textarea rows="10" cols="60" name="message"></textarea>
        <input type="submit" value="Submit">
 </fieldset></form>
 </div>
-
-<script type="text/javascript">
-<!--
-$(document).ready(function(){
-       $('.missionrow').hide();
-});
--->
-</script>