diff --git a/amelie/activities/templates/activity_list.html b/amelie/activities/templates/activity_list.html
index cb1cc0c..f79b4b7 100644
--- a/amelie/activities/templates/activity_list.html
+++ b/amelie/activities/templates/activity_list.html
@@ -41,7 +41,6 @@
-
@@ -50,15 +49,21 @@ {% trans "Activities you don't want to miss" %}
{{ activity.begin|date:"d-b (D)" }}
|
-
-
- {{ activity.activity_label.name }}
-
-
-
-
-
+
+
+
+ {{ activity.activity_label.name }}
+
+
+
+
+
+
|
{% trans "Activities you don't want to miss" %}
{% else %}
- {% trans 'There are no planned events. Maybe because it is holiday?' %}
+ {% if act_type %}
+ {% blocktrans with type=act_type %}It looks like there are no events with label {{ type }}{% endblocktrans %}
+ {% else %}
+ {% trans 'There are no planned events. Maybe because it is holiday?' %}
+ {% endif %}
{% endif %}
{% if request.person.current_committees|length > 0 or request.person.is_board %}
diff --git a/amelie/activities/urls.py b/amelie/activities/urls.py
index 893dd22..4718841 100644
--- a/amelie/activities/urls.py
+++ b/amelie/activities/urls.py
@@ -27,6 +27,7 @@
urlpatterns = [
# URLs that are not about a specific activity
path('', views.activities, name='activities'),
+ path('', views.activities, name='activities_type'),
path('old/', views.activities_old, name='activities_old'),
# URLs about the photo gallery
path('photos/', views.photos, name='photos'),
diff --git a/amelie/activities/views.py b/amelie/activities/views.py
index 4529ecd..007e9e1 100644
--- a/amelie/activities/views.py
+++ b/amelie/activities/views.py
@@ -114,11 +114,15 @@ def activity_ics(request, pk):
return resp
-def activities(request):
+def activities(request, act_type=None):
"""
Gives an overview of all upcoming activities and recent past activities.
"""
activities = Event.objects.filter_public(request)
+
+ if act_type:
+ activities = activities.filter(Q(activity__activity_label__name_en=act_type) | Q(activity__activity_label__name_nl=act_type))
+
old_activities = list(activities.filter(end__lt=timezone.now()))[-10:]
new_activities = list(activities.filter(end__gte=timezone.now()))
diff --git a/amelie/calendar/models.py b/amelie/calendar/models.py
index 9248779..dc3596e 100644
--- a/amelie/calendar/models.py
+++ b/amelie/calendar/models.py
@@ -195,7 +195,9 @@ def save(self, *args, **kwargs):
def description_short(self):
char_limit = 150
- total_string = f"{self.begin.strftime('%d/%m/%Y, %H:%M')} @{self.location} {self.promo_en}"
+ location_prefix = " @" if self.location is not "" else ""
+ activity_prefix = (self.as_leaf_class().activity_label.name_en + " - ") if self.as_leaf_class().activity_label else ""
+ total_string = f"{activity_prefix}{self.begin.strftime('%d/%m/%Y, %H:%M')}{location_prefix}{self.location} {self.promo_en}"
if len(total_string) > char_limit:
total_string = total_string[:char_limit] + '...'
diff --git a/amelie/weekmail/templates/weekmail/weekmail_mail_html.mail b/amelie/weekmail/templates/weekmail/weekmail_mail_html.mail
index 4350fb1..ca04c8b 100644
--- a/amelie/weekmail/templates/weekmail/weekmail_mail_html.mail
+++ b/amelie/weekmail/templates/weekmail/weekmail_mail_html.mail
@@ -169,4 +169,4 @@
- |