Behave properly on empty search.
[wolnelektury.git] / wolnelektury / templates / catalogue / book_detail.html
index 4cc4ea8..f436353 100644 (file)
@@ -1,5 +1,5 @@
-{% load i18n %}
 {% extends "base.html" %}
+{% load i18n %}
 {% load catalogue_tags pagination_tags %}
 
 {% block title %}{{ book.title }} w WolneLektury.pl{% endblock %}
                 <a href="{{ book.pdf_file.url }}">{% trans "Download PDF" %}</a>
             {% endif %}
             {% if book.odt_file %}
-                <a href="{{ book.odt_file.url }}">{% trans "Download ODT %}</a>
+                <a href="{{ book.odt_file.url }}">{% trans "Download ODT" %}</a>
             {% endif %}
             {% if book.txt_file %}
-                <a href="{{ book.txt_file.url }}">{% trans "Download TXT %}</a>
+                <a href="{{ book.txt_file.url }}">{% trans "Download TXT" %}</a>
             {% endif %}
             {% if book.mp3_file %}
                 <div id="czytamy-sluchajac-info">
                     <a href="http://czytamysluchajac.pl/" id="czytamysluchajac-logo"><img src="/static/img/czytamysluchajac-logo-small.png" /></a>     
                     <p>{% trans "Artist" %}: {{ book.get_extra_info_value.artist_name }}</p>
-                    <p>{% trans "Director" %}: {{ book.get_extra_info_value.director_name }}</p>
+                                       {% if book.get_extra_info_value.director_name %}
+                        <p>{% trans "Director" %}: {{ book.get_extra_info_value.director_name }}</p>
+                                       {% endif %}
                 </div>
             {% endif %}
             {% if book.mp3_file %}<a href="{{ book.mp3_file.url }}">{% trans "Download MP3" %}</a>{% endif %}