fixes
[wolnelektury.git] / src / picture / templates / picture / picture_wide.html
index 462e8b0..884b46c 100644 (file)
 {% block box-class %}book-wide-box{% endblock %}
 
 {% block picture-view %}
-<a href="{{ main_link }}">
-{% thumbnail picture.image_file "535" upscale=0 as thumb %}
-<img class="cover" src="{{thumb.url}}"/></a>
-{% endthumbnail %}
+  <a href="{{ main_link }}">
+    {% thumbnail picture.image_file "535" upscale=0 as thumb %}
+      <img class="cover" src="{{thumb.url}}"/>
+    {% endthumbnail %}
+  </a>
 {% endblock %}
 
 
 {% block extra_categories %}
-{% if picture.extra_info.styles %}
-<span class="category">
-<span class="mono"> {% trans "Style" %}:</span>&nbsp;<span class="book-box-tag">
-    {% for tag in picture.extra_info.styles %}
-        <a>{{ tag }}</a>
-        {% if not forloop.last %}<span>, </span>{% endif %}
-    {% endfor %}
-</span></span>
-{% endif %}
+  {% with extra_info=picture.get_extra_info_json %}
+  {% if extra_info.styles %}
+    <span class="category">
+      <span class="mono"> {% trans "Style" %}:</span>&nbsp;<span class="book-box-tag">
+        {% for tag in extra_info.styles %}
+          <a>{{ tag }}</a>
+          {% if not forloop.last %}<span>, </span>{% endif %}
+        {% endfor %}
+      </span>
+    </span>
+  {% endif %}
 
-{% if picture.extra_info.medium %}
-<span class="category">
-<span class="mono"> {% trans "Medium" %}:</span>&nbsp;<span class="book-box-tag">
-    <a>{{ picture.extra_info.medium }}</a>
-</span></span>
-{% endif %}
+  {% if extra_info.medium %}
+    <span class="category">
+      <span class="mono"> {% trans "Medium" %}:</span>&nbsp;<span class="book-box-tag">
+        <a>{{ extra_info.medium }}</a>
+      </span>
+    </span>
+  {% endif %}
 
-{% if picture.extra_info.original_dimensions %}
-<span class="category">
-<span class="mono"> {% trans "Dimensions" %}:</span>&nbsp;<span class="book-box-tag">
-    <a>{{ picture.extra_info.original_dimensions }}</a>
-</span></span>
-{% endif %}
-
-<span class="category">
-<span class="mono"> {% trans "Date" %}:</span>&nbsp;<span class="book-box-tag">
-    <a>{{ picture.extra_info.created_at }}</a>
-</span></span>
+  {% if extra_info.original_dimensions %}
+    <span class="category">
+      <span class="mono"> {% trans "Dimensions" %}:</span>&nbsp;<span class="book-box-tag">
+        <a>{{ extra_info.original_dimensions }}</a>
+      </span>
+    </span>
+  {% endif %}
 
+  <span class="category">
+    <span class="mono"> {% trans "Date" %}:</span>&nbsp;<span class="book-box-tag">
+      <a>{{ extra_info.created_at }}</a>
+    </span>
+  </span>
+  {% endwith %}
 {% endblock %}
 
 
 {% block book-box-extra-info %}
-{% if themes or things%}
+  {% if themes or things%}
     <div class="hidden-box-wrapper" id="theme-list-wrapper">
-        <p><a class="hidden-box-trigger theme-list-link"
-                href="#">{% trans "Motifs, themes and objects" %}</a></p>
-        <div class="hidden-box">
-         {% if themes %}
-         <p>{% trans "Motifs and themes" %}</p>
+      <p>
+        <a class="hidden-box-trigger theme-list-link" href="#">{% trans "Motifs, themes and objects" %}</a>
+      </p>
+      <div class="hidden-box">
+        {% if themes %}
+          <p>{% trans "Motifs and themes" %}</p>
           <ul>
             {% for theme in themes %}
-            <li><a href="{% url 'picture_viewer' picture.slug %}#theme-{{theme.slug}}">{{ theme }}</a></li>
-               {% endfor %}
-            </ul>
-           {% endif %}
-           {% if things %}
-         <p>{% trans "Objects" %}</p>
+              <li><a href="{% url 'picture_viewer' picture.slug %}#theme-{{theme.slug}}">{{ theme }}</a></li>
+            {% endfor %}
+          </ul>
+        {% endif %}
+        {% if things %}
+          <p>{% trans "Objects" %}</p>
           <ul>
             {% for thing in things %}
-            <li><a href="{% url 'picture_viewer' picture.slug %}#object-{{thing.slug}}">{{ thing }}</a></li>
+              <li><a href="{% url 'picture_viewer' picture.slug %}#object-{{thing.slug}}">{{ thing }}</a></li>
             {% endfor %}
           </ul>
-         {% endif %}
-        </div>
+        {% endif %}
+      </div>
     </div>
-{% else %}
-       <p>&nbsp;</p>
-{% endif %}
+  {% else %}
+    <p>&nbsp;</p>
+  {% endif %}
 {% endblock %}
 
 
 {% block right-column %}
-<div class="right-column">
-  <div class="other-tools">
-    <h2 class="mono">{% trans "See" %}</h2>
-    <ul class="plain">
-      {% if extra_info.source_url %}
-      <li><a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the picture" %}</li>
-      {% endif %}
-      <li><a href="{{ picture.xml_file.url }}">{% trans "Source XML file" %}</a></li>
-      {% if extra_info.about and not hide_about %}
-      <li>{% trans "Picture on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a></li>
-      {% endif %}
-      {% if picture.wiki_link %}
-      <li><a href="{{ picture.wiki_link }}">{% trans "Picture description on Wikipedia" %}</a></li>
-      {% endif %}
-    </ul>
+  {% with extra_info=picture.get_extra_info_json %}
+  <div class="right-column">
+    <div class="other-tools">
+      <h2 class="mono">{% trans "See" %}</h2>
+      <ul class="plain">
+        {% if extra_info.source_url %}
+          <li><a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the picture" %}</li>
+        {% endif %}
+        <li><a href="{{ picture.xml_file.url }}">{% trans "Source XML file" %}</a></li>
+        {% if extra_info.about and not hide_about %}
+          <li>{% trans "Picture on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a></li>
+        {% endif %}
+        {% if picture.wiki_link %}
+          <li><a href="{{ picture.wiki_link }}">{% trans "Picture description on Wikipedia" %}</a></li>
+        {% endif %}
+      </ul>
+    </div>
   </div>
-</div>
+  {% endwith %}
 {% endblock %}