Added task deletion. GUI still ugly, though.

This commit is contained in:
2016-09-23 13:58:14 +02:00
parent 971b8e6392
commit 3925c044d5
6 changed files with 115 additions and 3 deletions

View File

@@ -48,11 +48,10 @@
href="{{ url_for('attract.shots.perproject.with_task', project_url=project.url, task_id=task._id) }}",
class="status-{{ task.properties.status }} task-link")
| {% endfor %}
| {% if not tasks_for_shots[shot._id][task_type] %}
a.task-add(
class="task-add-link {% if tasks_for_shots[shot._id][task_type] %}hidden{% endif %}"
href="javascript:task_create('{{ shot._id }}', '{{ project.url }}', '{{ task_type }}');")
| + Task
| {% endif %}
| {% endfor %}
| {% endfor %}

View File

@@ -48,8 +48,11 @@
| {% endfor %}
.input-transparent-group
| {% if 'DELETE' in task.allowed_methods %}
button.btn.btn-danger(type='button',onclick="task_delete('{{ task._id }}', '{{ task._etag }}', '{{ url_for('attract.tasks.delete', task_id=task._id, _method='DELETE') }}')") Delete
| {% endif %}
| {% if 'PUT' in task.allowed_methods %}
button.btn.btn-default.btn-block(type='submit') Save Changes
button.btn.btn-default(type='submit') Save Changes
| {% endif %}