Stefan.petrea has uploaded a new change for review. https://gerrit.wikimedia.org/r/79457
Change subject: Adding support page ...................................................................... Adding support page Moved the FAQ part from the about.html to a new support.html template. Added support controller. Change-Id: Ifc6e87854fd1529e110b1a3d3aea4dc445db0685 --- M wikimetrics/controllers/__init__.py A wikimetrics/controllers/support.py M wikimetrics/templates/about.html M wikimetrics/templates/layout.html A wikimetrics/templates/support.html 5 files changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/57/79457/1 diff --git a/wikimetrics/controllers/__init__.py b/wikimetrics/controllers/__init__.py index 9bdaf0c..c77090d 100644 --- a/wikimetrics/controllers/__init__.py +++ b/wikimetrics/controllers/__init__.py @@ -12,6 +12,7 @@ from authentication import * from metrics import * from cohorts import * +from support import * from reports import * from demo import * diff --git a/wikimetrics/controllers/support.py b/wikimetrics/controllers/support.py new file mode 100644 index 0000000..fc6819e --- /dev/null +++ b/wikimetrics/controllers/support.py @@ -0,0 +1,14 @@ +import json +import csv +from flask import url_for, flash, render_template, redirect, request +from ..configurables import app, db +from authentication import is_public + [email protected]('/support/') +@is_public +def support_index(): + """ + Renders a page with a list cohorts belonging to the currently logged in user. + If the user is an admin, she has the option of seeing other users' cohorts. + """ + return render_template('support.html') diff --git a/wikimetrics/templates/about.html b/wikimetrics/templates/about.html index b82f2e5..06736f8 100644 --- a/wikimetrics/templates/about.html +++ b/wikimetrics/templates/about.html @@ -17,6 +17,5 @@ <p>A report is a way for you to ask for the results of a metric applied to a cohort. The reports are run asynchronously on a Celery queue and the results show up when they're ready, on the <a href="{{url_for('reports_index')}}">reports page</a></p> </li> </ul> - <p>We are putting together an on-wiki FAQ, if you have any questions before that please email <a href="mailto:[email protected]">the analytics team</a>.</p> </div> {% endblock %} diff --git a/wikimetrics/templates/layout.html b/wikimetrics/templates/layout.html index 35db5c8..ccbfb4f 100644 --- a/wikimetrics/templates/layout.html +++ b/wikimetrics/templates/layout.html @@ -23,6 +23,7 @@ <li><a href="{{ url_for('cohorts_index') }}">Cohorts</a></li> <li><a href="{{ url_for('metrics_index') }}">Metrics</a></li> <li><a href="{{ url_for('reports_index') }}">Reports</a></li> + <li><a href="{{ url_for('support_index') }}">Support</a></li> <!--<li><a href="#">About</a></li>--> <!--<li><a href="#">Contact</a></li>--> <li class="pull-right"> diff --git a/wikimetrics/templates/support.html b/wikimetrics/templates/support.html new file mode 100644 index 0000000..593ee36 --- /dev/null +++ b/wikimetrics/templates/support.html @@ -0,0 +1,4 @@ +{% extends "layout.html" %} +{% block body %} + <p>We are putting together an on-wiki FAQ, if you have any questions before that please email <a href="mailto:[email protected]">the analytics team</a>.</p> +{% endblock %} -- To view, visit https://gerrit.wikimedia.org/r/79457 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc6e87854fd1529e110b1a3d3aea4dc445db0685 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Stefan.petrea <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
