Skip to content

Commit c252eaf

Browse files
committed
Fixed bad display of books on mob.
1 parent 128bf30 commit c252eaf

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

templates/books/book.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<section class="content">
77
<div class="row">
88
<div class="box journal">
9-
<div class="row collapse">
9+
<div class="row">
1010
{% include "books/book_detail.html" with book=book %}
1111
</div>
1212
</div>

templates/books/book_detail.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
<div class="content clearfix">
44
<div class="large-3 columns">
55
<img src="{% if book.cover %}{{ book.cover.url }}{% endif %}" alt="">
6-
{% if book.is_open_access %}
7-
<img src="/media/books/oa.png" alt="Open Access Logo" style="padding: 30px; padding-bottom: 0;">
8-
{% endif %}
6+
97
{% if not books %}<p><a href="{% url 'books_index' %}"><i class="fa fa-arrow-left">&nbsp;</i>Back to Listing</a></p>{% endif %}
108
</div>
119
<div class="large-9 columns">
12-
<h2>{% if books %}<a href="{% url 'books_book' book.pk %}">{% endif %}{{ book.full_title }}{% if books %}</a>{% endif %}</h2>
10+
{% if book.is_open_access %}
11+
{% include "books/oa_header.html" %}
12+
{% else %}
13+
<h2>{% if books %}<a href="{% url 'books_book' book.pk %}">{% endif %}{{ book.full_title }}{% if books %}</a>{% endif %}</h2>
14+
{% endif %}
15+
1316
<h6><em>{% for contributor in book.contributor_set.all %}{% if not forloop.first and not forloop.last %},
1417
{% elif forloop.last and not forloop.first %} & {% endif %}{{ contributor }}{% endfor %}</em></h6>
1518

@@ -27,7 +30,7 @@ <h6><em>{% for contributor in book.contributor_set.all %}{% if not forloop.first
2730
</tr>
2831
</table>
2932

30-
<table class="table">
33+
<table class="table scroll">
3134
<tr>
3235
<th>Published</th>
3336
<th>Published By</th>

templates/books/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ <h4>Published Books</h4>
99

1010
{% for book in books %}
1111
<div class="box journal">
12-
<div class="row collapse">
1312
{% include "books/book_detail.html" with book=book %}
1413
</div>
15-
</div>
1614
<hr />
1715
{% empty %}
1816
<p>There are no published books to display.</p>

templates/books/oa_header.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="row">
2+
<div class="large-10 medium-10 small-10 columns">
3+
<h2>{% if books %}
4+
<a href="{% url 'books_book' book.pk %}">{% endif %}{{ book.full_title }}
5+
{% if books %}</a>{% endif %}</h2>
6+
</div>
7+
<div class="large-2 medium-2 small-2 columns">
8+
{% if book.is_open_access %}
9+
<img src="/media/books/oa.png" alt="Open Access Logo"
10+
class="img-responsive">
11+
{% endif %}
12+
</div>
13+
</div>

0 commit comments

Comments
 (0)