[odrs-web] trivial: Show links to the app reviews in the stats page



commit 87b274d35a4f1d30f54823a8a799a758f6eae2c1
Author: Richard Hughes <richard hughsie com>
Date:   Sat Sep 24 09:27:51 2016 +0100

    trivial: Show links to the app reviews in the stats page

 admin.py             |    4 ++--
 templates/stats.html |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/admin.py b/admin.py
index c5cd2c5..b5c5bc6 100644
--- a/admin.py
+++ b/admin.py
@@ -135,12 +135,12 @@ def stats():
     # popularity view
     results_viewed = []
     for review in db.get_analytics_fetch():
-        results_viewed.append((review[0].replace('.desktop', ''), review[1]))
+        results_viewed.append((review[0], review[1]))
 
     # popularity reviews
     results_submitted = []
     for review in db.get_stats_fetch('reviewed'):
-        results_submitted.append((review[0].replace('.desktop', ''), review[1]))
+        results_submitted.append((review[0], review[1]))
     return render_template('stats.html',
                            results_stats=results_stats,
                            results_viewed=results_viewed,
diff --git a/templates/stats.html b/templates/stats.html
index 5cfedac..2b85ca0 100644
--- a/templates/stats.html
+++ b/templates/stats.html
@@ -16,14 +16,14 @@
 <h2>Popularity By Page View</h2>
 <ol>
 {% for name, cnt in results_viewed %}
-  <li>{{ name }} ({{ cnt }})</li>
+  <li>{{ name.replace('.desktop', '') }} ({{ cnt }})</li>
 {% endfor %}
 </ol>
 
 <h2>Popularity By Submitted Reviews</h2>
 <ol>
 {% for name, cnt in results_submitted %}
-  <li>{{ name }} ({{ cnt }})</li>
+  <li>{{ name.replace('.desktop', '') }} (<a href="admin/show/app/{{ name }}">{{ cnt }}</a>)</li>
 {% endfor %}
 </ol>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]