]> git.parisson.com Git - teleforma.git/commitdiff
no document info
authoryomguy <yomguy@parisson.com>
Wed, 20 Mar 2013 10:10:17 +0000 (11:10 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 20 Mar 2013 10:10:17 +0000 (11:10 +0100)
teleforma/templates/teleforma/annals.html

index 63c3268462d6db91e29eeff2f4bfcb3c975deb35..1a9f7da3b86c1dc97b54d9fda51c053584a54d24 100644 (file)
 </div>
 
 {% if user.is_superuser %}
-<div class="module">
-<h3><img src="{{ STATIC_URL }}telemeta/images/module_world.png" alt="IEJ" style="vertical-align:middle" /> {% trans "IEJ" %}</h3>
-<div style="background: white;">
-<ul>
-{% block iej %}
-{% for iej in iejs %}
-<li><a href="{% url teleforma-annals-iej iej.id %}">{{ iej.name|lower|capfirst }}</a></li>
-{% endfor %}
-{% endblock iej %}
-</ul>
-</div>
+       <div class="module">
+       <h3><img src="{{ STATIC_URL }}telemeta/images/module_world.png" alt="IEJ" style="vertical-align:middle" /> {% trans "IEJ" %}</h3>
+       <div style="background: white;">
+               <ul>
+               {% block iej %}
+               {% for iej in iejs %}
+               <li><a href="{% url teleforma-annals-iej iej.id %}">{{ iej.name|lower|capfirst }}</a></li>
+               {% endfor %}
+               {% endblock iej %}
+               </ul>
+       </div>
 </div>
 {% endif %}
 
 
 <div class="desk_messages">
 
-{% for course, iejs in object_list.items %}
-
-<div class="course_title">{{ course.title }}</div>
-
-<div class="course_content">
-
-{% for iej, years in iejs.items %}
-
-<div class="course_subtitle">
-<h3><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {{ iej }}</h3>
-</div>
-
-{% for year, docs in years.items %}
-
-<span class="doc_type_title">{{ year }}</span>
-<table class="listing" width="100%">
-    <tbody>
-        {% for doc in docs %}
-        <tr>
-        <td {% if forloop.first %}class="border-top"{% endif %} width="90%">{% if doc.file %}<a href="{% url teleforma-document-view doc.id %}" target="_blank" title="{% trans "View" %}"><img src="{{ STATIC_URL }}/teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
-        <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">{% if doc.file %}<a href="{% url teleforma-document-download doc.id %}"><img src="{{ STATIC_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
-        </tr>
-       {% endfor %}
-    </tbody>
-</table>
-
-{% endfor %}
-{% endfor %}
-
-</div>
-
-{% endfor %}
-
+       {% if not object_list.items %}
+               {% trans "No document" %}
+       {% else %}
+
+       {% for course, iejs in object_list.items %}
+
+                       <div class="course_title">{{ course.title }}</div>
+                       <div class="course_content">
+
+                       {% for iej, years in iejs.items %}
+
+                               <div class="course_subtitle">
+                               <h3><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {{ iej }}</h3>
+                               </div>
+
+                               {% for year, docs in years.items %}
+                                       <span class="doc_type_title">{{ year }}</span>
+                                       <table class="listing" width="100%">
+                                           <tbody>
+                                               {% for doc in docs %}
+                                               <tr>
+                                               <td {% if forloop.first %}class="border-top"{% endif %} width="90%">{% if doc.file %}<a href="{% url teleforma-document-view doc.id %}" target="_blank" title="{% trans "View" %}"><img src="{{ STATIC_URL }}/teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
+                                               <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">{% if doc.file %}<a href="{% url teleforma-document-download doc.id %}"><img src="{{ STATIC_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
+                                               </tr>
+                                               {% endfor %}
+                                           </tbody>
+                                       </table>
+                               {% endfor %}
+                       {% endfor %}
+                       </div>
+               <br/>
+       {% endfor %}
+  {% endif %}
 </div>
 {% endblock %}