]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Show blanks along the diagonal.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 28 Oct 2017 14:18:09 +0000 (10:18 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 28 Oct 2017 14:18:09 +0000 (10:18 -0400)
xonstat/templates/frag_matrix.mako

index 47663c2bbed6b9295e89aaf3ed1da072f22ff0eb..db08a059d52dd50cd153b9fe9da6f9e81133d1a2 100644 (file)
@@ -6,31 +6,35 @@
   <thead>
     <th></th>
     % for pgstat in pgstats:
-    <th><span class="rotated">${pgstat.nick_html_colors()|n}</span></th>
+      <th><span class="rotated">${pgstat.nick_html_colors()|n}</span></th>
     % endfor
   </thead>
 
   % for fragger in pgstats:
-  <tr>
-    <td class="bg">${fragger.nick_html_colors()|n}</td>
-    % for victim in pgstats:
-    <%
-      pgfm = matrix_by_pgstat_id.get(fragger.player_game_stat_id)
-
-      victim_pgfm = matrix_by_pgstat_id.get(victim.player_game_stat_id)
-      if victim_pgfm:
-        victim_index = str(victim_pgfm.player_index)
-      else:
-        victim_index = "-1"
-    %>
-
-    % if pgfm:
-    <td>${pgfm.matrix.get(victim_index, 0)}</td>
-    % else:
-    <td>0</td>
-    % endif
-    % endfor
-  </tr>
+    <tr>
+      <td class="bg">${fragger.nick_html_colors()|n}</td>
+      % for victim in pgstats:
+        % if fragger.player_game_stat_id == victim.player_game_stat_id:
+            <td class="bg"></td>
+        % else:
+          <%
+            pgfm = matrix_by_pgstat_id.get(fragger.player_game_stat_id)
+  
+            victim_pgfm = matrix_by_pgstat_id.get(victim.player_game_stat_id)
+            if victim_pgfm:
+              victim_index = str(victim_pgfm.player_index)
+            else:
+              victim_index = "-1"
+          %>
+  
+          % if pgfm:
+            <td>${pgfm.matrix.get(victim_index, 0)}</td>
+          % else:
+            <td>0</td>
+          % endif
+        % endif
+      % endfor
+    </tr>
   % endfor
 </table>