block join search works, wrapped queries.
[wolnelektury.git] / wolnelektury / templates / catalogue / book_detail.html
index e6cc0f4..ff7b519 100644 (file)
                     <a class="online" href="{% url book_text book.slug %}">{% trans "Read online" %}</a>
                 {% endif %}
                 <div class="download">
-                    {% if book.has_pdf_file %}
+                    {% if book.pdf_file %}
                         <a href="{{ book.pdf_file.url }}"><img src="{{ STATIC_URL }}img/pdf.png" title="{% trans "Download PDF" %} &ndash; {% trans "for reading" %} {% trans "and printing using" %} Adobe Reader" %}" alt="{% trans "Download PDF" %}" /></a>
                     {% endif %}
                     {% if book.root_ancestor.epub_file %}
                         <a href="{{ book.root_ancestor.epub_file.url }}"><img src="{{ STATIC_URL }}img/epub.png" title="{% trans "Download EPUB" %} &ndash; {% trans "for reading" %} {% trans "on mobile devices" %}" alt="{% trans "Download EPUB" %}" /></a>
                     {% endif %}
-                    {% if book.has_txt_file %}
+                    {% if book.mobi_file %}
+                        <a href="{{ book.mobi_file.url }}"><img src="{{ STATIC_URL }}img/mobi.png" title="{% trans "Download MOBI" %} &ndash; {% trans "for reading" %} {% trans "on mobile devices" %}" alt="{% trans "Download MOBI" %}" /></a>
+                    {% endif %}
+                    {% if book.txt_file %}
                         <a href="{{ book.txt_file.url }}"><img src="{{ STATIC_URL }}img/txt.png" title="{% trans "Download TXT" %} &ndash; {% trans "for reading" %} {% trans "on small displays, for example mobile phones" %}" alt="{% trans "Download TXT" %}" /></a>
                     {% endif %}
                     {% for media in book.get_odt %}
                         </ul>
                     {% else %}
                         <p>
-                        {% with cs=projects.0.0 fb=projects.0.1 %}
+                        {% with projects.0.0 as cs %}
+                        {% with projects.0.1 as fb %}
                             {% if fb %}
                                 {% blocktrans %}Audiobooks were prepared as a part of the {{ cs }} project funded by {{ fb }}.{% endblocktrans %}
                             {% else %}
                                 {% blocktrans %}Audiobooks were prepared as a part of the {{ cs }} project.{% endblocktrans %}
                             {% endif %}
                         {% endwith %}
+                        {% endwith %}
                         </p>
                     {% endif %}
                 {% endif %}
                 {% if extra_info.source_url %}
                 <li><a href="{{ extra_info.source_url }}">{% trans "Source of the book" %}</a></li>
                 {% endif %}
+                {% if extra_info.about and not hide_about %}
+                <li><a href="{{ extra_info.about }}">{% trans "Book on the Editor's Platform" %}</a></li>
+                {% endif %}
                 {% if book.gazeta_link %}
                 <li><a href="{{ book.gazeta_link }}">{% trans "Book description on Lektury.Gazeta.pl" %}</a></li>
                 {% endif %}