Skip to content
Snippets Groups Projects
Commit 66a8d7ec authored by Christian Pointner's avatar Christian Pointner
Browse files

merged stable into master

parents 11bf1e04 a1487772
No related branches found
No related tags found
No related merge requests found
......@@ -335,14 +335,20 @@ class ProgramSlot(models.Model):
def save(self, *args, **kwargs):
if self.pk:
old = ProgramSlot.objects.get(pk=self.pk)
if self.rrule != old.rrule \
or self.byweekday != old.byweekday \
or self.show != old.show \
or self.dstart != old.dstart \
or self.tstart != old.tstart \
or self.tend != old.tend \
or self.is_repetition != old.is_repetition:
raise ValidationError(u"only until can be changed")
if self.rrule != old.rrule:
raise ValidationError(u"Recurrence rule cannot ba changed")
if self.byweekday != old.byweekday:
raise ValidationError(u"Weekday cannot be changed")
if self.show != old.show:
raise ValidationError(u"Show cannot be changed")
if self.dstart != old.dstart:
raise ValidationError(u"First date cannot ba changed")
if self.tstart != old.tstart:
raise ValidationError(u"Start time cannot be changed")
if self.tend != old.tend:
raise ValidationError(u"End time cannot be changed")
if self.is_repetition != old.is_repetition:
raise ValidationError(u"Is repetition cannot be changed")
else:
old = False
......
......@@ -73,9 +73,20 @@
<div class="title">{{ note.title }}</div>
</li>
{% endfor %}
{% if show.predecessor and show.predecessor.notes.all %}
{% if show.name != show.predecessor.name %}
<h3>Davor als <a href="{% url "show-detail" show.predecessor.slug %}">{{ show.predecessor.name }}</a></h3>
{% endif %}
{% for note in show.predecessor.notes.all reversed %}
<li>
<a href="{% url "timeslot-detail" note.timeslot.id %}"
title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a>
<div class="title">{{ note.title }}</div>
</li>
{% endfor %}
{% endif %}
</ul>
{% endif %}
</div>
</body>
......
......@@ -50,7 +50,7 @@ class ShowListView(ListView):
class ShowDetailView(DetailView):
queryset = Show.objects.filter(is_active=True).exclude(id=1).distinct()
queryset = Show.objects.all().exclude(id=1)
template_name = 'show_detail.html'
......@@ -205,6 +205,7 @@ def json_day_schedule(request, year=None, month=None, day=None):
'id': ts.programslot.show.id,
'automation-id': -1
}
if ts.programslot.automation_id:
entry['automation-id'] = ts.programslot.automation_id
elif ts.programslot.show.automation_id:
......
......@@ -3,4 +3,4 @@ MySQL-python==1.2.5
Pillow==3.2.0
PyYAML==3.11
django-tinymce==2.3.0
python-dateutil==2.5.2
python-dateutil==2.5.3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment