forked from rc/aircox
radiocampus: integrate marielle design (step 1)
This commit is contained in:
71
radiocampus/templates/aircox/widgets/episode.html
Normal file
71
radiocampus/templates/aircox/widgets/episode.html
Normal file
@ -0,0 +1,71 @@
|
||||
{% extends "./page.html" %}
|
||||
{% load i18n humanize aircox %}
|
||||
|
||||
{% block outer %}
|
||||
{% with diffusion.is_now as is_active %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block subtitle %}
|
||||
{% if diffusion %}
|
||||
{% if timetable %}
|
||||
{{ diffusion.start|date:"H:i" }}
|
||||
—
|
||||
{{ diffusion.end|date:"H:i" }}
|
||||
{% else %}
|
||||
{{ diffusion.start|naturalday }},
|
||||
{{ diffusion.start|date:"H:i" }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block actions-container %}
|
||||
{% if admin and diffusion %}
|
||||
<div class="flex-row">
|
||||
<div class="flex-grow-1">
|
||||
{% if diffusion.type == diffusion.TYPE_ON_AIR %}
|
||||
<span class="tag is-info">
|
||||
<span class="icon is-small">
|
||||
{% if diffusion.is_live %}
|
||||
<i class="fa fa-microphone"
|
||||
title="{% translate "Live diffusion" %}"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-music"
|
||||
title="{% translate "Differed diffusion" %}"></i>
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
{{ diffusion.get_type_display }}
|
||||
</span>
|
||||
{% elif diffusion.type == diffusion.TYPE_CANCEL %}
|
||||
<span class="tag is-danger">
|
||||
{{ diffusion.get_type_display }}</span>
|
||||
{% elif diffusion.type == diffusion.TYPE_UNCONFIRMED %}
|
||||
<span class="tag is-warning">
|
||||
{{ diffusion.get_type_display }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ block.super }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{{ block.super }}
|
||||
{% if object.episodesound_set.available.public.count %}
|
||||
<button type="button" class="button action" @click="player.playButtonClick($event)"
|
||||
data-sounds="{{ object.podcasts|json }}">
|
||||
<span class="icon is-small">
|
||||
<span class="fas fa-play" title="{% translate "Listen" %}"></span>
|
||||
</span>
|
||||
<!--<label>{% translate "Listen" %}</label> -->
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
42
radiocampus/templates/aircox/widgets/item.html
Normal file
42
radiocampus/templates/aircox/widgets/item.html
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends "./preview.html" %}
|
||||
{% load i18n aircox %}
|
||||
|
||||
{% block tag-class %}{{ block.super }} list-item is-fullwidth{% endblock %}
|
||||
|
||||
{% block headings %}
|
||||
{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
{% block headings-container %}{{ block.super }}{% endblock %}
|
||||
{% block content-container %}
|
||||
<div class="media">
|
||||
{% if object.cover and not no_cover %}
|
||||
<a href="{{ object.get_absolute_url }}"
|
||||
class="media-left preview-cover small"
|
||||
style="background-image: url({{ object.cover.url }})">
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="media-content flex-column">
|
||||
|
||||
{% if object|model_name == "Episode" %}
|
||||
<div class="episode-date">
|
||||
{{ object.pub_date|date:"d/m/Y" }}<Br/>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ url|escape }}" class="heading title {% block title-class %}{% endblock %}">
|
||||
{% block title %}{{ title|default:"" }}{% endblock %}
|
||||
</a>
|
||||
<span class="heading subtitle {% block subtitle-class %}{% endblock %}">
|
||||
{% block subtitle %}{{ subtitle|default:"" }}{% endblock %}
|
||||
</span>
|
||||
</br>
|
||||
|
||||
<section class="content flex-grow-1">
|
||||
{% block content %}{{ block.super }}{% endblock %}
|
||||
</section>
|
||||
{% block actions-container %}{{ block.super }}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
35
radiocampus/templates/aircox/widgets/page.html
Normal file
35
radiocampus/templates/aircox/widgets/page.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% extends widget_template %}
|
||||
{% load i18n aircox %}
|
||||
|
||||
|
||||
{% block outer %}
|
||||
{% with cover|default:object.cover_url as cover %}
|
||||
{% with url|default:object.get_absolute_url as url %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block title %}
|
||||
{% if title %}
|
||||
{{ block.super }}
|
||||
{% elif object %}
|
||||
{{ object.display_title }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% if not content and object %}
|
||||
{% with object.display_headline as content %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user