newsitem_detail.html 1.24 KB
Newer Older
fred's avatar
fred committed
1
{% extends "base.html" %}
fred's avatar
fred committed
2
{% load i18n %}
fred's avatar
fred committed
3 4

{% block appbar %}
fred's avatar
fred committed
5
<h2>{{ object.date|date:"d E o"|lower }} - {{ object.title }}</h2>
6
<span class="actions">
7 8 9 10 11
{% if object.emission %}
<a href="{% url 'emission-view' slug=object.emission.slug %}">Retourner à la page de l'émission</a>
{% endif %}
<a href="{% url 'home' %}">Retourner à l'accueil</a>
</span>
fred's avatar
fred committed
12 13 14 15 16
{% endblock %}

{% block content %}

<p>
fred's avatar
fred committed
17
<a class="button" href="{% url 'newsitem-update' slug=object.slug %}">Modifier</a>
fred's avatar
fred committed
18
<a class="button actually-not-that-friendly" rel="popup" href="{% url 'newsitem-delete' slug=object.slug %}">Supprimer</a>
fred's avatar
fred committed
19 20
</p>

fred's avatar
fred committed
21
<div class="bo-block">
fred's avatar
fred committed
22 23 24 25 26 27
{% if object.image %}
<div class="image">
  <img src="{{ object.image.url }}"/>
</div>
{% endif %}

fred's avatar
fred committed
28 29 30 31
{% if object.event_date %}
<p class="event-date">{% trans 'Event Date:' %} {{ object.event_date|date:"d E o"|lower }}</p>
{% endif %}

fred's avatar
fred committed
32 33 34 35 36 37
{% if object.text %}
{{ object.text|safe }}
{% endif %}

{% if object.tags.count %}
<p>
fred's avatar
fred committed
38 39 40 41
Tags :
{% for tag in object.tags.all %}
  <span class="tag">{{ tag }}</span>{% if not forloop.last %}, {% endif %}
{% endfor %}
fred's avatar
fred committed
42 43
</p>
{% endif %}
fred's avatar
fred committed
44
</div>
fred's avatar
fred committed
45

fred's avatar
fred committed
46
{% endblock %}
fred's avatar
fred committed
47

fred's avatar
fred committed
48 49 50 51 52 53
{% block page-end %}
<script>
$(function() {
  $('.image img').click(function() { $(this).toggleClass('large'); });
});
</script>
fred's avatar
fred committed
54
{% endblock %}