From: Radek Czajka Date: Tue, 17 Apr 2012 14:22:06 +0000 (+0200) Subject: fix #2036, fix #2078: more audiobook links X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/293deaa71a6e390517966f4ba9fa907562524636 fix #2036, fix #2078: more audiobook links --- diff --git a/apps/catalogue/static/player/openplayer.js b/apps/catalogue/static/player/openplayer.js new file mode 100644 index 000000000..e8da79c81 --- /dev/null +++ b/apps/catalogue/static/player/openplayer.js @@ -0,0 +1,18 @@ +(function($) { + $(function() { + + + +$('.open-player').click(function(event) { + event.preventDefault(); + window.open($(this).attr('href'), + 'player', + 'width=422, height=500' + ); +}); + + + + }); +})(jQuery); + diff --git a/apps/catalogue/static/player/player.css b/apps/catalogue/static/player/player.css index c449803e5..829a9a1c0 100644 --- a/apps/catalogue/static/player/player.css +++ b/apps/catalogue/static/player/player.css @@ -15,3 +15,7 @@ .play:hover { color: #0D7E85; } + +.daisy-list { + list-style: none; +} diff --git a/apps/catalogue/templates/catalogue/book_text.html b/apps/catalogue/templates/catalogue/book_text.html index 53a0c6a5f..e844c96c1 100644 --- a/apps/catalogue/templates/catalogue/book_text.html +++ b/apps/catalogue/templates/catalogue/book_text.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load url from future %} {% load static from staticfiles %} {% load chunks compressed catalogue_tags %} {% trans "Infobox" %}
  • {% trans "Book's page" %}
  • {% trans "Download" %}
  • + {% if related.media.mp3 or related.media.ogg %} +
  • + {% trans "Listen" %}
  • + {% endif %}
    @@ -35,16 +40,20 @@ {% if book.pdf_file %}
  • PDF {% trans "to print" %}
  • {% endif %} - {% if book.epub_file %} + {% if book.epub_file %}
  • EPUB {% trans "for a reader" %}
  • {% endif %} - {% if book.mobi_file %} + {% if book.mobi_file %}
  • MOBI {% trans "for Kindle" %}
  • {% endif %} - {% if book.txt_file %} + {% if book.txt_file %}
  • TXT {% trans "for advanced usage" %}
  • {% endif %} -
  • {% trans "Download a custom PDF" %}
  • +
  • {% trans "Download a custom PDF" %}
  • + {% if related.media.mp3 or related.media.ogg or related.media.daisy %} +
  • {% trans "Download all audiobooks for this book" %}: + {% download_audio book %}
  • + {% endif %}