diff --git a/src/templates/attract/shots/for_project.jade b/src/templates/attract/shots/for_project.jade index e75f2a5..c4034ab 100644 --- a/src/templates/attract/shots/for_project.jade +++ b/src/templates/attract/shots/for_project.jade @@ -53,11 +53,14 @@ class="status-{{ task.properties.status }} task-link", title="Task: {{ task.name }}") | {% endfor %} + //- Dirty hack, assume a user can create a task for a shot if they can edit the shot. + | {% if 'PUT' in shot.allowed_methods %} a.task-add( title="Add a new '{{ task_type }}' task", class="task-add-link {% if tasks_for_shots[shot._id][task_type] %}hidden{% endif %}" href="javascript:task_create('{{ shot._id }}', '{{ task_type }}');") | + Task + | {% endif %} | {% endfor %} | {% endfor %} diff --git a/src/templates/attract/tasks/for_project.jade b/src/templates/attract/tasks/for_project.jade index 7e4f33b..310a78b 100644 --- a/src/templates/attract/tasks/for_project.jade +++ b/src/templates/attract/tasks/for_project.jade @@ -6,9 +6,10 @@ .col_header.task-list-header | Tasks a.task-project(href="{{url_for('projects.view', project_url=project.url)}}") {{ project.name }} - + //- Dirty hack, assume a user can create a task if they can edit the project. + | {% if 'PUT' in project.allowed_methods %} a#task-add(href="javascript:task_create(undefined, 'generic');") + Create Task - + | {% endif %} #task-list.col-list | {% for task in tasks %} //- NOTE: this is tightly linked to the JS in tasks.js, function task_add()