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