diff --git a/catalog/templates/edition.html b/catalog/templates/edition.html index beaf016b..f6ff2eaf 100644 --- a/catalog/templates/edition.html +++ b/catalog/templates/edition.html @@ -96,39 +96,41 @@ {% endif %} {% endblock %} {% block left_sidebar %} + {% with related_books=item.get_related_books %} {% if related_books.count > 0 %} - {% trans '其它版本' %} - {% for b in related_books %} - - {{ b.title }} - ({{ b.pub_house | default:'' }} {{ b.pub_year | default:'' }}) - {% comment %} {% for res in b.external_resources.all %} + + {% trans '这本书还有其它版本' %} + {% for b in related_books %} + + {{ b.title }} + ({{ b.pub_house | default:'' }} {{ b.pub_year | default:'' }}) + {% comment %} {% for res in b.external_resources.all %} {{ res.site_name.label }} - {% endfor %} {% endcomment %} - - {% endfor %} + {% endfor %} {% endcomment %} + + {% endfor %} + {% endif %} {% endwith %} {% if item.isbn %} - {% trans '借阅或购买' %}
- {{ b.title }} - ({{ b.pub_house | default:'' }} {{ b.pub_year | default:'' }}) - {% comment %} {% for res in b.external_resources.all %} + + {% trans '这本书还有其它版本' %} + {% for b in related_books %} + + {{ b.title }} + ({{ b.pub_house | default:'' }} {{ b.pub_year | default:'' }}) + {% comment %} {% for res in b.external_resources.all %} {{ res.site_name.label }} - {% endfor %} {% endcomment %} - - {% endfor %} + {% endfor %} {% endcomment %} + + {% endfor %} +