update
This commit is contained in:
		
							
								
								
									
										39
									
								
								aircox/templates/aircox/episode_item.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								aircox/templates/aircox/episode_item.html
									
									
									
									
									
										Normal file
									
								
							@ -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 %}
 | 
				
			||||||
 | 
					<a href="{{ object.program.get_absolute_url }}">{{ object.title }}</a>
 | 
				
			||||||
 | 
					{% else %}
 | 
				
			||||||
 | 
					{{ block.super }}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block subtitle %}
 | 
				
			||||||
 | 
					{{ block.super }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if diffusion %}
 | 
				
			||||||
 | 
					    {% if not hide_schedule %}
 | 
				
			||||||
 | 
					    {% if object.category %}—{% endif %}
 | 
				
			||||||
 | 
					    <time datetime="{{ diffusion.start|date:"c" }}" title="{{ diffusion.start }}">
 | 
				
			||||||
 | 
					          {{ diffusion.start|date:"d M, H:i" }}
 | 
				
			||||||
 | 
					    </time>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% if diffusion.initial %}
 | 
				
			||||||
 | 
					    {% with diffusion.initial.date as date %}
 | 
				
			||||||
 | 
					    <span title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
 | 
				
			||||||
 | 
					        {% trans "(rerun)" %}
 | 
				
			||||||
 | 
					    </span>
 | 
				
			||||||
 | 
					    {% endwith %}
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										14
									
								
								aircox/templates/aircox/episode_list.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								aircox/templates/aircox/episode_list.html
									
									
									
									
									
										Normal file
									
								
							@ -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 %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										38
									
								
								aircox/templates/aircox/page_item.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								aircox/templates/aircox/page_item.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,38 @@
 | 
				
			|||||||
 | 
					{% load i18n easy_thumbnails_tags aircox %}
 | 
				
			||||||
 | 
					{% comment %}
 | 
				
			||||||
 | 
					Context variables:
 | 
				
			||||||
 | 
					- object: the actual diffusion
 | 
				
			||||||
 | 
					- show_headline: if True, display headline
 | 
				
			||||||
 | 
					{% endcomment %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<article class="media">
 | 
				
			||||||
 | 
					    <div class="media-left">
 | 
				
			||||||
 | 
					        <img src="{% thumbnail object.cover 128x128 crop=scale %}"
 | 
				
			||||||
 | 
					            class="small-cover">
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="media-content">
 | 
				
			||||||
 | 
					        <h5 class="title is-5 has-text-weight-normal">
 | 
				
			||||||
 | 
					            {% block title %}
 | 
				
			||||||
 | 
					            {% if object.is_published %}
 | 
				
			||||||
 | 
					            <a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
 | 
				
			||||||
 | 
					            {% else %}
 | 
				
			||||||
 | 
					            {{ object.title }}
 | 
				
			||||||
 | 
					            {% endif %}
 | 
				
			||||||
 | 
					            {% endblock %}
 | 
				
			||||||
 | 
					        </h5>
 | 
				
			||||||
 | 
					        <div class="subtitle is-6 has-text-weight-light">
 | 
				
			||||||
 | 
					            {% block subtitle %}
 | 
				
			||||||
 | 
					            {% if object.category %}{{ object.category.title }}{% endif %}
 | 
				
			||||||
 | 
					            {% endblock %}
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        {% if show_headline %}
 | 
				
			||||||
 | 
					        <div class="">
 | 
				
			||||||
 | 
					        {% block headline %}
 | 
				
			||||||
 | 
					        {{ object.headline|safe }}
 | 
				
			||||||
 | 
					        {% endblock %}
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        {% endif %}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</article>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										103
									
								
								aircox/templates/aircox/page_list.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								aircox/templates/aircox/page_list.html
									
									
									
									
									
										Normal file
									
								
							@ -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 }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<section class="toolbar">
 | 
				
			||||||
 | 
					    <h4 class="subtitle is-5">{% trans "Filters" %}</h4>
 | 
				
			||||||
 | 
					    <form method="GET" action="">
 | 
				
			||||||
 | 
					        {% block list_filters %}
 | 
				
			||||||
 | 
					        <div class="field is-horizontal">
 | 
				
			||||||
 | 
					            <div class="field-label">
 | 
				
			||||||
 | 
					                <label class="label">{% trans "Categories" %}</label>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="field-body">
 | 
				
			||||||
 | 
					                <div class="field is-grouped is-narrow">
 | 
				
			||||||
 | 
					                    <div class="control">
 | 
				
			||||||
 | 
					                        {% for category in filter_categories %}
 | 
				
			||||||
 | 
					                        <label class="checkbox">
 | 
				
			||||||
 | 
					                            <input type="checkbox" class="checkbox" name="categories"
 | 
				
			||||||
 | 
					                                   value="{{ category.slug }}"
 | 
				
			||||||
 | 
					                                   {% if category.slug in categories %}checked{% endif %} />
 | 
				
			||||||
 | 
					                            {{ category.title }}
 | 
				
			||||||
 | 
					                        </label>
 | 
				
			||||||
 | 
					                        {% endfor %}
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        {% endblock %}
 | 
				
			||||||
 | 
					        <div class="field is-horizontal">
 | 
				
			||||||
 | 
					            <div class="field-label">
 | 
				
			||||||
 | 
					                <label class="label"></label>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <div class="field-body">
 | 
				
			||||||
 | 
					                <div class="field is-grouped is-grouped-right">
 | 
				
			||||||
 | 
					                    <div class="control">
 | 
				
			||||||
 | 
					                        <button class="button is-primary"/>{% trans "Apply" %}</button>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="control">
 | 
				
			||||||
 | 
					                        <a href="?" class="button is-secondary">{% trans "Reset" %}</a>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					    </form>
 | 
				
			||||||
 | 
					</section>
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block main %}
 | 
				
			||||||
 | 
					<section>
 | 
				
			||||||
 | 
					{% for object in object_list %}
 | 
				
			||||||
 | 
					{% block list_object %}
 | 
				
			||||||
 | 
					{% include item_template_name %}
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					{% endfor %}
 | 
				
			||||||
 | 
					</section>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% if is_paginated %}
 | 
				
			||||||
 | 
					<hr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% update_query request.GET.copy page=None as GET %}
 | 
				
			||||||
 | 
					{% with GET.urlencode as GET %}
 | 
				
			||||||
 | 
					<nav class="pagination is-centered" role="pagination" aria-label="{% trans "pagination" %}">
 | 
				
			||||||
 | 
					    {% if page_obj.has_previous %}
 | 
				
			||||||
 | 
					    <a href="?{{ GET }}&page={{ page_obj.previous_page_number }}" class="pagination-previous">
 | 
				
			||||||
 | 
					    {% else %}
 | 
				
			||||||
 | 
					    <a class="pagination-previous" disabled>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					        {% trans "Previous" %}</a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% if page_obj.has_next %}
 | 
				
			||||||
 | 
					    <a href="?{{ GET }}&page={{ page_obj.next_page_number }}" class="pagination-next">
 | 
				
			||||||
 | 
					    {% else %}
 | 
				
			||||||
 | 
					    <a class="pagination-next" disabled>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					        {% trans "Next" %}</a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <ul class="pagination-list">
 | 
				
			||||||
 | 
					    {% for i in paginator.page_range %}
 | 
				
			||||||
 | 
					        <li>
 | 
				
			||||||
 | 
					            <a class="pagination-link {% if page_obj.number == i %}is-current{% endif %}"
 | 
				
			||||||
 | 
					               href="?{{ GET }}&page={{ i }}">{{ i }}</a>
 | 
				
			||||||
 | 
					        </li>
 | 
				
			||||||
 | 
					    {% endfor %}
 | 
				
			||||||
 | 
					    </ul>
 | 
				
			||||||
 | 
					</nav>
 | 
				
			||||||
 | 
					{% endwith %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% endwith %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Reference in New Issue
	
	Block a user