commit 223aec37d3b96556da949bf18d72298aa3c9b675 Author: Iain R. Learmonth irl@debian.org Date: Mon Jun 20 23:37:43 2016 +0100
Adds a title to the search results page
* Displays the search query for searches * Displays "Top 10 Relays by Consensus Weight" for the top 10 page to avoid confusion as to why the top 10 are not sorted by bandwidth (#5430) --- js/router.js | 2 ++ templates/search/do.html | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/js/router.js b/js/router.js index f79e933..c5ce942 100644 --- a/js/router.js +++ b/js/router.js @@ -71,6 +71,7 @@ define([ $("#content").show(); doSearchView.relays = doSearchView.collection.models; doSearchView.render(query); + $("#search-title").text(query); $("#loading").hide(); },
@@ -95,6 +96,7 @@ define([ $("#content").show(); doSearchView.relays = doSearchView.collection.models; doSearchView.render(""); + $("#search-title").text("Top 10 Relays by Consensus Weight"); $("#loading").hide(); },
diff --git a/templates/search/do.html b/templates/search/do.html index dfb0fc1..2f3b0b2 100644 --- a/templates/search/do.html +++ b/templates/search/do.html @@ -28,6 +28,8 @@ </div> <% } %> <% } else { %> + +<h1 id="search-title"></h1> <table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped" id="torstatus_results"> <thead> <tr>