Added /attract/<project_url>/shots/with-task/<task-id> endpoint

This commit is contained in:
2016-09-22 11:32:04 +02:00
parent 1e72d0425e
commit c45613b5fa
2 changed files with 9 additions and 1 deletions

View File

@@ -32,8 +32,9 @@ def index():
@perproject_blueprint.route('/', endpoint='index') @perproject_blueprint.route('/', endpoint='index')
@perproject_blueprint.route('/with-task/<task_id>', endpoint='index')
@attract_project_view(extension_props=True) @attract_project_view(extension_props=True)
def for_project(project, attract_props): def for_project(project, attract_props, task_id=None):
api = pillar_api() api = pillar_api()
found = pillarsdk.Node.all({ found = pillarsdk.Node.all({
@@ -55,6 +56,7 @@ def for_project(project, attract_props):
shots=shots, shots=shots,
tasks_for_shots=tasks_for_shots, tasks_for_shots=tasks_for_shots,
task_types=task_types, task_types=task_types,
open_task_id=task_id,
project=project, project=project,
attract_props=attract_props) attract_props=attract_props)

View File

@@ -43,3 +43,9 @@
#task-details #task-details
| {% endblock %} | {% endblock %}
| {% block footer_scripts %}
| {% if open_task_id %}
script.
$(function() { task_open('{{ open_task_id }}', '{{ project.url }}'); });
| {% endif %}
| {% endblock footer_scripts %}