Skip to content
Snippets Groups Projects
Commit 594cc292 authored by Nils Steinger's avatar Nils Steinger
Browse files

Show AK start and end, not just start

parent 505a6050
No related branches found
No related tags found
No related merge requests found
......@@ -345,6 +345,15 @@ class AKSlot(models.Model):
return _("Not scheduled yet")
return self.start.astimezone(self.event.timezone).strftime('%a %H:%M')
@property
def time_simplified(self):
"""
Display start and end time of slot in format weekday + time, e.g. "Fri 14:00 - 15:30"
"""
if self.start is None:
return _("Not scheduled yet")
return self.start.astimezone(self.event.timezone).strftime('%a %H:%M') + ' - ' + self.end.astimezone(self.event.timezone).strftime('%H:%M')
@property
def end(self):
"""
......
......@@ -187,7 +187,7 @@
<tr>
<td>{{ slot.duration }}</td>
{% if not ak.event.plan_hidden or user.is_staff %}
<td>{{ slot.start_simplified }}</td>
<td>{{ slot.time_simplified }}</td>
<td>
{% if "AKPlan"|check_app_installed and slot.room %}
<a href="{% url 'plan:plan_room' event_slug=ak.event.slug pk=slot.room.pk %}">{{ slot.room }}</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment