From 3c0e373447323b5e33b273859e790a2054771afa Mon Sep 17 00:00:00 2001
From: Jan Szejko
Date: Wed, 20 Apr 2016 17:32:00 +0200
Subject: [PATCH] reformat templates
---
lib/librarian | 2 +-
src/ajaxable/templates/ajaxable/form.html | 14 +-
.../templates/ajaxable/form_on_page.html | 14 +-
src/api/templates/api/main.html | 155 +++++-----
.../templates/catalogue/book_detail.html | 129 ++++----
.../templates/catalogue/book_fragments.html | 20 +-
.../templates/catalogue/book_info.html | 46 +--
.../templates/catalogue/book_list.html | 22 +-
.../templates/catalogue/book_searched.html | 60 ++--
.../templates/catalogue/book_short.html | 190 ++++++------
.../templates/catalogue/book_text.html | 154 +++++-----
.../templates/catalogue/book_wide.html | 10 +-
.../templates/catalogue/catalogue.html | 19 +-
.../templates/catalogue/collection.html | 10 +-
.../templates/catalogue/collection_box.html | 30 +-
.../templates/catalogue/collection_list.html | 4 +-
.../templates/catalogue/collections.html | 17 +-
.../templates/catalogue/daisy_list.html | 6 +-
.../catalogue/differentiate_tags.html | 16 +-
.../templates/catalogue/fragment_promo.html | 6 +-
.../templates/catalogue/fragment_short.html | 34 +--
.../templates/catalogue/inline_tag_list.html | 36 +--
.../templates/catalogue/picture_detail.html | 151 +++++-----
.../templates/catalogue/picture_list.html | 31 +-
.../templates/catalogue/plain_list.html | 32 +-
src/catalogue/templates/catalogue/player.html | 132 ++++-----
.../catalogue/recent_audiobooks_list.html | 10 +-
.../catalogue/recent_daisy_list.html | 10 +-
.../templates/catalogue/recent_list.html | 22 +-
.../templates/catalogue/related_books.html | 25 +-
.../catalogue/search_multiple_hits.html | 170 +++++------
.../templates/catalogue/search_no_hits.html | 31 +-
.../templates/catalogue/search_too_short.html | 13 +-
.../catalogue/snippets/audiobook_list.html | 14 +-
.../catalogue/snippets/book_list.html | 14 +-
.../catalogue/snippets/book_list_nav.html | 18 +-
.../snippets/custom_pdf_link_li.html | 2 +-
.../catalogue/snippets/license_icon.html | 5 +-
.../catalogue/snippets/like_button.html | 21 +-
.../templates/catalogue/tag_box.html | 17 +-
.../templates/catalogue/tag_catalogue.html | 17 +-
.../templates/catalogue/tag_list.html | 21 +-
.../templates/catalogue/tag_list_split.html | 9 +-
.../catalogue/tagged_object_list.html | 166 ++++++-----
.../templates/catalogue/viewer_base.html | 113 ++++---
.../templates/catalogue/work-list.html | 22 +-
.../templates/dictionary/note_list.html | 201 +++++++------
.../admin/funding/offer/change_form.html | 36 +--
.../funding/disable_notifications.html | 48 ++-
.../templates/funding/includes/funding.html | 107 ++++---
.../templates/funding/includes/fundings.html | 38 ++-
.../funding/includes/offer_status.html | 46 +--
.../funding/includes/offer_status_more.html | 40 +--
src/funding/templates/funding/no_thanks.html | 25 +-
.../templates/funding/offer_detail.html | 78 +++--
src/funding/templates/funding/offer_list.html | 42 ++-
.../funding/snippets/any_remaining.html | 4 +-
src/funding/templates/funding/thanks.html | 78 +++--
.../templates/funding/widgets/amount.html | 28 +-
src/funding/templates/funding/wlfund.html | 80 ++---
.../templates/infopages/infopage.html | 24 +-
.../templates/infopages/on_main.html | 2 +-
.../templates/lesmianator/lesmianator.html | 74 ++---
.../templates/lesmianator/poem.html | 109 +++----
.../templates/libraries/catalog_view.html | 21 +-
.../templates/libraries/library_view.html | 15 +-
.../templates/libraries/main_view.html | 22 +-
.../templates/pdcounter/author_detail.html | 83 +++---
.../templates/pdcounter/book_stub_detail.html | 47 +--
.../admin/picture/picture/change_list.html | 16 +-
src/picture/templates/picture/collection.html | 2 +-
.../templates/picture/picture_detail.html | 17 +-
.../templates/picture/picture_info.html | 16 +-
.../templates/picture/picture_list_thumb.html | 21 +-
.../templates/picture/picture_mini_box.html | 27 +-
.../templates/picture/picture_short.html | 114 ++++----
.../templates/picture/picture_viewer.html | 124 ++++----
.../templates/picture/picture_wide.html | 133 +++++----
.../templates/picture/picturearea_short.html | 16 +-
src/polls/templates/polls/poll.html | 14 +-
src/reporting/templates/reporting/main.html | 54 ++--
src/search/templates/newsearch/search.html | 85 +++---
src/social/templates/social/cite_info.html | 20 +-
src/social/templates/social/cite_promo.html | 39 ++-
src/social/templates/social/my_shelf.html | 12 +-
src/social/templates/social/sets_form.html | 14 +-
src/social/templates/social/shelf_tags.html | 8 +-
src/sponsors/templates/sponsors/page.html | 20 +-
src/suggest/templates/publishing_suggest.html | 26 +-
src/waiter/templates/waiter/wait.html | 125 ++++----
src/wolnelektury/static/js/base.js | 272 ++++++++---------
.../static/scss/main/book_box.scss | 1 +
src/wolnelektury/templates/404.html | 19 +-
src/wolnelektury/templates/500.html | 34 +--
src/wolnelektury/templates/503.html | 38 +--
src/wolnelektury/templates/account/base.html | 9 +-
.../templates/admin/base_site.html | 6 +-
.../admin/catalogue/book/change_form.html | 58 ++--
.../admin/catalogue/book/change_list.html | 11 +-
src/wolnelektury/templates/annoy.html | 21 +-
src/wolnelektury/templates/auth/login.html | 10 +-
.../templates/auth/login_register.html | 27 +-
src/wolnelektury/templates/auth/register.html | 2 +-
.../templates/{ => base}/base.html | 2 +-
.../templates/base/superbase.html | 178 +++++++++++
src/wolnelektury/templates/info/join_us.html | 35 ++-
.../templates/latest_blog_posts.html | 12 +-
src/wolnelektury/templates/main_page.html | 276 +++++++++---------
src/wolnelektury/templates/openid/login.html | 42 ++-
.../templates/pagination/pagination.html | 29 +-
.../templates/piston/authorize_token.html | 14 +-
src/wolnelektury/templates/publish_plan.html | 15 +-
src/wolnelektury/templates/site_base.html | 2 +-
.../socialaccount/login_cancelled.html | 2 +-
src/wolnelektury/templates/superbase.html | 194 ------------
src/wolnelektury/templates/user.html | 17 +-
src/wolnelektury/templates/widget.html | 63 ++--
117 files changed, 2775 insertions(+), 2825 deletions(-)
rename src/wolnelektury/templates/{ => base}/base.html (70%)
create mode 100644 src/wolnelektury/templates/base/superbase.html
delete mode 100644 src/wolnelektury/templates/superbase.html
diff --git a/lib/librarian b/lib/librarian
index 90f6c5d93..7f5ff5c99 160000
--- a/lib/librarian
+++ b/lib/librarian
@@ -1 +1 @@
-Subproject commit 90f6c5d936cafdc51639b251591a909696ea4935
+Subproject commit 7f5ff5c99803e281dc90364cd6efb77b8d91fa26
diff --git a/src/ajaxable/templates/ajaxable/form.html b/src/ajaxable/templates/ajaxable/form.html
index 963f411f7..af98d5158 100755
--- a/src/ajaxable/templates/ajaxable/form.html
+++ b/src/ajaxable/templates/ajaxable/form.html
@@ -4,19 +4,19 @@
{{ title }}
diff --git a/src/ajaxable/templates/ajaxable/form_on_page.html b/src/ajaxable/templates/ajaxable/form_on_page.html
index 8e495234a..e5c27a807 100755
--- a/src/ajaxable/templates/ajaxable/form_on_page.html
+++ b/src/ajaxable/templates/ajaxable/form_on_page.html
@@ -1,18 +1,18 @@
-{% extends "base.html" %}
+{% extends "base/base.html" %}
{% load i18n %}
{% block titleextra %}{{ title }}{% endblock %}
{% block body %}
-
+
- {% include ajax_template %}
+ {% include ajax_template %}
- {% if response_data.message %}
-
{{ response_data.message }}
- {% endif %}
+ {% if response_data.message %}
+
{{ response_data.message }}
+ {% endif %}
-
+
{% endblock %}
diff --git a/src/api/templates/api/main.html b/src/api/templates/api/main.html
index 04244dc91..67ff426fe 100755
--- a/src/api/templates/api/main.html
+++ b/src/api/templates/api/main.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "base/base.html" %}
{% load i18n %}
{% load build_absolute_uri from fnp_common %}
@@ -7,91 +7,90 @@
{% block bodyid %}api{% endblock %}
{% block body %}
+ API
-API
+
+
+ {% url "api" as u %}
+ {% blocktrans with u=u|build_absolute_uri:request %}
+ WolneLektury.pl API resides under {{ u }}.
+ You can use it to access information about books, their fragments and
+ their metadata.
+ {% endblocktrans %}
+
-
-
-{% url "api" as u %}
-{% blocktrans with u=u|build_absolute_uri:request %}
-WolneLektury.pl API resides under {{ u }}.
-You can use it to access information about books, their fragments and
-their metadata.
-{% endblocktrans %}
-
+
+ {% blocktrans %}
+ Default data serialization format is
+ JSON,
+ but you can also use XML by appending ?format=xml
+ query parameter to each URL.
+ {% endblocktrans %}
+
-
-{% blocktrans %}
-Default data serialization format is
-JSON,
-but you can also use XML by appending ?format=xml
-query parameter to each URL.
-{% endblocktrans %}
-
+
+ {% blocktrans %}
+ The URLs in WolneLektury.pl API are:
+ {% endblocktrans %}
+
-
-{% blocktrans %}
-The URLs in WolneLektury.pl API are:
-{% endblocktrans %}
-
+
+
+ {% url "api_book" "studnia-i-wahadlo" as e1 %}
+ {% url "api_tag" "authors" "edgar-allan-poe" as e2 %}
+ {% blocktrans %}
+ Each element of those lists contains a link (in a "href") attibute
+ which points to individual resource's details, i.e.:
+ {{e1}} or
+ {{e2}}.
+ {% endblocktrans %}
+
-
-{% url "api_book" "studnia-i-wahadlo" as e1 %}
-{% url "api_tag" "authors" "edgar-allan-poe" as e2 %}
-{% blocktrans %}
-Each element of those lists contains a link (in a "href") attibute
-which points to individual resource's details, i.e.:
-{{e1}} or
-{{e2}}.
-{% endblocktrans %}
-
+
+ {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/books/" as e %}
+ You can combine authors, epochs, genres and kinds to find only books matching
+ those criteria. For instance:
+ {{e}}.
+ {% endblocktrans %}
+
-
-{% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/books/" as e %}
-You can combine authors, epochs, genres and kinds to find only books matching
-those criteria. For instance:
-{{e}}.
-{% endblocktrans %}
-
+
+ {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/parent_books/" as e %}
+ If you only want top-level books and not all the children, you can use /parent_books/, as in:
+ {{e}}.
+ {% endblocktrans %}
+
-
-{% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/parent_books/" as e %}
-If you only want top-level books and not all the children, you can use /parent_books/, as in:
-{{e}}.
-{% endblocktrans %}
-
-
-
-{% url "api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %}
-{% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %}
-The same way, using also books and themes, you can search for a list of fragments:
-{{e}}.
-Again, each entry has a "href" attribute which links to the fragment's details, i.e.:
-{{f}}.
-{% endblocktrans %}
-
-
+
+ {% url "api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %}
+ {% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %}
+ The same way, using also books and themes, you can search for a list of fragments:
+ {{e}}.
+ Again, each entry has a "href" attribute which links to the fragment's details, i.e.:
+ {{f}}.
+ {% endblocktrans %}
+
+
{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html
index 308318161..4f590ce79 100644
--- a/src/catalogue/templates/catalogue/book_detail.html
+++ b/src/catalogue/templates/catalogue/book_detail.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "base/base.html" %}
{% load i18n %}
{% load common_tags catalogue_tags %}
{% load ssify %}
@@ -13,68 +13,71 @@
{% block bodyid %}book-detail{% endblock %}
{% block body %}
-
-{% ssi_include 'catalogue_book_wide' pk=book.pk %}
-
-{% work_list book_children %}
-
-{% spaceless %}
-{% if book.other_versions %}
-
-{% trans "Other versions" %}:
-{% for rel in book.other_versions %}
- {% cache 86400 book_mini_box rel.pk %}
- {% include 'catalogue/book_mini_box.html' with book=rel %}
- {% endcache %}
- {#% ssi_include 'catalogue_book_mini' pk=rel.pk %#}
-{% endfor %}
-
-{% endif %}
-
-
-{% trans "See also" %}:
-{% related_books book taken=book.other_versions|length %}
-
-{% endspaceless %}
-
-
-
-{% with book.related_themes as themes %}
-{% if themes %}
- {% trans "Themes" %}
- {% plain_list themes book=book %}
-{% endif %}
-{% endwith %}
-
-
-
-{% trans "Information about the work" %}
-{% for tag in tags %}
-
+ {% endfor %}
+
+
+ {% if extra_info.source_url %}
+
+
{% trans "Source" %} {% trans "of the book" %}
+ {% trans "in" %} {% source_name extra_info.source_url %}
+
+ {% endif %}
+
+ {% if extra_info.about and not hide_about %}
+
+ {% endif %}
+ {% if book.gazeta_link %}
+
+ {% endif %}
+ {% if book.wiki_link %}
+
+ {% endif %}
+
{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_fragments.html b/src/catalogue/templates/catalogue/book_fragments.html
index d46f869d8..7696c149f 100644
--- a/src/catalogue/templates/catalogue/book_fragments.html
+++ b/src/catalogue/templates/catalogue/book_fragments.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "base/base.html" %}
{% load i18n %}
{% load work_list from catalogue_tags %}
@@ -7,14 +7,14 @@
{% block bodyid %}tagged-object-list{% endblock %}
{% block body %}
-
+
-
- {% work_list fragments %}
-
+
+ {% work_list fragments %}
+
{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_info.html b/src/catalogue/templates/catalogue/book_info.html
index e245335ee..5b67ad631 100755
--- a/src/catalogue/templates/catalogue/book_info.html
+++ b/src/catalogue/templates/catalogue/book_info.html
@@ -2,18 +2,18 @@
{% load catalogue_tags %}
- {% if book.extra_info.license %}
- {% trans "This work is licensed under:" %}
- {{ book.extra_info.license_description }}
- {% else %}
- {% blocktrans %}This work isn't covered by copyright and is part of the
- public domain, which means it can be freely used, published and
- distributed. If there are any additional copyrighted materials
- provided with this work (such as annotations, motifs etc.), those
- materials are licensed under the
- Creative Commons Attribution-ShareAlike 3.0
- license.{% endblocktrans %}
- {% endif %}
+ {% if book.extra_info.license %}
+ {% trans "This work is licensed under:" %}
+ {{ book.extra_info.license_description }}
+ {% else %}
+ {% blocktrans %}This work isn't covered by copyright and is part of the
+ public domain, which means it can be freely used, published and
+ distributed. If there are any additional copyrighted materials
+ provided with this work (such as annotations, motifs etc.), those
+ materials are licensed under the
+ Creative Commons Attribution-ShareAlike 3.0
+ license.{% endblocktrans %}
+ {% endif %}
{% if book.extra_info.source_name %}
@@ -25,22 +25,26 @@
{% endif %}
{% if book.extra_info.editor or book.extra_info.technical_editor %}
- {% if is_picture %}
- {% trans "Edited by:" %}
+
+ {% if is_picture %}
+ {% trans "Edited by:" %}
{% else %}
- {% trans "Edited and annotated by:" %}
+ {% trans "Edited and annotated by:" %}
{% endif %}
- {% all_editors book.extra_info %}.
+ {% all_editors book.extra_info %}.
+
{% endif %}
{% if book.extra_info.funders %}
- {% trans "Publication funded by:" %}
- {% for funder in book.extra_info.funders %}{{ funder }}{% if not forloop.last %}, {% else %}.{% endif %}{% endfor %}
+
+ {% trans "Publication funded by:" %}
+ {% for funder in book.extra_info.funders %}{{ funder }}{% if not forloop.last %}, {% else %}.{% endif %}{% endfor %}
{% endif %}
{% if book.extra_info.cover_by %}
- {% trans "Cover image by:" %}
-
- {{ book.extra_info.cover_by }}.
+
+ {% trans "Cover image by:" %}
+ {{ book.extra_info.cover_by }}.
+
{% endif %}
diff --git a/src/catalogue/templates/catalogue/book_list.html b/src/catalogue/templates/catalogue/book_list.html
index e29cd50ec..b5c3b60ca 100644
--- a/src/catalogue/templates/catalogue/book_list.html
+++ b/src/catalogue/templates/catalogue/book_list.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "base/base.html" %}
{% load i18n %}
{% load catalogue_tags %}
{% load ssi_include from ssify %}
@@ -8,14 +8,13 @@
{% block titleextra %}{% trans "Listing of all works" %}{% endblock %}
{% block body %}
-{% spaceless %}
-
+ {% spaceless %}
{% block book_list_header %}{% trans "Listing of all works" %}{% endblock %}
- {% block book_list_info %}
- {% ssi_include 'chunk' key='book-list' %}
- {% endblock %}
+ {% block book_list_info %}
+ {% ssi_include 'chunk' key='book-list' %}
+ {% endblock %}
@@ -23,10 +22,10 @@
-
{% trans "Table of Content" %}
-
- {{ rendered_nav }}
-
+
{% trans "Table of Content" %}
+
+ {{ rendered_nav }}
+
{% block book_list %}
@@ -34,6 +33,5 @@
{% endblock %}
{% trans "â top â" %}
-
-{% endspaceless %}
+ {% endspaceless %}
{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_searched.html b/src/catalogue/templates/catalogue/book_searched.html
index 357491ce6..26b9f6130 100644
--- a/src/catalogue/templates/catalogue/book_searched.html
+++ b/src/catalogue/templates/catalogue/book_searched.html
@@ -1,38 +1,34 @@
{% spaceless %}
+ {% load i18n %}
+ {% load inline_tag_list from catalogue_tags %}
+ {% load ssi_include from ssify %}
-{% load i18n %}
-{% load inline_tag_list from catalogue_tags %}
-{% load ssi_include from ssify %}
+
+ {% ssi_include 'catalogue_book_short' pk=book.pk %}
-
+
+ {% for hit in hits %}
+ {% if hit.snippet %}
+
+ {% elif hit.fragment %}
+
+ {% endif %}
+ {% endfor %}
+
-{% ssi_include 'catalogue_book_short' pk=book.pk %}
-
-
- {% for hit in hits %}
- {% if hit.snippet %}
-
- {% else %}
- {% if hit.fragment %}
-
- {% endif %}
- {% endif %}
- {% endfor %}
-
-
-
-
-
-
{% endspaceless %}
\ No newline at end of file
diff --git a/src/catalogue/templates/catalogue/book_short.html b/src/catalogue/templates/catalogue/book_short.html
index 6f5b19f47..0cba65cc9 100644
--- a/src/catalogue/templates/catalogue/book_short.html
+++ b/src/catalogue/templates/catalogue/book_short.html
@@ -1,129 +1,127 @@
{% spaceless %}
-{% load i18n %}
-{% load catalogue_tags %}
-{% load book_shelf_tags from social_tags %}
-
-
+ {% load i18n %}
+ {% load catalogue_tags %}
+ {% load book_shelf_tags from social_tags %}
-{% block book-box-pre %}
- {% include "catalogue/snippets/like_button.html" %}
-{% endblock %}
+
+
-
+ {% block book-box-pre %}
+ {% include "catalogue/snippets/like_button.html" %}
+ {% endblock %}
-
+
+
{% block book-box-body-pre %}
{% endblock %}
-
- {% for tag in tags.author %}
-
{{ tag.name }}{% if not forloop.last %},
- {% endif %}{% endfor %}{% for parent in parents %},
-
{{ parent.title }}{% endfor %}
-
-
+
+ {% for tag in tags.author %}
+
{{ tag.name }}{% if not forloop.last %},
+ {% endif %}{% endfor %}{% for parent in parents %},
+
{{ parent.title }}{% endfor %}
+
+
-
- {% book_shelf_tags book.pk %}
+
+ {% book_shelf_tags book.pk %}
-
+
+ {% block book-box-extra-info %}{% endblock %}
+ {% block box-append %}
+ {% endblock %}
+
-{% block right-column %}
- {% if audiobooks %}
+ {% block right-column %}
+ {% if audiobooks %}
- {% include 'catalogue/snippets/jplayer.html' %}
+ {% include 'catalogue/snippets/jplayer.html' %}
- {% endif %}
-{% endblock %}
+ {% endif %}
+ {% endblock %}
-
-
-
+
+
+
{% endspaceless %}
diff --git a/src/catalogue/templates/catalogue/book_text.html b/src/catalogue/templates/catalogue/book_text.html
index f51e565e6..5a6db1138 100644
--- a/src/catalogue/templates/catalogue/book_text.html
+++ b/src/catalogue/templates/catalogue/book_text.html
@@ -9,97 +9,107 @@
{% block menu %}
-
-
-{% if book.other_versions.exists %}
-