Events, groups organizers added, template done acc. to testing feedback

This commit is contained in:
Johnson Chetty 2013-05-28 15:09:51 +02:00
parent d4a9605c85
commit ecfd4d3aa4
2 changed files with 60 additions and 17 deletions

View File

@ -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):

View File

@ -27,26 +27,23 @@ $(function() {
</ul>
<div id="about" class="tab_content">
<h3>{{ title }}</h3>
<div><strong>Tag-line: </strong> {{ oneliner }}</div>
<div><strong>Description: </strong> {{ description }} </div>
<div><strong>Event Type: </strong> {{ event_type }}</div>
<div><strong>Address:</strong> {{ address }}</div>
<div><strong>City:</strong> {{ city }}</div>
<div><strong>Start date:</strong> {{ start_date|date:"jS M, Y" }}</div>
<h3>{{ title }}</h3>
<div><i> {{ oneliner }}</i></div>
<br/>
<div>Type of Event: {{ event_type }}</div> <br/>
<div> {{ description }} </div>
<br />
<div> {{ start_date|date:"jS M, Y" }} - {{ start_date|date:"jS M, Y" }} </div>
{% if start_time %}
<div><strong>Start time:</strong> {{ start_time|time:"P" }}</div>
<div> {{ start_time|time:"P" }} - {{ end_time|time:"P" }}</div>
{% endif %}
{% if end_date %}
<div><strong>End date:</strong> {{ end_date|date:"jS M, Y" }}</div>
{% endif %}
{% if end_time %}
<div><strong>End time:</strong> {{ end_time|time:"P" }}</div>
{% endif %}
<br/>
<div> {{ address }} </div>
<br/>
<div> {{ city }}</div>
<br/>
{% if booking_link %}
<div><strong>Booking Link: </strong><a href="{{ booking_link }}" target="_blank">{{ booking_link }}</a></div>
<div>For bookings, please visit: <a href="{{ booking_link }}" target="_blank">{{ booking_link }}</a></div>
{% endif %}
</div> <!-- end div about -->
@ -134,6 +131,28 @@ $(function() {
{% endfor %}
{% endif %}
{% if groups.organizers %}
<h5>Organizing Groups</h5>
{% for group in groups.organizers %}
<div class="productionEach">
<div class="productionEachImg">
<img src="{{ group.get_image }}" alt="{{ group.name }}" />
</div>
<div class="productionEachTextA">
<a href="{{ group.get_absolute_url }}">{{ group.name }}</a>
<div>{{ group.locations.0.city.name }}</div>
</div>
<div class="clear"></div>
</div> <!-- end production each -->
{% endfor %}
{% endif %}
{% if groups.performing %}
<h5>Groups Performing</h5>
@ -155,6 +174,28 @@ $(function() {
{% endfor %}
{% endif %}
{% if groups.venue %}
<h5>Groups Venue</h5>
{% for group in groups.venue %}
<div class="productionEach">
<div class="productionEachImg">
<img src="{{ group.get_image }}" alt="{{ group.name }}" />
</div>
<div class="productionEachTextA">
<a href="{{ group.get_absolute_url }}">{{ group.name }}</a>
<div>{{ group.locations.0.city.name }}</div>
</div>
<div class="clear"></div>
</div> <!-- end production each -->
{% endfor %}
{% endif %}
</div>