From f36fbca5ea08a47db35b087704c29b0039e0cf2f Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 24 Jan 2012 00:12:21 +0100 Subject: Fixup event descriptions --- sublab_project/calendarium/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sublab_project/calendarium') diff --git a/sublab_project/calendarium/tasks.py b/sublab_project/calendarium/tasks.py index ee35e45..a2639dc 100644 --- a/sublab_project/calendarium/tasks.py +++ b/sublab_project/calendarium/tasks.py @@ -46,7 +46,7 @@ class CalendariumImport(PeriodicTask): event_info = {} for fieldinfo in event_fields: try: - event_info[fieldinfo[0]] = str(event[fieldinfo[1]]) + event_info[fieldinfo[0]] = event[fieldinfo[1]].format() except KeyError: event_info[fieldinfo[0]] = fieldinfo[2] start = icalendar.vDatetime.from_ical(event['dtstart'].ical()) -- cgit v1.2.1 From ef367be161e91cb111ac17e046ef4f1c8706b161 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 24 Jan 2012 00:16:50 +0100 Subject: Calendarium: don't show empty "other events" list --- sublab_project/calendarium/templates/calendarium/list_events.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sublab_project/calendarium') diff --git a/sublab_project/calendarium/templates/calendarium/list_events.html b/sublab_project/calendarium/templates/calendarium/list_events.html index 6e0b4d4..b70b830 100644 --- a/sublab_project/calendarium/templates/calendarium/list_events.html +++ b/sublab_project/calendarium/templates/calendarium/list_events.html @@ -11,10 +11,12 @@
  • {{ event.start|date:"l, j. F Y H:i" }} bis {{ event.end|date:"H:i" }} Uhr - {{ event.name }}
    {{ event.description }}
  • {% endfor %} + {% if events_source_admin %}

    Was sonst noch los ist

    {% endblock content %} -- cgit v1.2.1 From 639f6bee335e0f68ed6ce08bbb9934b182cc46fe Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 24 Jan 2012 00:29:44 +0100 Subject: Fixup event descriptions (again :S ) --- sublab_project/calendarium/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sublab_project/calendarium') diff --git a/sublab_project/calendarium/tasks.py b/sublab_project/calendarium/tasks.py index a2639dc..d0ab16d 100644 --- a/sublab_project/calendarium/tasks.py +++ b/sublab_project/calendarium/tasks.py @@ -46,7 +46,8 @@ class CalendariumImport(PeriodicTask): event_info = {} for fieldinfo in event_fields: try: - event_info[fieldinfo[0]] = event[fieldinfo[1]].format() + event_info[fieldinfo[0]] = event[fieldinfo[1]].format().encode("utf-8") + event_info[fieldinfo[0]] = event_info[fieldinfo[0]].decode("string-escape") except KeyError: event_info[fieldinfo[0]] = fieldinfo[2] start = icalendar.vDatetime.from_ical(event['dtstart'].ical()) -- cgit v1.2.1 From 48b4ce88c6940eb76a20c2df7acbc0b1200b3984 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 24 Jan 2012 01:31:40 +0100 Subject: Nicen up eventlist/calendarium --- .../templates/calendarium/list_events.html | 26 +++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'sublab_project/calendarium') diff --git a/sublab_project/calendarium/templates/calendarium/list_events.html b/sublab_project/calendarium/templates/calendarium/list_events.html index b70b830..4ccecfc 100644 --- a/sublab_project/calendarium/templates/calendarium/list_events.html +++ b/sublab_project/calendarium/templates/calendarium/list_events.html @@ -1,22 +1,36 @@ {% extends 'base.html' %} {% block title %}Termine{% endblock %} +{% block header %} + + +{% endblock %} {%block content %}

    Termine

    Hier findest du Veranstaltungen, die im sublab und dessen Umgebung stattfinden.

    Veranstaltungen im sublab

    -
      +
      {% for event in events_source_import %} -
    • {{ event.start|date:"l, j. F Y H:i" }} bis {{ event.end|date:"H:i" }} Uhr - {{ event.name }}
      {{ event.description }}
    • +

      {{ event.start|date:"l, j. F Y H:i" }} bis {{ event.end|date:"H:i" }} Uhr: {{ event.name }}

      +

      {{ event.description }}

      {% endfor %} -
    + {% if events_source_admin %}

    Was sonst noch los ist

    -
      +
      {% for event in events_source_admin %} -
    • {{ event.start|date:"l, j. F Y H:i" }} bis {{ event.end|date:"l, j. F Y H:i" }} Uhr - {{ event.name }}
      {{ event.description }}
    • +

      {{ event.start|date:"l, j. F Y H:i" }} bis {{ event.end|date:"l, j. F Y H:i" }} Uhr: {{ event.name }}

      +

      {{ event.description }}

      {% endfor %} +
      {% endif %} -
    {% endblock content %} -- cgit v1.2.1