Add video and series detail pages
This commit is contained in:
@ -1,8 +1,35 @@
|
||||
{% extends "base_detail.html" %}
|
||||
{% extends "base_list.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{object.title}}{% if object.tv_series %} - {{object.tv_series}}{% endif %}{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
{% block head_extra %}
|
||||
<style>
|
||||
.cover {float:left; width:300px; margin-right:10px;}
|
||||
.summary{float:left; width:600px; margin-left:10px;}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block lists %}
|
||||
|
||||
<div class="row">
|
||||
{% if object.cover_image %}
|
||||
<div class="cover"><img src="{{object.cover_image.url}}" /></div>
|
||||
{% endif %}
|
||||
<div class="summary">
|
||||
{% if object.overview %}
|
||||
<p><em>{{object.overview}}</em></p>
|
||||
{% endif %}
|
||||
{% if object.plot%}
|
||||
<p>{{object.plot|safe|linebreaks|truncatewords:160}}</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
<p style="float:right;">
|
||||
<a href="{{object.imdb_link}}"><img src="{% static " images/imdb-logo.png" %}" width=35></a>
|
||||
<a href="{{object.tmdb_link}}"><img style="background: black;" src="{% static " images/tmdb-logo.png" %}" width=35></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md">
|
||||
<h3>Last scrobbles</h3>
|
||||
@ -11,7 +38,6 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Date</th>
|
||||
<th scope="col">Title</th>
|
||||
{% if object.tv_series %}
|
||||
<th scope="col">Series</th>
|
||||
<th scope="col">Season</th>
|
||||
@ -23,9 +49,8 @@
|
||||
{% for scrobble in object.scrobble_set.all %}
|
||||
<tr>
|
||||
<td>{{scrobble.timestamp}}</td>
|
||||
<td>{{scrobble.video.title}}</td>
|
||||
{% if object.tv_series %}
|
||||
<td>{{scrobble.video.tv_series}}</td>
|
||||
<td><a href="{{scrobble.video.tv_series.get_absolute_url}}">{{scrobble.video.tv_series}}</a></td>
|
||||
<td>{{scrobble.video.season_number}}</td>
|
||||
<td>{{scrobble.video.episode_number}}</td>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user