94 lines
3.7 KiB
HTML
94 lines
3.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
Episode "{{episode.name}}" - S{{episode.season.number}}E{{episode.episode}} - {{show.name}} - Episodes.Community
|
|
{% endblock %}
|
|
|
|
{% 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}}">
|
|
<meta property="og:image" content="/media/uploaded_resources/{{show.artwork}}">
|
|
<meta property="og:url" content="https://{{show.abbr}}.episodes.community/episode/{{episode.season.number}}/{{episode.episode}}-{{episode.name|slugify}}">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% load guardian_tags %}
|
|
{% get_obj_perms request.user for show as "show_perms" %}
|
|
<section class="show-details">
|
|
<div class="banner" style="background-image: url(/media/uploaded_resources/{{show.banner}});"></div>
|
|
<div class="banner-cover">
|
|
<div class="artwork">
|
|
{% if episode.season.artwork %}
|
|
<img src="/media/uploaded_resources/{{episode.season.artwork}}">
|
|
{% else %}
|
|
<img src="/media/uploaded_resources/{{show.artwork}}">
|
|
{% endif %}
|
|
</div>
|
|
<div class="details season">
|
|
<h1>{{show.name}}</h1>
|
|
{% if episode.season.name %}
|
|
<h3>{{ episode.season.name }}</h3>
|
|
{% else %}
|
|
<h3>Season {{ episode.season.number }}</h3>
|
|
{% endif %}
|
|
<p class="description">
|
|
{{ episode.season.description }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="submissions">
|
|
<a href="/show/{{show.abbr}}" class="button"><i class="fa fa-fw fa-home"></i> Show Index</a>
|
|
{% if user.is_authenticated %}
|
|
{% if "can_moderate_show" in show_perms %}
|
|
<a href="/show/{{show.abbr}}/episode/{{episode.season.number}}/{{episode.episode}}/submit" class="button modbutton"><i class="fa fa-fw fa-plus"></i> Add New Link</a>
|
|
{% else %}
|
|
<a href="/show/{{show.abbr}}/episode/{{episode.season.number}}/{{episode.episode}}/submit" class="button"><i class="fa fa-fw fa-plus"></i> Submit New Link</a>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="fillertext"><a href="/login">Log in</a> to submit a link</span>
|
|
{% endif %}
|
|
<h1>Watch <q>{{episode.name}}</q> From</h1>
|
|
<div class="submission-list">
|
|
{% for sbm in submissions %}
|
|
<div class="submission{% if sbm.positives < sbm.negatives %} buried{% endif %}">
|
|
<a href="{{sbm.url}}" class="link"><i class="fa fa-fw fa-globe"></i> {{sbm.url}}</a>
|
|
<div class="vote-btns" data-vote-id="{{sbm.id}}">
|
|
<form method="POST" action="/show/{{show.abbr}}/vote/{{sbm.id}}/1">
|
|
{% csrf_token %}
|
|
<button class="vote-positive">
|
|
<i class="fa fa-fw fa-thumbs-up"></i> {{sbm.positives}}
|
|
</button>
|
|
</form>
|
|
<form method="POST" action="/show/{{show.abbr}}/vote/{{sbm.id}}/0">
|
|
{% csrf_token %}
|
|
<button class="vote-negative">
|
|
<i class="fa fa-fw fa-thumbs-down"></i> {{sbm.negatives}}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<div class="data">
|
|
{% 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>
|
|
{% if "can_moderate_show" in show_perms %}
|
|
<a href="/show/{{show.abbr}}/submission/{{sbm.id}}/moderate" class="button modbutton"><i class="fa fa-fw fa-shield"></i> Change</a>
|
|
{% else %}
|
|
<a href="/report?url={{ request.get_full_path|urlencode }}&submission={{ sbm.id }}" class="report">Report Invalid or Spam</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% empty %}
|
|
<h3>Nobody has submitted any links yet.</h3>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|