Add podcast pages
This commit is contained in:
57
vrobbler/templates/podcasts/podcast_detail.html
Normal file
57
vrobbler/templates/podcasts/podcast_detail.html
Normal file
@ -0,0 +1,57 @@
|
||||
{% extends "base_list.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{object.name}}{% endblock %}
|
||||
|
||||
{% block head_extra %}
|
||||
<style>
|
||||
.cover {float:left; width:412px; margin-right:10px; padding-bottom:15px;}
|
||||
.summary {float:left; width:600px; margin-left:10px;}
|
||||
.header {padding-bottom:15px;}
|
||||
.image-wrapper { contain: content; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block lists %}
|
||||
|
||||
<div class="row header">
|
||||
<div class="cover image-wrapper">
|
||||
<img src="{% if object.cover_image %}{{object.cover_image.url}}{% else %}{% static 'images/no-video-cover.jpg' %}{% endif %}" width="400px" />
|
||||
</div>
|
||||
<div class="summary">
|
||||
{% if object.description %}<p>{{object.description|safe|linebreaks|truncatewords:160}}</p>{% endif %}
|
||||
<hr />
|
||||
{% if object.google_podcast_url %}
|
||||
<p style="float:right;">
|
||||
<a href="{{object.google_podcast_url}}"><img src="{% static " images/google-logo.png" %}" width=35></a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="deets">
|
||||
</div>
|
||||
</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">Episode</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for scrobble in scrobbles.all %}
|
||||
<tr>
|
||||
<td>{{scrobble.timestamp}}</td>
|
||||
<td>{{scrobble.podcast_episode}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
32
vrobbler/templates/podcasts/podcast_list.html
Normal file
32
vrobbler/templates/podcasts/podcast_list.html
Normal file
@ -0,0 +1,32 @@
|
||||
{% extends "base_list.html" %}
|
||||
|
||||
{% block lists %}
|
||||
<div class="row">
|
||||
<div class="col-md">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Series</th>
|
||||
<th scope="col">Episode</th>
|
||||
<th scope="col">Scrobbles</th>
|
||||
<th scope="col">All time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in object_list %}
|
||||
{% for episode in obj.episode_set.all %}
|
||||
<tr>
|
||||
<td><a href="{{episode.get_absolute_url}}">{{episode}}</a></td>
|
||||
<td><a href="{{obj.get_absolute_url}}">{{obj}}</a></td>
|
||||
<td>{{episode.scrobble_set.count}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user