]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/map_info.mako
dos2unix file conversions for everything
[xonotic/xonstat.git] / xonstat / templates / map_info.mako
1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
3 <%namespace file="navlinks.mako" import="navlinks" />
4
5 <%block name="navigation">
6 ${nav.nav('maps')}
7 </%block>
8
9 <%block name="title">
10 % if gmap:
11 Map Information
12 % endif
13
14 ${parent.title()}
15 </%block>
16
17
18 % if gmap is None:
19 <h2>Sorry, that map wasn't found!</h2>
20
21 % else:
22 <h2>${gmap.name}</h2>
23 <p>
24   Added on ${gmap.create_dt.strftime('%m/%d/%Y at %H:%M')}
25 </p>
26 <div class="row">
27   <div class="span4">
28     <h3>Top Scoring Players</h3>
29     <table class="table table-bordered table-condensed">
30       <thead>
31         <tr>
32           <th>#</th>
33           <th>Nick</th>
34           <th>Score</th>
35         </tr>
36       </thead>
37       <tbody>
38         <% i = 1 %>
39         % for (score_player_id, score_nick, score_value) in top_scorers:
40         <tr>
41           <td>${i}</td>
42           % if score_player_id != '-':
43           <td><a href="${request.route_url('player_info', id=score_player_id)}" title="Go to the player info page for this player">${score_nick|n}</a></td>
44           % else:
45           <td>${score_nick}</td>
46           % endif
47           <td>${score_value}</td>
48         </tr>
49         <% i = i+1 %>
50         % endfor
51         </tbody>
52     </table>
53   </div>
54
55
56 <div class="span4">
57   <h3>Most Active Players</h3>
58   <table class="table table-bordered table-condensed">
59     <thead>
60       <tr>
61         <th>#</th>
62         <th>Nick</th>
63         <th>Playing Time</th>
64       </tr>
65     </thead>
66     <tbody>
67     <% i = 1 %>
68     % for (player_id, nick, alivetime) in top_players:
69       <tr>
70         <td>${i}</td>
71         % if player_id != '-':
72         <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
73         % else:
74         <td>${nick}</td>
75         % endif
76         <td>${alivetime}</td>
77       </tr>
78       <% i = i+1 %>
79     % endfor
80     </tbody>
81   </table>
82 </div>
83
84
85 <div class="span4">
86   <h3>Most Active Servers</h3>
87   <table class="table table-bordered table-condensed">
88     <thead>
89       <tr>
90         <th>#</th>
91         <th>Name</th>
92         <th>Times Played</th>
93       </tr>
94     </thead>
95     <tbody>
96     <% i = 1 %>
97     % for (server_id, name, times_played) in top_servers:
98       <tr>
99         <td>${i}</td>
100         <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for this server">${name}</a></td>
101         <td>${times_played}</td>
102       </tr>
103       <% i = i+1 %>
104     % endfor
105     </tbody>
106 </table>
107 </div>
108 </div> <!-- /row -->
109
110
111 <div class="row">
112   <div class="span12">
113     <h3>Recent Games</h3>
114     <table class="table table-bordered table-condensed">
115       <thead>
116         <tr>
117           <th></th>
118           <th>Type</th>
119           <th>Time</th>
120           <th>Winner</th>
121         </tr>
122       </thead>
123       <tbody>
124         % for (game, srv, map, pgstat) in recent_games:
125         % if game != '-':
126         <tr>
127           <td><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=game.game_id)}" title="View detailed information about this game">View</a></td>
128           <td class="gt_icon"><img title="${game.game_type_cd}" src="/static/images/icons/24x24/${game.game_type_cd}.png" alt="${game.game_type_cd}" /></td>
129           <td>${game.start_dt.strftime('%m/%d/%Y %H:%M')}</td>
130           <td>
131             % if pgstat.player_id > 2:
132             <a href="${request.route_url('player_info', id=pgstat.player_id)}" title="Go to the player info page for this player">${pgstat.nick_html_colors()|n}</a>
133           </td>
134             % else:
135             ${pgstat.nick_html_colors()|n}
136           </td>
137             % endif
138         </tr>
139         % else:
140         <tr>
141           <td>-</td>
142           <td>-</td>
143           <td>-</td>
144           <td>-</td>
145         </tr>
146         % endif
147     % endfor
148         </tbody>
149     </table>
150   </div>
151 </div>
152
153
154 % endif