]> git.0d.be Git - django-panik-nonstop.git/blob - nonstop/templates/nonstop/artist_detail.html
misc: distinct active and available tracks in artist view
[django-panik-nonstop.git] / nonstop / templates / nonstop / artist_detail.html
1 {% extends "base.html" %}
2 {% load i18n %}
3
4 {% block appbar %}
5 <h2>Nonstop - Artist: {{ object.name }}</h2>
6 {% endblock %}
7
8 {% block more-user-links %}
9 {{ block.super }}
10 <a href="{% url 'nonstop-quick-links' %}">Gestion nonstop</a>
11 {% endblock %}
12
13 {% block content %}
14
15 <div class="section">
16 <h3>{% trans "Most recently played" %}</h3>
17
18 <ul class="soma-list">
19     {% for somalog in object.recent_diffusions|slice:":20" %}
20         <li><span class="timestamp">{{ somalog.play_timestamp|date:"d/m/Y H:i" }}</span>:
21             {% if somalog.get_track %}
22             <a href="{{ somalog.get_track.get_absolute_url }}" class="tracktitle">{{ somalog.get_track.title }}</a>
23             <span class="trackartist">(<a href="{{ somalog.get_track.artist.get_absolute_url }}" class="trackartist">{{ somalog.get_track.artist.name }}</a>)</span>
24             {% endif %}
25             <span class="filepath">{{ somalog.filepath.short }}</span>
26 </li>
27     {% empty %}
28     <li><i>{% trans "(none)" %}</i></li>
29     {% endfor %}
30 </ul>
31 </div>
32
33 <div class="section">
34 <h3>{% trans "Active tracks" %}</h3>
35
36 <ul>
37 {% for track in object.active_tracks %}
38 <li><a href="{{ track.get_absolute_url }}" class="tracktitle">{{ track.title }}</a>
39         ({% for zone in track.nonstop_zones.all %}{{zone}}{% if not forloop.last %}, {% endif %}{% endfor %})
40 </li>
41 {% empty %}
42 <li><i>{% trans "(none)" %}</i></li>
43 {% endfor %}
44 </ul>
45 </div>
46
47
48 <div class="section">
49 <h3>{% trans "Available tracks" %}</h3>
50
51 <ul>
52 {% for track in object.available_tracks %}
53 <li><a href="{{ track.get_absolute_url }}" class="tracktitle">{{ track.title }}</a></li>
54 {% empty %}
55 <li><i>{% trans "(none)" %}</i></li>
56 {% endfor %}
57 </ul>
58 </div>
59
60 {% endblock %}
61
62 {% block sidebar %}
63 <aside id="sidebar">
64 <p>
65 <a class="button" href="{% url 'nonstop-artist-metadata-tracks' artist_pk=object.id %}">{% trans "Update tracks metadata" %}</a>
66 </p>
67 </aside>
68 {% endblock %}