]> git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/player_versus.mako
Initial version of the "versus" view between two players.
[xonotic/xonstat.git] / xonstat / templates / player_versus.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('players')}
7 </%block>
8
9 <div class="row">
10   <div class="small-5 columns text-right">
11     <h3>${p1.nick_html_colors()|n}</h3>
12   </div>
13
14   <div class="small-2 columns text-center">
15     <h3>vs</h3>
16   </div>
17
18   <div class="small-5 columns text-left">
19     <h3>${p2.nick_html_colors()|n}</h3>
20   </div>
21 </div>
22
23 <div class="row">
24   <div class="small-5 columns text-right">
25     <h3>${p1_wins}</h3>
26   </div>
27
28   <div class="small-2 columns text-center">
29     <h3>wins</h3>
30   </div>
31
32   <div class="small-5 columns text-left">
33     <h3>${p2_wins}</h3>
34   </div>
35 </div>
36
37 % if len(recent_games) > 0:
38 <div class="row">
39   <div class="small-12 columns">
40     <h5>Recent Games</h5>
41     <table class="table table-hover table-condensed">
42       <thead>
43         <tr>
44           <th class="small-1 text-center"></th>
45           <th class="small-1">Type</th>
46           <th class="show-for-medium-up small-3">Server</th>
47           <th class="show-for-medium-up small-2">Map</th>
48           <th class="show-for-large-up small-2">Time</th>
49           <th class="small-3">Winner</th>
50         </tr>
51       </thead>
52       <tbody>
53       % for rg in recent_games:
54         <tr>
55           <td class="text-center"><a class="button tiny" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
56           <td class="text-center"><span class="sprite sprite-${rg.game_type_cd}" alt="${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
57           <td class="show-for-medium-up no-stretch"><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
58           <td class="show-for-medium-up"><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the map detail page for this map">${rg.map_name}</a></td>
59           <td class="show-for-large-up"><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
60           <td class="no-stretch">
61             % if rg.player_id > 2:
62             <a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a></td>
63             % else:
64             ${rg.nick_html_colors|n}</td>
65             % endif
66         </tr>
67         % endfor
68         </tbody>
69     </table>
70   </div>
71 </div>
72 % endif