commit 5871fa62a0e594eddb34daef4d96a1d6a3a685ef
Author: Iain R. Learmonth <i...@fsfe.org>
Date:   Sun Nov 26 19:00:53 2017 +0000

    Allows country based sorting in search view (Fixes: #24411)
---
 templates/search/do.html | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/templates/search/do.html b/templates/search/do.html
index 3935182..a30fe96 100644
--- a/templates/search/do.html
+++ b/templates/search/do.html
@@ -92,11 +92,13 @@
             <% if (relay.get('running') === false) { %><s><% } %><%= 
relay.get('uptime_hr') %><% if (relay.get('running') === false) { %></s><% } %>
             </span>
             </td>
-                       <td>
             <% if ( relay.get('country')) { %>
-            <img class="tip inline country" title="<%= 
relay.get('countryname') %>" alt="<%= relay.get('countryname') %>" 
src="img/cc/<%= relay.get('country') %>.png"/>
+              <td data-order="<%= relay.get('countryname') %>">
+                <img class="tip inline country" title="<%= 
relay.get('countryname') %>" alt="<%= relay.get('countryname') %>" 
src="img/cc/<%= relay.get('country') %>.png"/>
+              </td>
+            <% } else { %>
+              <td data-order="Unknown"><img class="tip inline country" 
title="Unknown" alt="Unknown" src="img/cc/xz.png"></td>
             <% } %>
-            </td>
                        <td><%= relay.get('or_address') %></td>
                        <td class="flags-cell">
             <% _.each(relay.get('flags'), function(flag) { %><img class="tip 
flags" src="img/flags/<%= flag[1] %>.png" alt="<%= flag[0] %>" title="<%= 
flag[0] %><br /><%= flag[2] %>"/><% }); %>



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to