summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2021-03-10 21:09:49 (GMT)
committerChristian Pointner <equinox@helsinki.at>2021-03-10 21:09:49 (GMT)
commitefd60ff12aabea1a14eb7c23e6d28020c34da17d (patch)
tree3ade4c8e81453106b508f8b52a18937b0c4cd36d /program
parent4c67946b2db8ee366630b6bd996130efca0ebcf9 (diff)
parent149eff999483b0b7e22d81b089c0da6b34024525 (diff)
Merge branch 'new-homepage' into stable
Diffstat (limited to 'program')
-rw-r--r--program/models.py2
-rw-r--r--program/templates/v2/host_detail.html14
2 files changed, 9 insertions, 7 deletions
diff --git a/program/models.py b/program/models.py
index 7951c35..b5123cb 100644
--- a/program/models.py
+++ b/program/models.py
@@ -240,7 +240,7 @@ class Host(models.Model):
return reverse('host-detail', args=[str(self.id)])
def active_shows(self):
- return self.shows.filter(programslots__until__gt=datetime.today)
+ return self.shows.filter(programslots__until__gt=datetime.today).distinct()
class Show(models.Model):
diff --git a/program/templates/v2/host_detail.html b/program/templates/v2/host_detail.html
index 0dff882..f5cac4d 100644
--- a/program/templates/v2/host_detail.html
+++ b/program/templates/v2/host_detail.html
@@ -7,18 +7,20 @@
<div id="content-main" class="host-detail">
<h1>{{ host.name }}</h1>
- <div id="shows">
- <div id="shows-title">Sendungen</div>
+ <div class="host">
+ <div id="shows">
+ <div id="shows-title">Sendungen</div>
{% for show in host.active_shows %}
- <div class="show bf-{{ show.broadcastformat.slug }}"><a href="/program/shows/{{ show.slug }}"> {{ show.name }}</a></div>
+ <div class="show bf-{{ show.broadcastformat.slug }}"><a href="/program/shows/{{ show.slug }}"> {{ show.name }}</a></div>
{% endfor %}
- </div>
+ </div>
{% if host.email %}
- <div id="email">E-Mail Adresse: <a href="{{ host.email }}">{{ host.email }}</a></div>
+ <div id="email">E-Mail Adresse: <a href="{{ host.email }}">{{ host.email }}</a></div>
{% endif %}
{% if host.website %}
- <div id="website">Website: <a href="{{ host.website }}">{{ host.website }}</a></div>
+ <div id="website">Website: <a href="{{ host.website }}">{{ host.website }}</a></div>
{% endif %}
+ </div>
</div>
</body>