Skip to content

Commit

Permalink
Fixed bad display of books on mob.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrbyers committed Jun 25, 2019
1 parent 128bf30 commit c252eaf
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion templates/books/book.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<section class="content">
<div class="row">
<div class="box journal">
<div class="row collapse">
<div class="row">
{% include "books/book_detail.html" with book=book %}
</div>
</div>
Expand Down
13 changes: 8 additions & 5 deletions templates/books/book_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<div class="content clearfix">
<div class="large-3 columns">
<img src="{% if book.cover %}{{ book.cover.url }}{% endif %}" alt="">
{% if book.is_open_access %}
<img src="/media/books/oa.png" alt="Open Access Logo" style="padding: 30px; padding-bottom: 0;">
{% endif %}

{% if not books %}<p><a href="{% url 'books_index' %}"><i class="fa fa-arrow-left">&nbsp;</i>Back to Listing</a></p>{% endif %}
</div>
<div class="large-9 columns">
<h2>{% if books %}<a href="{% url 'books_book' book.pk %}">{% endif %}{{ book.full_title }}{% if books %}</a>{% endif %}</h2>
{% if book.is_open_access %}
{% include "books/oa_header.html" %}
{% else %}
<h2>{% if books %}<a href="{% url 'books_book' book.pk %}">{% endif %}{{ book.full_title }}{% if books %}</a>{% endif %}</h2>
{% endif %}

<h6><em>{% for contributor in book.contributor_set.all %}{% if not forloop.first and not forloop.last %},
{% elif forloop.last and not forloop.first %} & {% endif %}{{ contributor }}{% endfor %}</em></h6>

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

<table class="table">
<table class="table scroll">
<tr>
<th>Published</th>
<th>Published By</th>
Expand Down
2 changes: 0 additions & 2 deletions templates/books/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ <h4>Published Books</h4>

{% for book in books %}
<div class="box journal">
<div class="row collapse">
{% include "books/book_detail.html" with book=book %}
</div>
</div>
<hr />
{% empty %}
<p>There are no published books to display.</p>
Expand Down
13 changes: 13 additions & 0 deletions templates/books/oa_header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="row">
<div class="large-10 medium-10 small-10 columns">
<h2>{% if books %}
<a href="{% url 'books_book' book.pk %}">{% endif %}{{ book.full_title }}
{% if books %}</a>{% endif %}</h2>
</div>
<div class="large-2 medium-2 small-2 columns">
{% if book.is_open_access %}
<img src="/media/books/oa.png" alt="Open Access Logo"
class="img-responsive">
{% endif %}
</div>
</div>

0 comments on commit c252eaf

Please sign in to comment.