]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/player_versus.mako
9313d5492298e4477a86180feb57035fa95ef6eb
[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 <%block name="title">
10   Player Comparison
11 </%block>
12
13 % if p1 is not None and p2 is not None:
14 <div class="row">
15   <div class="small-5 columns text-right">
16     <h3>${p1.nick_html_colors()|n}</h3>
17   </div>
18
19   <div class="small-2 columns text-center">
20     <h3>vs</h3>
21   </div>
22
23   <div class="small-5 columns text-left">
24     <h3>${p2.nick_html_colors()|n}</h3>
25   </div>
26 </div>
27
28 <div class="row">
29   <div class="small-5 columns text-right">
30     <h3>${p1_wins}</h3>
31   </div>
32
33   <div class="small-2 columns text-center">
34     <h3>wins</h3>
35   </div>
36
37   <div class="small-5 columns text-left">
38     <h3>${p2_wins}</h3>
39   </div>
40 </div>
41
42 % if len(recent_games) > 0:
43 <div class="row">
44   <div class="small-12 columns">
45     <h5>Recent Games</h5>
46     <table class="table table-hover table-condensed">
47       <thead>
48         <tr>
49           <th class="small-1 text-center"></th>
50           <th class="small-1">Type</th>
51           <th class="show-for-medium-up small-3">Server</th>
52           <th class="show-for-medium-up small-2">Map</th>
53           <th class="show-for-large-up small-2">Time</th>
54           <th class="small-3">Winner</th>
55         </tr>
56       </thead>
57       <tbody>
58       % for rg in recent_games:
59         <tr>
60           <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>
61           <td class="text-center"><span class="sprite sprite-${rg.game_type_cd}" alt="${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
62           <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>
63           <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>
64           <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>
65           <td class="no-stretch">
66             % if rg.player_id > 2:
67             <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>
68             % else:
69             ${rg.nick_html_colors|n}</td>
70             % endif
71         </tr>
72         % endfor
73         </tbody>
74     </table>
75   </div>
76 </div>
77 % endif
78
79 % else:
80
81 <div class="row">
82   <div class="small-12 large-8 large-offset-2 columns">
83
84     <form class="form-horizontal">
85       <fieldset>
86
87         <div class="row">
88           <div class="small-5 columns">
89             <div class="control-group">
90               <label class="control-label">Player #1</label>
91               <div class="controls">
92                 <input id="p1" name="p1" type="text" class="input-xlarge">
93               </div>
94             </div>
95           </div>
96
97           <div class="small-2 columns text-center">
98             <h3>vs</h3>
99           </div>
100
101           <div class="small-5 columns">
102             <div class="control-group">
103               <label class="control-label">Player #2</label>
104               <div class="controls">
105                 <input id="p2" name="p2" type="text" class="input-xlarge">
106               </div>
107             </div>
108           </div>
109
110         </div>
111
112         <!-- Button -->
113         <div class="control-group">
114           <label class="control-label"></label>
115           <div class="controls">
116             <button id="submit" name="submit" type="submit" class="btn btn-primary">Compare!</button>
117           </div>
118         </div>
119
120       </fieldset>
121     </form>
122
123   </div>
124 </div>
125
126 % endif