create rough template for events

This commit is contained in:
Sanjay B 2013-04-05 15:06:04 +05:30
parent 34a28a2718
commit 80e6b2622e
2 changed files with 88 additions and 1 deletions

View File

@ -7,7 +7,7 @@ from django.contrib.localflavor.in_.forms import INZipCodeField
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic from django.contrib.contenttypes import generic
from itfprofiles.models import City, Location, Production, TheatreGroup, Person from itfprofiles.models import City, Location, Production, TheatreGroup, Person
from mediagallery.models import GalleryAlbum
EVENT_TYPE_CHOICES = ( EVENT_TYPE_CHOICES = (
@ -41,6 +41,7 @@ class Event(ItfModel):
tel_no = models.CharField(max_length=100, blank=True) tel_no = models.CharField(max_length=100, blank=True)
production = models.ForeignKey(Production, blank=True, null=True, help_text="If this is a showing of a production...") production = models.ForeignKey(Production, blank=True, null=True, help_text="If this is a showing of a production...")
galleries = generic.GenericRelation(GalleryAlbum)
people = models.ManyToManyField(Person, blank=True, null=True, through="PersonEvent") people = models.ManyToManyField(Person, blank=True, null=True, through="PersonEvent")
image = models.ImageField(upload_to='images/', blank=True, null=True) image = models.ImageField(upload_to='images/', blank=True, null=True)
groups = models.ManyToManyField(TheatreGroup, blank=True, null=True, through="GroupEvent") groups = models.ManyToManyField(TheatreGroup, blank=True, null=True, through="GroupEvent")

View File

@ -0,0 +1,86 @@
{% load thumbnail %}
<link rel="stylesheet" href="/static/css/modules/tabsinnerright.css" type="text/css" />
<script>
$(function() {
$('.toggleLink').click(function(e) {
e.preventDefault();
$(this).next().slideToggle();
});
});
</script>
<ul class="tabsInnerRight">
<li><a href="#about">About</a></li>
<li><a href="#calendar">Calendar</a></li>
<li><a href="#people">People</a></li>
<li><a href="#gallery">Gallery</a></li>
<li><a href="#buzz">Buzz</a></li>
<li><a href="#notes">Notes</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<div id="about" class="tab_content">
<h3>{{ name }}</h3>
<h4>{{ oneliner }}</h4>
<div><strong>Description: </strong>: {{ description }} </div>
<a href="" class="toggleLink rightFloat">More&gt;&gt;</a>
</div> <!-- end div about -->
<div id="calendar" class="tab_content">
</div> <!-- end calendar -->
<div id="people" class="tab_content">
</div>
<div id="gallery" class="tab_content">
<div class="imgVideoBlock">
<h3 class="orange">Albums</h3>
{% for g in obj.galleries.all %}
{% thumbnail g.thumbnail "160x120" crop="center" as thumb %}
<a href="{{ g.get_absolute_url }}" target="_blank">
<img src="{{ thumb.url }}" width="160" height="120" alt="{{ g.title }}" />
</a>
{% endthumbnail %}
{% endfor %}
<!-- <a href="" class="moreLink">More&raquo;</a> -->
</div>
<br>
{% if obj.get_videos %}
<div class="imgVideoBlock">
<h3 class="orange">Videos</h3>
{% for v in obj.get_videos %}
<img src="{{ v.thumbnail }}" class="youtubeLink thumbsDetails" data-iframe='{{ v.iframe }}' />
{% endfor %}
{% endif %}
<!-- <a href="" class="moreLink">More&raquo;</a> -->
</div> <!-- end gallery -->
<div id="buzz" class="tab_content">
</div> <!-- end buzz -->
<div id="notes" class="tab_content">
<h3 class="orange">Kindly refer to notes in script archive. But instead of Posted by Name, Date, Time, make it - date, time</h3>
</div> <!-- end notes -->
<div id="contact" class="tab_content">
</div>
<script type="text/javascript" src="/static/js/innertabs.js"></script>
<br />
<a href="{{ edit_url }}">Edit</a>