[damned-lies] Remove new action form when module is archived



commit f268851b44f7982f5e0b059fd3206e4a8e6baf34
Author: Claude Paroz <claude 2xlibre net>
Date:   Tue Feb 25 09:23:06 2014 +0100

    Remove new action form when module is archived

 templates/vertimus/vertimus_detail.html |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index b92e01d..fb57be2 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -219,7 +219,7 @@ $(document).ready(function() {
 
 <hr class="top_shadow">
 
-{% if level == 0 %}
+{% if level == 0 and not module.archived %}
   <h2>{% trans "New Action" %}</h2>
 
   {% if action_form %}
@@ -252,6 +252,10 @@ $(document).ready(function() {
     {% url 'login' as login_url %}
     {% blocktrans with team_name=language.team.get_description %}You need <a href="{{ login_url }}">to be 
authenticated</a> and member of the {{ team_name }} team.{% endblocktrans %}
   {% endif %}
+{% else %}
+  {% if module.archived %}
+    <p class="errornote">{% trans "This module has been archived. It is only kept for statistical purposes. 
Please don't translate it any more." %}</p>
+  {% endif %}
 {% endif %}
 {% else %}
   <p><img src="{{ STATIC_URL }}img/warn.png"/>&nbsp;{% trans "This team is not using the translation 
workflow." %}</p>


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