notice without hda-id
authorymh <ymh.work@gmail.com>
Tue, 31 Mar 2015 01:30:32 +0200
changeset 599 b29be3a76124
parent 598 b1febd361764
child 600 4e50f996c7eb
notice without hda-id
src/hdalab/templates/notice.html
--- a/src/hdalab/templates/notice.html	Tue Mar 31 00:05:47 2015 +0200
+++ b/src/hdalab/templates/notice.html	Tue Mar 31 01:30:32 2015 +0200
@@ -43,8 +43,12 @@
     <ul class="datasheets">
     {% for ds in related %}
         <li class="datasheet">
+            {% if ds.hda_id %}
             <img src="http://histoiredesarts.culture.fr/images/pf/{{ds.hda_id}}.jpg" />
             <h3><a href="{% url 'notice' ds.hda_id %}">{{ds.title}}</a></h3>
+            {% else %}
+            <h3>{{ds.title}}</h3>
+            {% endif %}
             <h4>{{ds.organisation_name}}</h4>
             <ul class="datasheet-tags">{% for t in ds.ordered_tags %}<li data-tag-id="{{t.id}}" class="related-datasheet-tag {% if t.common %} common-tag{% endif %}">{{t.label}}</li>{% endfor %}</ul>
         </li>