123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- {% extends "base_list.html" %}
- {% load thumbnail %}
- {% block title %}Long Plays{% endblock %}
- {% block head_extra %}
- <style>
- dl { width: 210px; float:left; margin-right: 10px; }
- dt a { color:white; text-decoration: none; font-size:smaller; }
- img { height:200px; width: 200px; object-fit: cover; }
- dd .right { float:right; }
- </style>
- {% endblock %}
- {% block lists %}
- <div class="row">
- {% if view == 'grid' %}
- {% for period, medias in in_progress.items %}
- {% if medias %}
- <h2>{% if period == "active" %}Recently played{% else %}More than a week ago{% endif %}</h2>
- <div class="col-md">
- {% for media in medias %}
- <dl>
- <dt><a href="{{media.get_absolute_url}}">{{media.title}}</a></dt>
- {% if media.hltb_cover %}
- {% thumbnail media.hltb_cover "200" as im %}
- <dd><a href="{{media.get_absolute_url}}"><img src="{{im.url}}" width={{im.width}} height={{im.height}} /></a></dd>
- {% endthumbnail %}
- {% else %}
- {% thumbnail media.cover "200" as im %}
- <dd><a href="{{media.get_absolute_url}}"><img src="{{im.url}}" width={{im.width}} height={{im.height}} /></a></dd>
- {% endthumbnail %}
- {% endif %}
- <dd>
- {% if media.is_long_play_in_progress %}Playing{% else %}<a type="button" class="btn btn-sm btn-primary" href="{{media.get_start_url}}">Resume</a>{% endif %}
- <a type="button" class="right btn btn-sm " href="{{media.get_longplay_finish_url}}">Finish</a>
- </dd>
- </dl>
- {% endfor %}
- </div>
- {% endif %}
- {% endfor %}
- {% else %}
- <div class="col-md">
- <div class="table-responsive">
- <table class="table table-striped table-sm">
- <thead>
- <tr>
- <th scope="col">Scrobbles</th>
- <th scope="col">Title</th>
- <th scope="col"></th>
- <th scope="col">Resume</th>
- <th scope="col">Finish</th>
- </tr>
- </thead>
- <tbody>
- {% for media in in_progress %}
- <tr>
- <td>{{media.scrobble_set.count}}</td>
- <td><a href="{{media.get_absolute_url}}">{{media}}</a></td>
- <td>{% if media.author %}{{media.author}}{% else %}{{media.platforms.first}}{% endif %}</td>
- <td><a type="button" class="btn btn-sm btn-primary" href="{{media.get_start_url}}">Resume</a></td>
- <td><a type="button" class="right btn btn-sm " href="{{media.get_longplay_finish_url}}">Finish</a></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endif %}
- <hr/>
- <h2>Completed</h2>
- {% if view == 'grid' %}
- <div>
- {% for media in completed %}
- {% if media.hltb_cover %}
- <dl>
- {% thumbnail media.hltb_cover "200" as im %}
- <dd><a href="{{media.get_absolute_url}}"><img src="{{im.url}}" width={{im.width}} height={{im.height}} /></a></dd>
- {% endthumbnail %}
- <dt><a href="{{media.get_absolute_url}}">{{media.title}}</a></dt>
- </dl>
- {% elif media.cover %}
- <dl>
- {% thumbnail media.cover "200" as im %}
- <dd><a href="{{media.get_absolute_url}}"><img src="{{url}}" width={{im.width}} height={{im.height}} /></a></dd>
- {% endthumbnail %}
- <dt><a href="{{media.get_absolute_url}}">{{media.title}}</a></dt>
- </dl>
- {% endif %}
- {% endfor %}
- </div>
- {% else %}
- <div class="col-md">
- <div class="table-responsive">
- <table class="table table-striped table-sm">
- <thead>
- <tr>
- <th scope="col">Scrobbles</th>
- <th scope="col">Title</th>
- <th scope="col"></th>
- </tr>
- </thead>
- <tbody>
- {% for media in completed %}
- <tr>
- <td>{{media.scrobble_set.count}}</td>
- <td><a href="{{media.get_absolute_url}}">{{media}}</a></td>
- <td>{% if media.author %}{{media.author}}{% else %}{{media.platforms.first}}{% endif %}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endif %}
- </div>
- {% endblock %}
|