You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
6.2 KiB
HTML

{% import "macros.htm" as macros %}
<!DOCTYPE html>
<html>
{% set title = element.title %}
<head>
<meta charset="utf-8"/>
<title>{{ title }}</title>
{{ macros.shared_style() }}
</head>
<body>
{{ macros.body_header() }}
<h1>{{ title }}</h1>
<div class="element_view">
<img class="thumbnail_img" src="{{ element.info_link }}/thumbnail" alt="Thumbnail" />
<div class="element_info">
{% if element.description != None %}
<div class="description">{{ element.description }}</div>
{% endif %}
<h2>Notes</h2>
<pre>{{ element.notes or "" }}</pre>
<h2>Properties</h2>
<ul>
<li>
{{ macros.media_element_buttons(element) }}
<a class="button" href="{{ element.info_link }}/recommendations">Recommendations</a>
{{ macros.no_input_post_form("/api/refresh/media/" + element.id|string, "refresh") }}
{% if not element.skip_over %}
<form class="form-single-button" method="post" action="/api/media/{{ element.id }}">
{{ macros.hidden_redirect_back() }}
<input type="text" name="progress" placeholder="xx:xx or xxx in seconds" value="{{ element.progress or '' }}" />
<button type="submit">set progress</button>
</form>
{% endif %}
</li>
<li>Can be considered: {{ element.can_considered | tenary("Yes", "no") }}</li>
<li>
released
{{ element.release_date | time_since }}
ago,
{{ element.release_date }}
</li>
<li>
Length:
{{ element.length | timedelta }}
{%- if element.progress > 0 -%}
, Progress:
{{ element.progress | timedelta }}
{% endif %}
</li>
{% set avg_rel = element.average_release_per_week %}
{% if avg_rel %}
<li>
Average Release:
{{ avg_rel | timedelta }}
per week
</li>
{% endif %}
{% if element.all_tags %}
<li>
Tags: {{ macros.tag_list(element.all_tags | filter_preference_tags) }}
</li>
{% endif %}
</ul>
<h2>Part of Collections</h2>
<ul>
{% for link in element.collection_links|sort(attribute="collection.title") %}
<li>
<a href="{{ link.collection.info_link }}">{{ link.collection.title }}</a>
{%- if link.season != 0 -%}
, Season {{ link.season }}
{% endif %}
{%- if link.episode != 0 -%}
, Episode {{ link.episode }}
{% endif %}
</li>
{% endfor %}
</ul>
<h2>Links</h2>
<ul>
{% for link in element.uri_set|sort %}
<li>{{ link | as_link }} {% if element.is_primary_uri(link) %}*{% endif %}</li>
{% endfor %}
</ul>
<h2>Blocked By</h2>
<form class="form-single-button" action="/api/media/add_blocking" method="post">
{{ macros.hidden_redirect_back() }}
<input type="hidden" name="is_blocking" value="{{ element.id }}" />
<input type="number" name="blocked_by" />
<button type="submit">
add
</button>
</form>
{% if element.blocked_by %}
<div class="thumbnail_list">
{% for sub_elem in element.blocked_by %}
{% call macros.media_thumbnail_view(
element=sub_elem,
check_considered=True,
) %}
{% call macros.post_form("/api/media/remove_blocking", "blocked_by", sub_elem.id|string, "X") %}
<input type="hidden" name="is_blocking" value="{{ element.id }}" />
{% endcall %}
{% endcall %}
{% endfor %}
</div>
{% endif %}
<h2>Is Blocking</h2>
<form class="form-single-button" action="/api/media/add_blocking" method="post">
{{ macros.hidden_redirect_back() }}
<input type="hidden" name="blocked_by" value="{{ element.id }}" />
<input type="number" name="is_blocking" />
<button type="submit">
add
</button>
</form>
{% if element.is_blocking %}
<div class="thumbnail_list">
{% for sub_elem in element.is_blocking %}
{% call macros.media_thumbnail_view(
element=sub_elem,
check_considered=True,
) %}
{% call macros.post_form("/api/media/remove_blocking", "is_blocking", sub_elem.id|string, "X") %}
<input type="hidden" name="blocked_by" value="{{ element.id }}" />
{% endcall %}
{% endcall %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</body>
</html>