Commit 0b128b20 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

display warning message when there are no stats

parent c8241fcf1a24
......@@ -68,6 +68,9 @@ msgstr ""
msgid "New StatPeriod"
msgstr ""
msgid "No stats yet"
msgstr ""
msgid "Number of results :"
msgstr ""
......
......@@ -63,6 +63,9 @@ msgstr ""
msgid "New StatPeriod"
msgstr ""
msgid "No stats yet"
msgstr ""
msgid "Number of results :"
msgstr ""
......
......@@ -63,6 +63,9 @@ msgstr ""
msgid "New StatPeriod"
msgstr ""
msgid "No stats yet"
msgstr ""
msgid "Number of results :"
msgstr ""
......
......@@ -63,6 +63,9 @@ msgstr "Nouvelle statistique de visites"
msgid "New StatPeriod"
msgstr "Nouvelle période de statistiques"
msgid "No stats yet"
msgstr "Pas encore de données sur les visites"
msgid "Number of results :"
msgstr "Nombre de résultats :"
......
......@@ -109,9 +109,14 @@ class StatGraph(EntityView):
'(Any START, HITS WHERE H count HITS, H hit_type "normal", H period P, P start START, P stop STOP, H stats_about E, E eid %%(e)s %s)'
' UNION '
'(Any START, 0 WHERE P is StatPeriod, P start START, P stop STOP, NOT EXISTS(H period P, H stats_about E, E eid %%(e)s) %s))')
plot_displayed = False
for constraint, label in ((' HAVING STOP-START <= 20', _('Daily')),
(' HAVING STOP-START >= 20', _('Monthly'))):
self.w(u'<h2>%s</h2>' % label)
rset = self._cw.execute(rql % (constraint, constraint), {'e':entity.eid})
self.w(self._cw.view('plot', rset, 'null'))
if rset:
self.w(u'<h2>%s</h2>' % label)
self.w(self._cw.view('plot', rset, 'null'))
plot_displayed = True
if not plot_display:
self.w(u'<h2>%s<h2>' % _('No stats yet'))
self.w(u'</div>')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment