From 504fa1791005e60b323576348be36591fea551c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 22 Sep 2016 11:08:02 +0200 Subject: [PATCH] Shot list: don't show task creation button when there is no task of that type --- src/templates/attract/shots/for_project.jade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/templates/attract/shots/for_project.jade b/src/templates/attract/shots/for_project.jade index 33f83fc..3ab3f66 100644 --- a/src/templates/attract/shots/for_project.jade +++ b/src/templates/attract/shots/for_project.jade @@ -27,9 +27,11 @@ class="status-{{ task.properties.status }}") {{ task.name }} br | {% endfor %} + | {% if not tasks_for_shots[shot._id][task_type] %} a( href="javascript:task_create('{{ shot._id }}', '{{ project.url }}', '{{ task_type }}');") | + Task + | {% endif %} | {% endfor %} | {% endfor %}