Commit 2ea071f4 authored by gijs's avatar gijs
Browse files

Changed relation between programmeItem and event: a programmeItem can only...

Changed relation between programmeItem and event: a programmeItem can only have one event. Adjusted Breadcrumb nav for notes attached to programmeItem to also include the event.
parent f6da3785
......@@ -817,7 +817,7 @@ class ProgrammeItem (Model):
'time': fields.Single(fields.TimeField()),
'produser': multiLinkMultiReverse('produser', 'events'),
'participant': multiLinkMultiReverse('produser', 'events_participant'),
'event': multiLinkMultiReverse('event', 'programmeItems'),
'event': linkMultiReverse('event', 'programmeItems'),
'title': fields.Single(fields.InlineMarkdownField()),
'summary': fields.Single(fields.MarkdownField()),
'location': fields.Single(fields.StringField()),
......
......@@ -2,6 +2,9 @@
{% block title %}
Caveat
{% if note.programmeItem.resolved %}
{% if note.programmeItem.target.event.resolved %}
{{ note.programmeItem.target.event }}
{% endif %}
→ {{ note.programmeItem }}
{% elif note.event.resolved %}
→ {{ note.event }}
......@@ -13,6 +16,9 @@
<ul>
{% if note.programmeItem.resolved %}
<li><a href="../index.html">Timeline</a></li>
{% if note.programmeItem.target.event.resolved %}
<li><a href="{{ note.programmeItem.target.event.target.link }}">{{ note.programmeItem.target.event }}
{% endif %}
<li><a href="{{ note.programmeItem.target.link }}">{{ note.programmeItem }}</a></li>
{% elif note.event.resolved %}
<li><a href="../index.html">Timeline</a></li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment