From 8eaff819afa954d679e9cf6ac2b3ad2436acfbd3 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 12 Dec 2012 14:33:39 +0100 Subject: [PATCH] First obvious accessibility fixes. --- apps/catalogue/templates/catalogue/book_mini_box.html | 8 ++------ apps/catalogue/templatetags/catalogue_tags.py | 4 +++- apps/wolnelektury_core/templates/main_page.html | 8 ++++---- apps/wolnelektury_core/templates/superbase.html | 6 ++++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/catalogue/templates/catalogue/book_mini_box.html b/apps/catalogue/templates/catalogue/book_mini_box.html index 731a8d334..9dd5cf061 100755 --- a/apps/catalogue/templates/catalogue/book_mini_box.html +++ b/apps/catalogue/templates/catalogue/book_mini_box.html @@ -8,14 +8,10 @@ {% empty %} {{ book.cover.url }} {% endthumbnail %} - " alt="Cover" class="cover" /> + " alt="{{ author_str }} – {{ book.title }}" class="cover" /> {% endif %}
- - {% for name, url in related.tags.author %} - {{ name }}{% if not forloop.last %}, {% endif %} - {% endfor %} - + {{ author_str }} {{ book.title }}
diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 8cf3acf59..af9bfae74 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -345,9 +345,11 @@ def book_short(context, book): @register.inclusion_tag('catalogue/book_mini_box.html') def book_mini(book): + author_str = ", ".join(name + for name, url in book.related_info()['tags']['author']) return { 'book': book, - 'related': book.related_info(), + 'author_str': author_str, } diff --git a/apps/wolnelektury_core/templates/main_page.html b/apps/wolnelektury_core/templates/main_page.html index 6b7c46aac..57a442e92 100755 --- a/apps/wolnelektury_core/templates/main_page.html +++ b/apps/wolnelektury_core/templates/main_page.html @@ -60,8 +60,8 @@
  • {% trans "Publishing plan" %}
  • API
  • OAI-PMH
  • -
  • Leśmianator
  • -
  • Materiały do nauki j. polskiego
  • +
  • Leśmianator
  • +
  • Materiały do nauki j. polskiego
  • @@ -76,11 +76,11 @@ diff --git a/apps/wolnelektury_core/templates/superbase.html b/apps/wolnelektury_core/templates/superbase.html index b0067acc7..ac24de3fe 100644 --- a/apps/wolnelektury_core/templates/superbase.html +++ b/apps/wolnelektury_core/templates/superbase.html @@ -1,5 +1,5 @@ - + {% load cache compressed i18n %} {% load static from staticfiles %} {% load catalogue_tags reporting_stats sponsor_tags %} @@ -42,7 +42,8 @@
    @@ -135,6 +136,7 @@ {% csrf_token %} -- 2.20.1