Skip to content

Commit 9810985

Browse files
committed
Fixes all of this crap
1 parent 9b5fd72 commit 9810985

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/books/elements/detail.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{% if book.doi %}
1313
<th>DOI</th>{% endif %}
1414
{% if chapters %}
15-
<th>{% if book.category %}{{ book.category.chapter_name_plural|capfirst }}{% else %}Chapter{% endif %}</th>{% endif %}
15+
<th>{% if book.category %}{{ book.category.chapter_name_plural|capfirst }}{% else %}Chapters{% endif %}</th>{% endif %}
1616
</tr>
1717
<tr>
1818
<td>{{ book.date_published }}</td>
@@ -31,9 +31,9 @@
3131

3232
{% if chapters %}
3333
<li class="accordion-item" data-accordion-item>
34-
<a href="#" class="accordion-title">{% if book.category %}{{ book.category.chapter_name_plural|capfirst }}{% else %}Chapter{% endif %}</a>
34+
<a href="#" class="accordion-title">{% if book.category %}{{ book.category.chapter_name_plural|capfirst }}{% else %}Chapters{% endif %}</a>
3535
<div class="accordion-content" data-tab-content>
36-
<p>{{ book.full_title }} has the following {% if book.category %}{{ book.category.chapter_name_plural }}{% else %}Chapter{% endif %}:
36+
<p>{{ book.full_title }} has the following {% if book.category %}{{ book.category.chapter_name_plural }}{% else %}Chapters{% endif %}:
3737
<ul>
3838
{% for chapter in chapters %}
3939
<li><a href="{% url 'book_view_chapter' book.pk chapter.pk %}">{% if chapter.number %}

templates/books/view_chapter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<h2>{{ chapter.title }}</h2>
2222
<h3><em>{% for contributor in chapter.contributors.all %}{% if not forloop.first and not forloop.last %},
2323
{% elif forloop.last and not forloop.first %} & {% endif %}{{ contributor }}{% endfor %}</em></h3>
24-
<p>This {{ book.category.chapter_name }} is part of: {{ book.citation|safe }}</p>
24+
<p>This {% if book.category %}{{ book.category.chapter_name }}{% else %}chapter{% endif %} is part of: {{ book.citation|safe }}</p>
2525
<a href="{% url 'books_download_chapter' book.pk chapter.pk %}" class="button"><i class="fa fa-download">&nbsp;</i> Download Chapter</a>
2626
<table class="table" style="margin-bottom: 0;">
2727
<tr>

0 commit comments

Comments
 (0)