123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- {% extends "base_list.html" %}
- {% load mathfilters %}
- {% load static %}
- {% load naturalduration %}
- {% load thumbnail %}
- {% block title %}{{object.title}}{% endblock %}
- {% block lists %}
- <div class="row">
- {% if object.cover%}
- {% thumbnail object.cover "400" as im %}
- <p style="float:left; width:{{im.width}}px; padding:0; border: 1px solid #ccc">
- <img src="{{im.url}}" width={{im.width}} height={{im.height}}/>
- </p>
- {% endthumbnail %}
- {% endif %}
- <div style="float:left; width:600px; margin-left:10px; ">
- {% if object.summary %}
- <p>{{object.summary|safe|linebreaks|truncatewords:160}}</p>
- <hr />
- {% endif %}
- <p style="float:right;">
- <a href="{{object.openlibrary_link}}"><img src="{% static " images/openlibrary-logo.png" %}" width=35></a>
- <a href="{{object.amazon_link}}"><img src="{% static " images/amazon-logo.png" %}" width=35></a>
- </p>
- </div>
- </div>
- <div class="row">
- <p>{{object.scrobble_set.count}} scrobbles</p>
- <p>Read {{object.scrobble_set.last.book_pages_read}} pages{% if object.scrobble_set.last.long_play_complete %} and completed{% else %}{% endif %}</p>
- <p>
- {% if object.scrobble_set.last.long_play_complete == True %}
- <a href="">Read again</a>
- {% else %}
- <a href="">Resume reading</a>
- {% endif %}
- </p>
- </div>
- <div class="row">
- <div class="col-md">
- <h3>Last scrobbles</h3>
- <div class="table-responsive">
- <table class="table table-striped table-sm">
- <thead>
- <tr>
- <th scope="col">Date</th>
- <th scope="col">Completed</th>
- <th scope="col">Pages read</th>
- <th scope="col">Authors</th>
- </tr>
- </thead>
- <tbody>
- {% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
- <tr>
- <td>{{scrobble.timestamp}}</td>
- <td>{% if scrobble.long_play_complete == True %}Yes{% endif %}</td>
- <td>{% if scrobble.in_progress %}Now reading{% else %}{{scrobble.session_pages_read}}{% endif %}</td>
- <td>{% for author in scrobble.book.authors.all %}<a href="{{author.get_absolute_url}}">{{author}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- {% endblock %}
|