add shows to productions
This commit is contained in:
parent
40aa62f687
commit
3a19473a4b
|
@ -452,10 +452,10 @@ class Production(ItfModel):
|
||||||
from events.models import Event
|
from events.models import Event
|
||||||
rel_level1 = [obj for obj in Production.objects.filter(script=self.script)]
|
rel_level1 = [obj for obj in Production.objects.filter(script=self.script)]
|
||||||
rel_level2 = list(set(obj.production_set.all() for obj in self.script.related_scripts.all()))
|
rel_level2 = list(set(obj.production_set.all() for obj in self.script.related_scripts.all()))
|
||||||
shows = Event.objects.filter(production=self)
|
shows = Event.objects.filter(production=self).order_by('-start_date')
|
||||||
last_date = None
|
last_date = None
|
||||||
if shows.count() > 0:
|
if shows.count() > 0:
|
||||||
last_date = shows.order_by('-start_date')[0].start_date
|
last_date = shows[0].start_date
|
||||||
return {
|
return {
|
||||||
'name': self.name,
|
'name': self.name,
|
||||||
'anecdotes': self.anecdotes,
|
'anecdotes': self.anecdotes,
|
||||||
|
@ -465,6 +465,7 @@ class Production(ItfModel):
|
||||||
'script': self.script,
|
'script': self.script,
|
||||||
'synopsis': self.synopsis,
|
'synopsis': self.synopsis,
|
||||||
'awards': [ obj for obj in self.awards.all()],
|
'awards': [ obj for obj in self.awards.all()],
|
||||||
|
'shows': shows,
|
||||||
'languages': [ obj for obj in self.languages.all()],
|
'languages': [ obj for obj in self.languages.all()],
|
||||||
'debut_date':self.debut_date,
|
'debut_date':self.debut_date,
|
||||||
'last_date': last_date,
|
'last_date': last_date,
|
||||||
|
|
|
@ -10,7 +10,7 @@ $(function() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ul class="tabsInnerRight">
|
<ul class="tabsInnerRight">
|
||||||
<li><a href="#calendar">Calendar</a></li>
|
{% if shows %}<li><a href="#calendar">Calendar</a></li>{% endif %}
|
||||||
<li><a href="#about">About</a></li>
|
<li><a href="#about">About</a></li>
|
||||||
<li><a href="#cast">Cast and Crew</a></li>
|
<li><a href="#cast">Cast and Crew</a></li>
|
||||||
<li><a href="#gallery">Gallery</a></li>
|
<li><a href="#gallery">Gallery</a></li>
|
||||||
|
@ -18,40 +18,39 @@ $(function() {
|
||||||
<li><a href="#notes">Notes</a></li>
|
<li><a href="#notes">Notes</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{% if shows %}
|
||||||
<div id="calendar" class="tab_content">
|
<div id="calendar" class="tab_content">
|
||||||
<h3>{{ name }}</h3>
|
<h3>{{ name }}</h3>
|
||||||
|
|
||||||
(to be implemented)
|
|
||||||
<table width="520" border="1" cellspacing="0" cellpadding="0" class="tableCalendar">
|
<table width="520" border="1" cellspacing="0" cellpadding="0" class="tableCalendar">
|
||||||
<tr>
|
{% for show in shows %}
|
||||||
<td>Date</td>
|
<tr>
|
||||||
<td>Time</td>
|
<td>
|
||||||
<td>Venue, City</td>
|
{{ show.start_date|date:"d M, Y" }}
|
||||||
<td class="orangeNoBold">Book Now/Full</td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
{{ show.start_time|time:"P" }}
|
||||||
<td>Date</td>
|
</td>
|
||||||
<td>Time</td>
|
<td>
|
||||||
<td>Venue, City</td>
|
{{ show.city.name }}
|
||||||
<td class="orangeNoBold">Book Now/Full</td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
{% if show.booking_link %}
|
||||||
<td>Date</td>
|
<a href="{{ show.booking_link }}" target="_blank">Book now</a>
|
||||||
<td>Time</td>
|
{% else %}
|
||||||
<td>Venue, City</td>
|
<a href="{{ show.get_absolute_url }}" target="_blank">More details</a>
|
||||||
<td class="orangeNoBold">Book Now/Full</td>
|
{% endif %}
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
|
||||||
<td>Date</td>
|
</tr>
|
||||||
<td>Time</td>
|
|
||||||
<td>Venue, City</td>
|
{% endfor %}
|
||||||
<td class="orangeNoBold">Book Now/Full</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<a href="" class="toggleLink rightFloat">More>></a>
|
<!-- <a href="" class="toggleLink rightFloat">More>></a> -->
|
||||||
|
|
||||||
</div> <!-- end div calendar -->
|
</div> <!-- end div calendar -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div id="about" class="tab_content">
|
<div id="about" class="tab_content">
|
||||||
|
|
||||||
|
@ -65,14 +64,14 @@ $(function() {
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>From {{ debut_date|date:"Y" }} {% if last_date %} - {{ last_date|date:"Y" }} </div>
|
<div>From {{ debut_date|date:"Y" }} {% if last_date %} - {{ last_date|date:"Y" }} {% endif %}</div>
|
||||||
{% comment %}
|
{% comment %}
|
||||||
<div><strong>No of Shows: </strong> </div>
|
<div><strong>No of Shows: </strong> </div>
|
||||||
<div class="borderYellow"> <a href="" class="toggleLink rightFloat">Book Now>></a>
|
<div class="borderYellow"> <a href="" class="toggleLink rightFloat">Book Now>></a>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{% endcomment %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% endcomment %}
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
{% if playwright %}
|
{% if playwright %}
|
||||||
|
@ -84,12 +83,11 @@ $(function() {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if director %}
|
{% if director %}
|
||||||
<div><strong>Director: </strong>
|
<div><strong>Director: </strong>
|
||||||
{% if director %}
|
|
||||||
<a href="{{ director.get_absolute_url }}" target="_blank">
|
<a href="{{ director.get_absolute_url }}" target="_blank">
|
||||||
{{ director }}
|
{{ director }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
<!-- <div><strong>Credits: name (research), name (music)</strong></div> -->
|
<!-- <div><strong>Credits: name (research), name (music)</strong></div> -->
|
||||||
<div class="borderYellow"> <a href="" class="toggleLink rightFloat">See full credits>></a><br /><br /></div>
|
<div class="borderYellow"> <a href="" class="toggleLink rightFloat">See full credits>></a><br /><br /></div>
|
||||||
|
|
||||||
|
@ -132,18 +130,6 @@ $(function() {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<!--
|
|
||||||
<h5 class="orangeInnerRight">Links</h5>
|
|
||||||
<a href="">Link to article</a>
|
|
||||||
<div>One line desc</div>
|
|
||||||
<br />
|
|
||||||
<a href="">Link to article</a>
|
|
||||||
<div>One line desc</div>
|
|
||||||
<br />
|
|
||||||
<a href="">Link to article</a>
|
|
||||||
<div>One line desc</div>
|
|
||||||
<br />
|
|
||||||
-->
|
|
||||||
</div> <!-- end about -->
|
</div> <!-- end about -->
|
||||||
|
|
||||||
<div id="cast" class="tab_content">
|
<div id="cast" class="tab_content">
|
||||||
|
@ -151,30 +137,11 @@ $(function() {
|
||||||
|
|
||||||
<div id="gallery" class="tab_content">
|
<div id="gallery" class="tab_content">
|
||||||
{% include 'includes/media_gallery.html' %}
|
{% include 'includes/media_gallery.html' %}
|
||||||
<!--
|
|
||||||
<h3 class="orange">Links</h3>
|
|
||||||
<div><a href="">Link</a></div>
|
|
||||||
<div><a href="">Link</a></div>
|
|
||||||
<div><a href="">Link</a></div>
|
|
||||||
<div><a href="">Link</a></div>
|
|
||||||
<a href="" class="rightFloat">More>></a>
|
|
||||||
-->
|
|
||||||
</div> <!-- end gallery -->
|
</div> <!-- end gallery -->
|
||||||
|
|
||||||
<div id="buzz" class="tab_content">
|
<div id="buzz" class="tab_content">
|
||||||
|
|
||||||
{% include 'includes/buzzitems.html' %}
|
{% include 'includes/buzzitems.html' %}
|
||||||
<!-- <h3 class="orangeInnerRight">Reviews</h3>
|
|
||||||
<a href="">Link to article</a>
|
|
||||||
<div>One line desc</div>
|
|
||||||
<br />
|
|
||||||
<a href="">Link to article</a>
|
|
||||||
<div>One line desc</div>
|
|
||||||
<br />
|
|
||||||
<a href="">Link to article</a>
|
|
||||||
<div>One line desc</div>
|
|
||||||
<br />
|
|
||||||
<a href="" class="rightFloat">More>></a> -->
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
{% load comments %}
|
{% load comments %}
|
||||||
|
@ -218,30 +185,6 @@ $(function() {
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="borderYellow">-->
|
|
||||||
<!-- <div>Comments Comments Comments Comments Comments Comments</div>-->
|
|
||||||
<!-- <div class="rightFloat">-Posted by date, time</div>-->
|
|
||||||
<!-- <br /><br />-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
<!-- <div class="borderYellow">-->
|
|
||||||
<!-- <br />-->
|
|
||||||
<!-- <div>Comments Comments Comments Comments Comments Comments</div>-->
|
|
||||||
<!-- <div class="rightFloat">-Posted by date, time</div>-->
|
|
||||||
<!-- <br /><br />-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
<!-- <div class="borderYellow">-->
|
|
||||||
<!-- <br />-->
|
|
||||||
<!-- <div>Comments Comments Comments Comments Comments Comments</div>-->
|
|
||||||
<!-- <div class="rightFloat">-Posted by date, time</div>-->
|
|
||||||
<!-- <br /><br />-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <br />-->
|
|
||||||
<!-- <a href="" class="rightFloat">More>></a>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</div> <!-- end buzz -->
|
</div> <!-- end buzz -->
|
||||||
|
|
||||||
<div id="notes" class="tab_content">
|
<div id="notes" class="tab_content">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user