2017-11-10 15:21:21 +00:00
|
|
|
{% extends "base.html" %}
|
2017-11-11 13:33:27 +00:00
|
|
|
|
2017-11-11 11:30:16 +00:00
|
|
|
{% block title %}
|
|
|
|
Episode "{{episode.name}}" - S{{episode.season.number}}E{{episode.episode}} - {{show.name}} - Episodes.Community
|
|
|
|
{% endblock %}
|
2017-11-11 13:33:27 +00:00
|
|
|
|
|
|
|
{% block meta %}
|
|
|
|
{{ block.super }}
|
|
|
|
<meta property="og:title" content="{{episode.name}}">
|
|
|
|
<meta property="og:type" content="video.episode">
|
|
|
|
<meta property="og:video:series" content="{{show.name}}">
|
2017-11-11 13:37:36 +00:00
|
|
|
<meta property="og:image" content="/media/uploaded_resources/{{show.artwork}}">
|
2017-11-11 13:33:27 +00:00
|
|
|
<meta property="og:url" content="https://{{show.abbr}}.episodes.community/episode/{{episode.season.number}}/{{episode.episode}}-{{episode.name|slugify}}">
|
|
|
|
{% endblock %}
|
|
|
|
|
2017-11-10 15:21:21 +00:00
|
|
|
{% block content %}
|
2017-12-15 11:33:01 +00:00
|
|
|
{% load guardian_tags %}
|
|
|
|
{% get_obj_perms request.user for show as "show_perms" %}
|
2017-11-10 15:21:21 +00:00
|
|
|
<section class="show-details">
|
|
|
|
<div class="banner" style="background-image: url(/media/uploaded_resources/{{show.banner}});"></div>
|
2018-02-27 17:49:45 +00:00
|
|
|
<div class="banner-cover row p-4">
|
2017-11-10 15:21:21 +00:00
|
|
|
<div class="artwork">
|
2017-12-26 17:11:18 +00:00
|
|
|
{% if episode.season.artwork %}
|
|
|
|
<img src="/media/uploaded_resources/{{episode.season.artwork}}">
|
|
|
|
{% else %}
|
|
|
|
<img src="/media/uploaded_resources/{{show.artwork}}">
|
|
|
|
{% endif %}
|
2017-11-10 15:21:21 +00:00
|
|
|
</div>
|
2018-02-27 17:49:45 +00:00
|
|
|
<div class="details season col">
|
2017-11-10 15:21:21 +00:00
|
|
|
<h1>{{show.name}}</h1>
|
2017-12-26 17:11:18 +00:00
|
|
|
{% if episode.season.name %}
|
|
|
|
<h3>{{ episode.season.name }}</h3>
|
|
|
|
{% else %}
|
|
|
|
<h3>Season {{ episode.season.number }}</h3>
|
|
|
|
{% endif %}
|
2018-02-27 17:49:45 +00:00
|
|
|
<p>
|
2017-12-28 15:24:27 +00:00
|
|
|
{% if episode.season.description %}
|
|
|
|
{{ episode.season.description }}
|
|
|
|
{% else %}
|
|
|
|
{{ show.description }}
|
|
|
|
{% endif %}
|
2017-11-10 15:21:21 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-02-27 17:49:45 +00:00
|
|
|
<section class="container mb-5 mt-2">
|
|
|
|
<nav aria-label="breadcrumb">
|
|
|
|
<ol class="breadcrumb">
|
2018-03-02 13:46:25 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{show.url}}">{{show.name}}</a></li>
|
2018-02-27 17:49:45 +00:00
|
|
|
<li class="breadcrumb-item active" aria-current="page">{{episode.name}}</li>
|
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
|
2017-11-10 15:21:21 +00:00
|
|
|
<h1>Watch <q>{{episode.name}}</q> From</h1>
|
|
|
|
<div class="submission-list">
|
|
|
|
{% for sbm in submissions %}
|
2018-02-27 17:49:45 +00:00
|
|
|
<div class="submission{% if sbm.positives < sbm.negatives %} buried{% endif %}{% if sbm.pinned %} pinned{% endif %}{% if highlight and highlight == sbm.id %} highlighted{% endif %} mb-2">
|
2018-03-02 09:59:44 +00:00
|
|
|
{% if forloop.counter0 == 0 and sbm.embed and not sbm.positives < sbm.negatives %}
|
|
|
|
<div class="onsite-player d-flex justify-content-center mb-2">
|
|
|
|
<iframe src="{{sbm.embed}}" width="1024" height="640"></iframe>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-02-27 17:49:45 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<a href="{{sbm.url}}" class="link d-block mb-2">
|
|
|
|
{% if sbm.pinned %}<i class="fa fa-fw fa-thumb-tack" title="Pinned submission"></i>{% endif %}
|
|
|
|
{% if sbm.title %}
|
|
|
|
<span class="urld" title="Web URL: {{sbm.url}}">{{sbm.title}}</span>
|
|
|
|
{% else %}
|
|
|
|
<i class="fa fa-fw fa-globe"></i> {{sbm.url}}
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2 text-md-right">
|
|
|
|
<div class="vote-btns" data-vote-id="{{sbm.id}}">
|
2018-03-02 13:46:25 +00:00
|
|
|
<form method="POST" class="d-inline" action="{{show.url}}/vote/{{sbm.id}}/1">
|
2018-02-27 17:49:45 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<button class="btn btn-success">
|
|
|
|
<i class="fa fa-fw fa-thumbs-up"></i> {{sbm.positives}}
|
|
|
|
</button>
|
|
|
|
</form>
|
2018-03-02 13:46:25 +00:00
|
|
|
<form method="POST" class="d-inline" action="{{show.url}}/vote/{{sbm.id}}/0">
|
2018-02-27 17:49:45 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<button class="btn btn-danger">
|
|
|
|
<i class="fa fa-fw fa-thumbs-down"></i> {{sbm.negatives}}
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-11-10 15:21:21 +00:00
|
|
|
</div>
|
2017-12-15 11:33:01 +00:00
|
|
|
<div class="data">
|
2017-12-28 10:15:32 +00:00
|
|
|
{% get_obj_perms sbm.user for show as "publisher_perms" %}
|
|
|
|
<span class="timestamp">Submitted {{sbm.timestamp}} by
|
|
|
|
{% if sbm.user.is_staff or "can_moderate_show" in publisher_perms %}
|
|
|
|
<span class="mod"><i class="fa fa-fw fa-shield"></i></span>
|
|
|
|
{% endif %}
|
|
|
|
<span class="display_name">{{sbm.user.display_name}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="divider">·</span>
|
2017-12-27 15:01:39 +00:00
|
|
|
{% if "can_moderate_show" in show_perms %}
|
2018-03-02 13:46:25 +00:00
|
|
|
<a href="{{show.url}}/submission/{{sbm.id}}/moderate" class="button modbutton"><i class="fa fa-fw fa-shield"></i> Change</a>
|
2017-12-15 11:33:01 +00:00
|
|
|
{% else %}
|
2018-03-02 13:46:25 +00:00
|
|
|
<a href="{{show.url}}/submission/{{sbm.id}}/report" class="report">Report Invalid or Spam</a>
|
2017-12-15 11:33:01 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2017-11-10 15:47:45 +00:00
|
|
|
</div>
|
|
|
|
{% empty %}
|
|
|
|
<h3>Nobody has submitted any links yet.</h3>
|
2017-11-10 15:21:21 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2018-02-27 17:49:45 +00:00
|
|
|
<div class="d-flex flex-row-reverse mt-4">
|
|
|
|
{% if user.is_authenticated %}
|
|
|
|
{% if "can_moderate_show" in show_perms %}
|
2018-03-02 13:46:25 +00:00
|
|
|
<a href="{{show.url}}/episode/{{episode.season.number}}/{{episode.episode}}/submit" class="btn btn-warning"><i class="fa fa-fw fa-plus"></i> Add New Link</a>
|
2018-02-27 17:49:45 +00:00
|
|
|
{% else %}
|
2018-03-02 13:46:25 +00:00
|
|
|
<a href="{{show.url}}/episode/{{episode.season.number}}/{{episode.episode}}/submit" class="btn btn-primary"><i class="fa fa-fw fa-plus"></i> Submit New Link</a>
|
2018-02-27 17:49:45 +00:00
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
<span class="fillertext"><a href="/login">Log in</a> to submit a link</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2018-03-02 13:46:25 +00:00
|
|
|
<p>Discuss <q>{{episode.name}}</q> on the <a href="{{show.url}}/discuss">discussion boards</a>!</p>
|
2018-03-02 09:59:44 +00:00
|
|
|
<ul class="nav fixed-bottom d-flex justify-content-center border-top bg-light">
|
|
|
|
{% if has_previous %}
|
|
|
|
<li class="nav-item">
|
2018-03-02 13:46:25 +00:00
|
|
|
<a class="nav-link" href="{{show.url}}/episode/{{episode.season.number}}/{{episode.episode|add:'-1'}}">Previous Episode</a>
|
2018-03-02 09:59:44 +00:00
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a href="#" class="nav-link disabled">Previous Episode</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if has_next %}
|
|
|
|
<li class="nav-item">
|
2018-03-02 13:46:25 +00:00
|
|
|
<a class="nav-link" href="{{show.url}}/episode/{{episode.season.number}}/{{episode.episode|add:'1'}}">Next Episode</a>
|
2018-03-02 09:59:44 +00:00
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a href="#" class="nav-link disabled">Next Episode</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2017-11-10 15:21:21 +00:00
|
|
|
</section>
|
|
|
|
{% endblock %}
|