From 90b4e8c5f068c2a866cab43c8cb35327195687c8 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Wed, 11 Oct 2017 10:51:46 +0200
Subject: [PATCH] Minor update on production

---
 production/managers.py                                         | 3 +++
 .../templates/production/partials/production_stream_card.html  | 2 +-
 .../production/partials/production_stream_card_completed.html  | 2 +-
 production/templates/production/production.html                | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/production/managers.py b/production/managers.py
index 5bd1b5c00..a88a6ed1c 100644
--- a/production/managers.py
+++ b/production/managers.py
@@ -23,6 +23,9 @@ class ProductionEventManager(models.Manager):
     def get_my_events(self, production_user):
         return self.filter(noted_by=production_user)
 
+    def all_without_duration(self):
+        return self.filter(duration__isnull=True)
+
 
 class ProofsQuerySet(models.QuerySet):
     def for_authors(self):
diff --git a/production/templates/production/partials/production_stream_card.html b/production/templates/production/partials/production_stream_card.html
index 85473b2a3..1637b4bfe 100644
--- a/production/templates/production/partials/production_stream_card.html
+++ b/production/templates/production/partials/production_stream_card.html
@@ -7,7 +7,7 @@
     {% include 'production/partials/stream_status_changes.html' with form=status_form stream=stream %}
 
   <h3>Events</h3>
-  {% include 'production/partials/production_events.html' with events=stream.events.all %}
+  {% include 'production/partials/production_events.html' with events=stream.events.all_without_duration %}
 
   {% if "can_work_for_stream" in sub_perms and prodevent_form %}
     <h3>Add message to the Stream</h3>
diff --git a/production/templates/production/partials/production_stream_card_completed.html b/production/templates/production/partials/production_stream_card_completed.html
index 19eb76bb6..fd91b0618 100644
--- a/production/templates/production/partials/production_stream_card_completed.html
+++ b/production/templates/production/partials/production_stream_card_completed.html
@@ -38,7 +38,7 @@
 
       {% block actions %}
           <h3>Events</h3>
-          {% include 'production/partials/production_events.html' with events=stream.events.all non_editable=1 %}
+          {% include 'production/partials/production_events.html' with events=stream.events.all_without_duration non_editable=1 %}
 
           <h3>Work Log</h3>
           {% include 'partials/finances/logs.html' with logs=stream.work_logs.all %}
diff --git a/production/templates/production/production.html b/production/templates/production/production.html
index 844922fd0..caf432ea2 100644
--- a/production/templates/production/production.html
+++ b/production/templates/production/production.html
@@ -67,7 +67,7 @@
                             </div>
                             <div>
                                 <p class="mb-1">
-                                    <a href="{% url 'production:stream' stream.id %}">{{ stream.submission.title }}</a><br>
+                                    <a href="{% url 'production:stream' stream.id %}" data-toggle="dynamic" data-target="#details">{{ stream.submission.title }}</a><br>
                                     <em>by {{ stream.submission.author_list }}</em>
                                 </p>
                                 <p class="card-text mb-2">
-- 
GitLab