Commits

Anonymous committed 6348954

Support for multiple streams per item

  • Participants
  • Parent commits 0ed5e70

Comments (0)

Files changed (1)

File templates/mediatr/item_detail.html

 {% extends "base.html" %}
 
 {% block stream %}
-{% if object.stream_id %}
+{% ifequal object.stream.count 1 %}
+{% with object.stream.get as stream %}
 <div id="stream-meta">
-<h1><a href="{{ object.stream.get_absolute_url }}">{{ object.stream.name }}</a></h1>
-<p>{{ object.stream.description|safe }}</p>
+<h1><a href="{{ stream.get_absolute_url }}">{{ stream.name }}</a></h1>
+<p>{{ stream.description|safe }}</p>
 </div>
-{% endif %}
+{% endwith %}
+{% endifequal %}
 <div id="stream-item">
     {% if object.is_image %}
     <a href="{{ object.get_absolute_url }}"><img src="{{ object.file.url }}" alt="{{ object.name }}" /></a>