From: Radek Czajka Date: Mon, 30 Dec 2019 23:39:19 +0000 (+0100) Subject: Support for multiple source.URL. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/5e8e1de576bdd40292dc632c82cdbe272eee84af Support for multiple source.URL. --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index fbf7a4bd7..85d6bd38b 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -50,7 +50,7 @@ mutagen>=1.31 sorl-thumbnail==12.5.0 # home-brewed & dependencies -librarian==1.7.5 +librarian==1.7.7 # celery tasks celery[redis]==4.3.0 diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html index 4b654dd1d..d2bfda7e4 100644 --- a/src/catalogue/templates/catalogue/book_detail.html +++ b/src/catalogue/templates/catalogue/book_detail.html @@ -56,13 +56,20 @@ {% endfor %} -{% with extra_info=book.get_extra_info_json %} - {% if extra_info.source_url %} -
- {% trans "Source" %} {% trans "of the book" %} - {% trans "in" %} {% source_name extra_info.source_url %} -
- {% endif %} + {% with extra_info=book.get_extra_info_json %} + {% for source_url in extra_info.source_urls %} +
+ {% trans "Source" %} {% trans "of the book" %} + {% trans "in" %} {% source_name source_url %} +
+ {% empty %} + {% if extra_info.source_url %} +
+ {% trans "Source" %} {% trans "of the book" %} + {% trans "in" %} {% source_name extra_info.source_url %} +
+ {% endif %} + {% endfor %} {% if book|status:user != 'closed' %}
{% trans "Source XML file" %}
{% endif %}