This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
Episodes.Community/Show/templates/episode.html

105 lines
4.1 KiB
HTML
Raw Normal View History

2017-11-10 15:21:21 +00:00
{% extends "base.html" %}
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 %}
{% 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}}">
<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 %}
{% 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>
<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 %}
2017-11-10 15:21:21 +00:00
</div>
<div class="details season">
2017-11-10 15:21:21 +00:00
<h1>{{show.name}}</h1>
{% if episode.season.name %}
<h3>{{ episode.season.name }}</h3>
{% else %}
<h3>Season {{ episode.season.number }}</h3>
{% endif %}
2017-11-10 15:21:21 +00:00
<p class="description">
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>
<section class="submissions">
2017-11-11 12:57:52 +00:00
<a href="/show/{{show.abbr}}" class="button"><i class="fa fa-fw fa-home"></i>&nbsp;Show Index</a>
{% if user.is_authenticated %}
2017-12-27 15:01:39 +00:00
{% 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>&nbsp;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>&nbsp;Submit New Link</a>
{% endif %}
{% else %}
<span class="fillertext"><a href="/login">Log in</a> to submit a link</span>
2017-11-11 12:57:52 +00:00
{% endif %}
2017-11-10 15:21:21 +00:00
<h1>Watch <q>{{episode.name}}</q> From</h1>
<div class="submission-list">
{% for sbm in submissions %}
2017-12-29 14:22:58 +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 %}">
2017-12-28 15:34:58 +00:00
<a href="{{sbm.url}}" class="link">
{% 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>&nbsp;{{sbm.url}}
{% endif %}
2017-12-28 15:34:58 +00:00
</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>&nbsp;{{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>&nbsp;{{sbm.negatives}}
</button>
</form>
2017-11-10 15:21:21 +00:00
</div>
<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">&middot;</span>
2017-12-27 15:01:39 +00:00
{% 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>&nbsp;Change</a>
{% else %}
2017-12-29 14:22:58 +00:00
<a href="/show/{{show.abbr}}/submission/{{sbm.id}}/report" class="report">Report Invalid or Spam</a>
{% endif %}
</div>
</div>
{% empty %}
<h3>Nobody has submitted any links yet.</h3>
2017-11-10 15:21:21 +00:00
{% endfor %}
</div>
</section>
{% endblock %}