From 292993ed5132a7279317ff98706e71a776a274e3 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 27 Jun 2014 12:11:49 +0200 Subject: [PATCH] take the first user period for tabs --- teleforma/templates/telemeta/base.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/teleforma/templates/telemeta/base.html b/teleforma/templates/telemeta/base.html index 9158d3b9..ed295a01 100644 --- a/teleforma/templates/telemeta/base.html +++ b/teleforma/templates/telemeta/base.html @@ -112,16 +112,14 @@ alt="logo" />
  • {% trans "Annals" %}
  • {% if periods|length == 1 %} - {% with periods.0 as period %} -
  •  {% trans "Scripts" %}  - {% if user.is_staff or user.correctors.all %}{% untreated_scripts_count user period %} - {% else %}{% treated_scripts_count user period %}{% endif %} +
  •  {% trans "Scripts" %}  + {% if user.is_staff or user.correctors.all %}{% untreated_scripts_count user periods.0 %} + {% else %}{% treated_scripts_count user periods.0 %}{% endif %}
  • - {% endwith %} {% else %}
  •  {% trans "Scripts" %}  - {% if user.is_staff or user.correctors.all %}{% untreated_scripts_count user period %} - {% else %}{% treated_scripts_count user period %}{% endif %} + {% if user.is_staff or user.correctors.all %}{% untreated_scripts_count user periods.0 %} + {% else %}{% treated_scripts_count user periods.0 %}{% endif %}