From bd185125ac8631c0d3846f158ecfed422a346734 Mon Sep 17 00:00:00 2001 From: bkfox Date: Wed, 7 Aug 2019 01:49:13 +0200 Subject: [PATCH] update --- aircox/templates/aircox/episode_item.html | 39 ++++++++ aircox/templates/aircox/episode_list.html | 14 +++ aircox/templates/aircox/page_item.html | 38 ++++++++ aircox/templates/aircox/page_list.html | 103 ++++++++++++++++++++++ 4 files changed, 194 insertions(+) create mode 100644 aircox/templates/aircox/episode_item.html create mode 100644 aircox/templates/aircox/episode_list.html create mode 100644 aircox/templates/aircox/page_item.html create mode 100644 aircox/templates/aircox/page_list.html diff --git a/aircox/templates/aircox/episode_item.html b/aircox/templates/aircox/episode_item.html new file mode 100644 index 0000000..a5d6911 --- /dev/null +++ b/aircox/templates/aircox/episode_item.html @@ -0,0 +1,39 @@ +{% extends "aircox/page_item.html" %} +{% load i18n easy_thumbnails_tags aircox %} + +{% comment %} +Context variables: +- object: episode +- diffusion: episode's diffusion +- hide_schedule: if True, do not display start time +{% endcomment %} + +{% block title %} +{% if not object.is_published and object.program.is_published %} +{{ object.title }} +{% else %} +{{ block.super }} +{% endif %} +{% endblock %} + +{% block subtitle %} +{{ block.super }} + +{% if diffusion %} + {% if not hide_schedule %} + {% if object.category %}—{% endif %} + + {% endif %} + + {% if diffusion.initial %} + {% with diffusion.initial.date as date %} + + {% trans "(rerun)" %} + + {% endwith %} + {% endif %} +{% endif %} +{% endblock %} + diff --git a/aircox/templates/aircox/episode_list.html b/aircox/templates/aircox/episode_list.html new file mode 100644 index 0000000..23be6fa --- /dev/null +++ b/aircox/templates/aircox/episode_list.html @@ -0,0 +1,14 @@ +{% extends "aircox/page_list.html" %} +{% load i18n aircox %} + +{% block title %} +{% if program %} + {% with program.title as program %} + {% blocktrans %}Episodes of {{ program }}{% endblocktrans %} + {% endwith %} +{% else %} + {% trans "Episodes" %} + {% endif %} +{% endblock %} + + diff --git a/aircox/templates/aircox/page_item.html b/aircox/templates/aircox/page_item.html new file mode 100644 index 0000000..0d47cf8 --- /dev/null +++ b/aircox/templates/aircox/page_item.html @@ -0,0 +1,38 @@ +{% load i18n easy_thumbnails_tags aircox %} +{% comment %} +Context variables: +- object: the actual diffusion +- show_headline: if True, display headline +{% endcomment %} + +
+
+ +
+
+
+ {% block title %} + {% if object.is_published %} + {{ object.title }} + {% else %} + {{ object.title }} + {% endif %} + {% endblock %} +
+
+ {% block subtitle %} + {% if object.category %}{{ object.category.title }}{% endif %} + {% endblock %} +
+ + {% if show_headline %} +
+ {% block headline %} + {{ object.headline|safe }} + {% endblock %} +
+ {% endif %} +
+
+ diff --git a/aircox/templates/aircox/page_list.html b/aircox/templates/aircox/page_list.html new file mode 100644 index 0000000..28352d5 --- /dev/null +++ b/aircox/templates/aircox/page_list.html @@ -0,0 +1,103 @@ +{% extends "aircox/page.html" %} +{% load i18n aircox %} + +{% with view.model|verbose_name:True as model_name_plural %} + +{% block title %} +{{ model_name_plural }} +{% endblock %} + +{% block side_nav %} +{{ block.super }} + +
+

{% trans "Filters" %}

+
+ {% block list_filters %} +
+
+ +
+
+
+
+ {% for category in filter_categories %} + + {% endfor %} +
+
+
+
+ {% endblock %} +
+
+ +
+
+
+
+ +
+ +
+
+
+ + +
+
+{% endblock %} + + +{% block main %} +
+{% for object in object_list %} +{% block list_object %} +{% include item_template_name %} +{% endblock %} +{% endfor %} +
+ +{% if is_paginated %} +
+ +{% update_query request.GET.copy page=None as GET %} +{% with GET.urlencode as GET %} + +{% endwith %} +{% endif %} + +{% endblock %} + +{% endwith %} +