]> ruin.nu Git - ndwebbie.git/blobdiff - root/src/members/index.tt2
Converted main page
[ndwebbie.git] / root / src / members / index.tt2
diff --git a/root/src/members/index.tt2 b/root/src/members/index.tt2
new file mode 100644 (file)
index 0000000..05e56d5
--- /dev/null
@@ -0,0 +1,148 @@
+[% META title = 'Main' %]
+<div class="leftinfo">
+<table class="boards">
+[% FOR a IN announcements %]
+       <tr class="[% loop.count % 2 ? 'even' : 'odd' %]">
+               <td align="center">[% a.unread %]</td>
+               <td align="center">[% a.posts %]</td>
+               <td[% IF a.sticky %] class="sticky"[% END %]><a href="[% c.uri_for('/forum/thread',a.ftid) %]">&nbsp;[% a.subject %]&nbsp;</a></td>
+               <td align="left">[% a.posting_date %]</td>
+               <td align="center">[% a.username %]</td>
+               <td align="left">[% a.last_post %]</td>
+       </tr>
+[% END %]
+</table>
+</div>
+[% IF c.user.planet %]
+<img class="graph" src="[% c.uri_for('/graphs/planetvsnd',c.user.planet,STICK) %]" alt="Your planet vs ND avg" height="300" width="500">
+[% END %]
+<div class="clear"></div>
+
+[% IF c.user.planet %]
+<table class="stats">
+       <tr align="center"><th colspan="4">Rank</th>
+       </tr>
+       <tr><th>Size</th><th>Score</th><th>Value</th><th>XP</th><th>X</th><th>Y</th><th>Z</th><th>Planet</th><th>Race</th><th>Size</th><th>Score</th><th>Value</th>
+               <th>XP</th>
+       </tr>
+       <tr class="odd">
+               [% p.sizerankimg = (p.sizerank_gain_day == 0 ? 'stay' : (p.sizerank_gain_day < 0 ? 'up' : 'down')) %]
+               <td title="[% p.sizerank_gain_day %] Today | [% p.sizerank_gain %] Tick">[% p.sizerank %] <img src="/static/images/[% p.sizerankimg %].png" alt="[% p.sizerankimg %]"> </td>
+               [% p.scorerankimg = (p.scorerank_gain_day == 0 ? 'stay' : (p.scorerank_gain_day < 0 ? 'up' : 'down')) %]
+               <td title="[% p.scorerank_gain_day %] Today | [% p.scorerank_gain %] Tick">[% p.scorerank %] <img src="/static/images/[% p.scorerankimg %].png" alt="[% p.scorerankimg %]"> </td>
+               [% p.valuerankimg = (p.valuerank_gain_day == 0 ? 'stay' : (p.valuerank_gain_day < 0 ? 'up' : 'down')) %]
+               <td title="[% p.valuerank_gain_day %] Today | [% p.valuerank_gain %] Tick">[% p.valuerank %] <img src="/static/images/[% p.valuerankimg %].png" alt="[% p.valuerankimg %]"> </td>
+               [% p.xprankimg = (p.xprank_gain_day == 0 ? 'stay' : (p.xprank_gain_day < 0 ? 'up' : 'down')) %]
+               <td title="[% p.xprank_gain_day %] Today | [% p.xprank_gain %] Tick">[% p.xprank %] <img src="/static/images/[% p.xprankimg %].png" alt="[% p.xprankimg %]"> </td>
+
+               <td>[% p.x %] </td>
+               <td><a href="[% c.uri_for('/stats','galaxy',p.x,p.y) %]">[% p.y %]</a></td>
+               <td><a href="[% c.uri_for('/stats','planet',p.id) %]">[% p.z %]</a></td>
+               <td align="center">[% p.ruler %] <b>OF</b> [% p.planet %]</td>
+               <td align="center">[% p.race %]</td>
+               [% p.sizeimg = (p.size_gain_day == 0 ? 'stay' : (p.size_gain_day > 0 ? 'up' : 'down')) %]
+               <td title="[% p.size_gain_day %] Today | [% p.size_gain %] Tick">[% comma(p.size) %] <img src="/static/images/[% p.sizeimg %].png" alt="[% p.sizeimg %]"> </td>
+               [% p.scoreimg = (p.score_gain_day == 0 ? 'stay' : (p.score_gain_day > 0 ? 'up' : 'down')) %]
+               <td title="[% comma(p.score_gain_day) %] Today | [% comma(p.score_gain) %] Tick">[% comma(p.score) %] <img src="/static/images/[% p.scoreimg %].png" alt="[% p.scoreimg %]"> </td>
+               [% p.valueimg = (p.value_gain_day == 0 ? 'stay' : (p.value_gain_day > 0 ? 'up' : 'down')) %]
+               <td title="[% comma(p.value_gain_day) %] Today | [% comma(p.value_gain) %] Tick">[% comma(p.value) %] <img src="/static/images/[% p.valueimg %].png" alt="[% p.valueimg %]"> </td>
+               [% p.xpimg = (p.xp_gain_day == 0 ? 'stay' : (p.xp_gain_day > 0 ? 'up' : 'down')) %]
+               <td title="[% comma(p.xp_gain_day) %] Today | [% comma(p.xp_gain) %] Tick">[% comma(p.xp) %] <img src="/static/images/[% p.xpimg %].png" alt="[% p.xpimg %]"> </td>
+       </tr>
+</table>
+[% END %]
+[% IF calls %]
+<table>
+       <tr><th>Call</th><th>DC</th><th>Landing tick</th><th>Races</th><th>Amount</th><th>Shiptypes</th><th>Current eta</th><th>Inital eta</th><th>Attackers</th></tr>
+       [% FOR call IN calls %]
+       <tr align="center" class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
+               <td class="[% UNLESS call.dc %]Hostile[%END%]"><a href="[% c.uri_for('/calls/edit',call.id) %]">[% call.id %]</a></td>
+               <td>[% call.dc %]</td>
+               <td>[% call.landing_tick %]</td>
+               <td>[% call.race.unique.join('/') %]</td>
+               <td>[% call.amount.join('/') %]</td>
+               <td>[% call.shiptype.unique.join('/') | html %]</td>
+               <td>[% call.curreta %]</td>
+               <td>[% call.eta.unique.join('/') %]</td>
+               <td>[% FOR a IN call.attackers %]
+                       <a href="[% c.uri_for('/stats/find',a) %]">[% a %]</a>
+                       [% UNLESS loop.last %]/[%END%]
+               [%END%]</td>
+       </tr>
+       [% END %]
+</table>
+[% END %]
+<div class="leftinfo">
+<fieldset class="forum-post"> <legend>Account details</legend>
+       <ul>
+       <li> ND rank (by score): [% u.rank %] </li>
+       <li> Defense points: [% u.defense_points %] </li>
+       <li> Attack points: [% u.attack_points %] </li>
+       <li> Scan points: [% u.scan_points %] </li>
+       <li> Humor points: [% u.humor_points %] </li>
+       <li> Total points: [% u.total_points %] </li>
+       <li> Member of the following groups: [% groups.join(',') %]</li>
+       </ul>
+</fieldset>
+
+<fieldset class="forum-post"> <legend>Fleets</legend>
+<form action="[% c.uri_for('postfleetsupdates') %]" method="post">
+       <table>
+       <tr><td></td><th>Target</th><th>Mission</th><th>Amount</th><th>Landing Tick</th><th>Back home</th><th>change?</th></tr>
+[% FOR f IN fleets %]
+       <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
+               <td><input type="button" onclick="$('#fleet[% f.id %]').toggle()" value="&dArr;" title="Show fleets"></td>
+               <td>[% IF f.target %]<a href="[% c.uri_for('/stats/planet',f.target) %]">[% f.coords %]</a>[% END %]</td>
+               <td>[% f.mission %]</td>
+               <td>[% f.amount %]</td><td>[% f.tick %]</td>
+               <td>[% IF f.back %]<input style="width:5em" type="text" name="back:[% f.id %]" value="[% f.back %]">[% END %]</td>
+               <td>[% IF f.back %]<input type="checkbox" name="change:[% f.id %]">[% END %]</td>
+       </tr>
+       <tr id="fleet[% f.id %]" class="hidden">
+               <td>
+               <td colspan="5"><table>
+       [% FOR s IN f.ships %]
+                       <tr class="[% loop.count % 2 == 0 ? 'even' : 'odd' %]">
+                               <td>[% s.ship %]</td><td>[% s.amount %]</td>
+                       </tr>
+       [% END %]
+                       </table></td>
+       </tr>
+[% END %]
+       </table>
+       <p>
+               <input type="submit" name="cmd" value="Change Fleets">
+               <input type="submit" name="cmd" value="Recall Fleets">
+       </p>
+</form>
+</fieldset>
+<form action="[% c.uri_for('posthostupdate') %]" method="post">
+<fieldset class="forum-post"> <legend>Hostname</legend>
+       <p>Hostname:
+       <input style="width:25em" type="text" name="hostname" value="[% u.hostmask %]">
+       <input type="submit" value="Submit">
+       </p>
+</fieldset>
+</form>
+<form action="[% c.uri_for('postsmsupdate') %]" method="post">
+<fieldset class="forum-post"> <legend>SMS</legend>
+       <p>Number:
+       <input type="text" name="sms" value="[% u.sms %]">
+       <input type="submit" value="Submit">
+       </p>
+</fieldset>
+</form>
+[% IF c.user.planet %]
+<form action="[% c.uri_for('postfleetupdate') %]" method="post">
+<fieldset class="forum-post"> <legend>Fleet</legend>
+       <p>Paste your total fleet from ships section on overview here (do it daily to see the menus):</p>
+       <textarea rows="15" cols="50" name="fleet"></textarea>
+       <br><input type="submit" value="Submit">
+</fieldset>
+</form>
+[% END %]
+</div>
+[% IF c.user.planet %]
+<img class="graph" src="[% c.uri_for('/graphs/planetstats',c.user.planet,STICK) %]" alt="stats for your planet" height="300" width="500">
+<img class="graph" src="[% c.uri_for('/graphs/planetranks',c.user.planet,STICK) %]" alt="ranks for your planet" height="300" width="500">
+[% END %]