[odrs-web/production] trivial: Show links to the app reviews in the stats page
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/production] trivial: Show links to the app reviews in the stats page
- Date: Mon, 26 Sep 2016 09:46:45 +0000 (UTC)
commit ca7de4f2a8266c028e06727b6d3c8a803fb1568d
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]