X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a1ea2966e73e96e9ea5a192320353e8863687b41..764fcc72600a23d5093511228dee596b55c45c72:/wolnelektury/templates/catalogue/book_detail.html diff --git a/wolnelektury/templates/catalogue/book_detail.html b/wolnelektury/templates/catalogue/book_detail.html index f3a7b53ba..ff7b5199a 100644 --- a/wolnelektury/templates/catalogue/book_detail.html +++ b/wolnelektury/templates/catalogue/book_detail.html @@ -4,6 +4,8 @@ {% block title %}{{ book.title }} {% trans "on WolneLektury.pl" %}{% endblock %} +{% block metadescription %}{% book_title book %}. {{ block.super }}{% endblock %} + {% block bodyid %}book-detail{% endblock %} {% block body %} @@ -44,13 +46,16 @@ <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" %} – {% 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" %} – {% 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" %} – {% 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" %} – {% trans "for reading" %} {% trans "on small displays, for example mobile phones" %}" alt="{% trans "Download TXT" %}" /></a> {% endif %} {% for media in book.get_odt %} @@ -61,9 +66,9 @@ <p class="header"> <span class="desc">{% trans "Audiobooks" %}:</span> <span class="audiotabs"> - {% if book.has_mp3_file %}<span class="active">MP3</span>{% endif %} - {% if book.has_ogg_file %}<span>OGG</span>{% endif %} - {% if book.has_daisy_file %}<span>DAISY</span>{% endif %} + {% if book.has_mp3_file %}<span class="active" data-format="mp3">MP3</span>{% endif %} + {% if book.has_ogg_file %}<span data-format="ogg">Ogg Vorbis</span>{% endif %} + {% if book.has_daisy_file %}<span data-format="daisy">DAISY</span>{% endif %} </span> </p> <div class="audiobooks"> @@ -101,8 +106,32 @@ </ul> {% endif %} </div> <!-- /audiobooks --> - <p>{% blocktrans with '<a href="http://czytamysluchajac.pl">CzytamySÅuchajÄ c</a>' as cs %}Audiobooks were prepared as a part of the {{ cs }} project.{% endblocktrans %} - </p> + {% if projects|length > 1 %} + <p>{% trans "Audiobooks were prepared as a part of the projects:" %}</p> + <ul> + {% for cs, fb in projects %} + <li> + {% if fb %} + {% blocktrans %}{{ cs }}, funded by {{ fb }}{% endblocktrans %} + {% else %} + {{ cs }} + {% endif %} + </li> + {% endfor %} + </ul> + {% else %} + <p> + {% 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 %} </div> </div> @@ -152,10 +181,12 @@ </ul> <h2>{% trans "Other resources" %}</h2> <ul> - <li><a href="{{ extra_info.about }}">{% trans "Book on project's wiki" %}</a></li> {% 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 %} @@ -164,6 +195,7 @@ {% endif %} </ul> <p><a href="{{ book.xml_file.url }}">{% trans "View XML source" %}</a></p> + <p><a href="{% url poem_from_book book.slug %}">Miksuj ten utwór</a></p> </div> <div id="themes-list"> <h2>{% trans "Work's themes " %}</h2>