From ecfd4d3aa490ce074aa55174cd979be1e13d2fc6 Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Tue, 28 May 2013 15:09:51 +0200 Subject: [PATCH] Events, groups organizers added, template done acc. to testing feedback --- itf/events/models.py | 2 + itf/templates/modules/events/event.html | 75 +++++++++++++++++++------ 2 files changed, 60 insertions(+), 17 deletions(-) diff --git a/itf/events/models.py b/itf/events/models.py index e2c06bd..d093f62 100644 --- a/itf/events/models.py +++ b/itf/events/models.py @@ -92,6 +92,7 @@ class Event(ItfModel): groups= { 'venue': [ obj.group for obj in self.groupevent_set.filter(typ='venue')], 'performing': [ obj.group for obj in self.groupevent_set.filter(typ='performing')] + 'organizers': [ obj.group for obj in self.groupevent_set.filter(typ='organizers')] } rdict['groups']= groups rdict['has_people_tab'] = True @@ -123,6 +124,7 @@ class PersonEvent(models.Model): GROUP_EVENT_CHOICES = ( ('venue', 'Venue'), ('performing', 'Performing'), + ('organizers', 'Organizers'), ) class GroupEvent(models.Model): diff --git a/itf/templates/modules/events/event.html b/itf/templates/modules/events/event.html index 416ef3a..33d326d 100644 --- a/itf/templates/modules/events/event.html +++ b/itf/templates/modules/events/event.html @@ -27,26 +27,23 @@ $(function() {
-

{{ title }}

- -
Tag-line: {{ oneliner }}
-
Description: {{ description }}
-
Event Type: {{ event_type }}
-
Address: {{ address }}
-
City: {{ city }}
-
Start date: {{ start_date|date:"jS M, Y" }}
+

{{ title }}

+
{{ oneliner }}
+
+
Type of Event: {{ event_type }}

+
{{ description }}
+
+
{{ start_date|date:"jS M, Y" }} - {{ start_date|date:"jS M, Y" }}
{% if start_time %} -
Start time: {{ start_time|time:"P" }}
+
{{ start_time|time:"P" }} - {{ end_time|time:"P" }}
{% endif %} - {% if end_date %} -
End date: {{ end_date|date:"jS M, Y" }}
- {% endif %} - {% if end_time %} -
End time: {{ end_time|time:"P" }}
- {% endif %} - +
+
{{ address }}
+
+
{{ city }}
+
{% if booking_link %} -
Booking Link: {{ booking_link }}
+
For bookings, please visit: {{ booking_link }}
{% endif %}
@@ -134,6 +131,28 @@ $(function() { {% endfor %} {% endif %} + {% if groups.organizers %} +
Organizing Groups
+ + {% for group in groups.organizers %} + +
+
+ {{ group.name }} +
+ +
+ {{ group.name }} +
{{ group.locations.0.city.name }}
+
+
+ +
+ + {% endfor %} + + {% endif %} + {% if groups.performing %}
Groups Performing
@@ -155,6 +174,28 @@ $(function() { {% endfor %} {% endif %} + {% if groups.venue %} +
Groups Venue
+ + {% for group in groups.venue %} + +
+
+ {{ group.name }} +
+ +
+ {{ group.name }} +
{{ group.locations.0.city.name }}
+
+
+ +
+ + {% endfor %} + + {% endif %} +