if statement for notes; display workshops / events in group template
This commit is contained in:
parent
ab4e151f84
commit
13e307ec5c
|
@ -366,6 +366,7 @@ class TheatreGroup(ItfModel):
|
|||
return False
|
||||
|
||||
def get_dict(self):
|
||||
|
||||
return {
|
||||
#'object':self,
|
||||
'name': self.name,
|
||||
|
@ -383,6 +384,8 @@ class TheatreGroup(ItfModel):
|
|||
'resources': [obj for obj in self.resources.all()],
|
||||
'buzzitems': [obj for obj in self.buzzitems.all()],
|
||||
'productions': [obj for obj in self.production_set.all() ],
|
||||
'workshops': [obj for obj in self.event_set.filter(event_type='workshop')],
|
||||
'other_events': [obj for obj in self.event_set.exclude(event_type='workshop')],
|
||||
'scripts': [obj for obj in self.script_set.all() ],
|
||||
'people' : [obj for obj in self.persongroup_set.all() ],
|
||||
'worked_with_people': self.worked_with_people()
|
||||
|
|
|
@ -22,7 +22,9 @@ $(function() {
|
|||
<li><a href="#gallery">Gallery</a></li>
|
||||
{% endif %}
|
||||
<li><a href="#buzz">Buzz</a></li>
|
||||
{% if user_has_perms or notes %}
|
||||
<li><a href="#notes">Notes</a></li>
|
||||
{% endif %}
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ $(function() {
|
|||
<li><a href="#cast">Cast and Crew</a></li>
|
||||
<li><a href="#gallery">Gallery</a></li>
|
||||
<li><a href="#buzz">Buzz</a></li>
|
||||
{% if user_has_perms or notes %}
|
||||
<li><a href="#notes">Notes</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if shows %}
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
<li><a href="#plays">Plays & more</a></li>
|
||||
<li><a href="#gallery">Gallery</a></li>
|
||||
{% if resources %}<li><a href="#resources">Resources</a></li>{% endif %}
|
||||
{% if user_has_perms or notes %}
|
||||
<li><a href="#notes">Notes</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<div id="about" class="tab_content">
|
||||
|
@ -174,6 +176,7 @@
|
|||
|
||||
|
||||
<div id="plays" class="tab_content">
|
||||
{% if productions %}
|
||||
<h3 class="orange">Plays & more</h3>
|
||||
|
||||
{% for p in productions %}
|
||||
|
@ -182,87 +185,65 @@
|
|||
<img src="{{ p.get_main_image }}" alt="{{ p.name }}" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">
|
||||
<a href="{{ p.get_absolute_url }}">{{ p.name }} {% if p.debut_date %} {{ debut_date|date:"Y" }} {% endif %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<!-- <a href="" class="toggleLink rightFloat">More>></a>
|
||||
|
||||
<div class="clear"></div> -->
|
||||
{% if workshops %}
|
||||
<h3 class="orange">Workshops</h3>
|
||||
|
||||
{% for w in workshops %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ w.get_main_image.thumb }}" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">{{ p.name }} {% if p.debut_date %} {{ debut_date|date:"Y" }} {% endif %}</div>
|
||||
<!-- <div>Group: Group Name</div> -->
|
||||
<!-- <div><em>Title Credits: (not implemented)</em></div>
|
||||
<div>No. of shows: (not implemented)</div> -->
|
||||
<div class="orangeInnerRight">
|
||||
<a href="{{ w.get_absolute_url }}">
|
||||
{{ w.title }}
|
||||
</a>
|
||||
</div>
|
||||
<div><em>{{ w.oneliner }}</em></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% if other_events %}
|
||||
<h3 class="orange">Other Events</h3>
|
||||
|
||||
{% for o in other_events %}
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="{{ o.get_main_image.thumb }}" alt="{{ o.title }}" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">
|
||||
<a href="{{ o.get_absolute_url }}">
|
||||
{{ o.event_type }}: {{ o.title }}
|
||||
</a>
|
||||
</div>
|
||||
<div><em>{{ o.oneliner }}</em></div>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
{% endfor %}
|
||||
|
||||
<!-- <a href="" class="toggleLink rightFloat">More>></a>
|
||||
|
||||
<div class="clear"></div> -->
|
||||
|
||||
<h3 class="orange">Workshops (not implemented)</h3>
|
||||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="" alt="/static/images/150x150.jpg" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">Name of workshops</div>
|
||||
<div><em>One line desc</em></div>
|
||||
<div>Current</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="" alt="/static/images/150x150.jpg" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">Name of workshops</div>
|
||||
<div><em>One line desc</em></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
|
||||
<br />
|
||||
|
||||
<a href="" class="rightFloat">More>></a>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
|
||||
<h3 class="orange">More</h3>
|
||||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="" alt="/static/images/150x150.jpg" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">Name of activity (talk, whatever)</div>
|
||||
<div><em>One line desc</em></div>
|
||||
<div>Current</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
|
||||
<div class="productionEach">
|
||||
<div class="productionEachImg">
|
||||
<img src="" alt="/static/images/150x150.jpg" />
|
||||
</div>
|
||||
|
||||
<div class="productionEachTextA">
|
||||
<div class="orangeInnerRight">Name of activity (talk, whatever)</div>
|
||||
<div><em>One line desc</em></div>
|
||||
<div>Current</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div> <!-- end production each -->
|
||||
|
||||
{% endif %}
|
||||
</div> <!-- end plays -->
|
||||
|
||||
<div id="gallery" class="tab_content">
|
||||
|
|
|
@ -14,7 +14,9 @@ $(function() {
|
|||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#productions">Productions</a></li>
|
||||
{% if related_people %}<li><a href="#people">People</a></li>{% endif %}
|
||||
{% if user_has_perms or notes %}
|
||||
<li><a href="#notes">Notes</a></li>
|
||||
{% endif %}
|
||||
{% if obj.galleries.count %} <li><a href="#gallery">Gallery</a></li> {% endif %}
|
||||
{% if resources %}<li><a href="#resources">Resources</a></li>{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue
Block a user