]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/damage_graph.mako
Merge branch 'nvd3' of github.com:antzucaro/XonStat into nvd3
[xonotic/xonstat.git] / xonstat / templates / damage_graph.mako
1 <%def name="damage_graph(recent_weapons)">
2 ### splash weapon info is available
3 % if 'rocketlauncher' in recent_weapons or 'grenadelauncher' in recent_weapons or 'electro' in recent_weapons or 'crylink' in recent_weapons or 'laser' in recent_weapons:
4 <div class="row">
5   <div class="span12">
6     <h3>Damage Efficiency</h3>
7
8     <div id="dmg-graph" class="flot" style="width:95%; height:200px;">
9     </div>
10
11     <div class="weapon-nav damage-nav">
12       <ul>
13       % for weapon in ['rocketlauncher', 'grenadelauncher', 'electro', 'crylink', 'hagar', 'laser']:
14         % if weapon in recent_weapons:
15         <li>
16         ### the rocketlauncher is underscored first by default (until user selection)
17         % if weapon == 'rocketlauncher':
18           <div class="dmg-weap weapon-active">
19         % else:
20           <div class="dmg-weap">
21         % endif
22             <span class="sprite sprite-${weapon}"></span>
23             <p><small>${weapon}</small></p>
24             <a href="${request.route_url('player_damage', id=player.player_id, _query={'weapon':weapon})}" title="Show ${weapon} efficiency"></a>
25           </div>
26         </li>
27         % endif
28       % endfor
29       </ul>
30     </div>
31
32   </div> <!-- END SPAN12 -->
33 </div> <!-- END ROW -->
34 % endif
35 </%def>