fix image thumbs on event people / groups, add some categories
This commit is contained in:
parent
ff788fcc94
commit
77fdef9234
|
@ -106,7 +106,8 @@ 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')]
|
||||
'organizers': [ obj.group for obj in self.groupevent_set.filter(typ='organizers')],
|
||||
'participating': [ obj.group for obj in self.groupevent_set.filter(typ='participating')]
|
||||
}
|
||||
rdict['groups']= groups
|
||||
rdict['has_people_tab'] = True
|
||||
|
@ -114,7 +115,10 @@ class Event(ItfModel):
|
|||
if self.people.all():
|
||||
people= {
|
||||
'attendees': [ obj.person for obj in self.personevent_set.filter(typ='attendee')],
|
||||
'facilitators': [ obj.person for obj in self.personevent_set.filter(typ='facilitator')],
|
||||
'mentors': [ obj.person for obj in self.personevent_set.filter(typ='mentor')],
|
||||
'organisers': [ obj.person for obj in self.personevent_set.filter(typ='organiser')],
|
||||
'participants': [ obj.person for obj in self.personevent_set.filter(typ='participant')],
|
||||
'performers': [ obj.person for obj in self.personevent_set.filter(typ='performer')]
|
||||
}
|
||||
rdict['people']= people
|
||||
|
@ -125,7 +129,10 @@ class Event(ItfModel):
|
|||
|
||||
PERSON_EVENT_CHOICES = (
|
||||
('attendee', 'Attendee'),
|
||||
('facilitator', 'Facilitator'),
|
||||
('mentor', 'Mentor'),
|
||||
('organiser', 'Organiser'),
|
||||
('participant', 'Participant'),
|
||||
('performer', 'Performer'),
|
||||
)
|
||||
|
||||
|
@ -139,6 +146,7 @@ GROUP_EVENT_CHOICES = (
|
|||
('venue', 'Venue'),
|
||||
('performing', 'Performing'),
|
||||
('organizers', 'Organizers'),
|
||||
('participating', 'Participating'),
|
||||
)
|
||||
|
||||
class GroupEvent(models.Model):
|
||||
|
|
|
@ -80,7 +80,7 @@ $(function() {
|
|||
{% for person in people.organisers %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ person.get_image }}" alt="/static/images/150x150.jpg" />
|
||||
<img src="{{ person.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
|
@ -100,7 +100,7 @@ $(function() {
|
|||
{% for person in people.performers %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ person.get_image }}" alt="/static/images/150x150.jpg" />
|
||||
<img src="{{ person.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
|
@ -114,6 +114,45 @@ $(function() {
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if people.facilitators %}
|
||||
<h5>Facilitators</h5>
|
||||
|
||||
{% for person in people.facilitators %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ person.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<a href="{{ person.get_absolute_url }}">{{ person.first_name }} {{ person.last_name }}</a>
|
||||
<div>{{ person.about|truncatewords:40 }}</div>
|
||||
<div>{{ person.locations.0.city.name }}</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if people.mentors %}
|
||||
<h5>Mentors</h5>
|
||||
|
||||
{% for person in people.mentors %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ person.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<a href="{{ person.get_absolute_url }}">{{ person.first_name }} {{ person.last_name }}</a>
|
||||
<div>{{ person.about|truncatewords:40 }}</div>
|
||||
<div>{{ person.locations.0.city.name }}</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if people.attendees %}
|
||||
<h5>Attendees</h5>
|
||||
|
@ -121,7 +160,7 @@ $(function() {
|
|||
{% for person in people.attendees %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ person.get_image }}" alt="/static/images/150x150.jpg" />
|
||||
<img src="{{ person.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
|
@ -135,6 +174,27 @@ $(function() {
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if people.participants %}
|
||||
<h5>Participants</h5>
|
||||
|
||||
{% for person in people.participants %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ person.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<a href="{{ person.get_absolute_url }}">{{ person.first_name }} {{ person.last_name }}</a>
|
||||
<div>{{ person.about|truncatewords:40 }}</div>
|
||||
<div>{{ person.locations.0.city.name }}</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if groups.organizers %}
|
||||
<h5>Organizing Groups</h5>
|
||||
|
||||
|
@ -142,7 +202,7 @@ $(function() {
|
|||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ group.get_image }}" alt="{{ group.name }}" />
|
||||
<img src="{{ group.get_main_image.thumb }}" alt="{{ group.name }}" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
|
@ -164,7 +224,7 @@ $(function() {
|
|||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ group.get_image }}" alt="{{ group.name }}" />
|
||||
<img src="{{ group.get_main_image.thumb }}" alt="{{ group.name }}" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
|
@ -185,7 +245,7 @@ $(function() {
|
|||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ group.get_image }}" alt="{{ group.name }}" />
|
||||
<img src="{{ group.get_main_image.thumb }}" alt="{{ group.name }}" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
|
@ -199,7 +259,27 @@ $(function() {
|
|||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% if groups.participating %}
|
||||
<h5>Participating Groups</h5>
|
||||
|
||||
{% for group in groups.participating %}
|
||||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ group.get_main_image.thumb }}" 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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user