Use project properties to show shot-level task types

This commit is contained in:
2016-09-20 18:01:00 +02:00
parent 265d898ebd
commit 10cdf746f3
3 changed files with 21 additions and 4 deletions

View File

@@ -1 +1,8 @@
| {% extends 'layout.html' %}
| {% block head %}
style(type='text/css').
option.invalid_task {
color: red;
background-color: #fee;
}
| {% endblock %}

View File

@@ -6,7 +6,14 @@ script(src="{{ url_for('static_attract', filename='js/tasks.js') }}",async=true)
input.form-control(name="name",autofocus=true,type=text,placeholder='Task name',aria-describedby="task-addon-name",value="{{ task.name|hide_none }}")
.input-group
span.input-group-addon#task-addon-type(title='Task type') T
input.form-control(name="task_type",type=text,placeholder='Task type',aria-describedby="task-addon-type",value="{{ task.properties.task_type|hide_none }}")
select.form-control(name="task_type",aria-describedby="task-addon-task_type")
| {% for task_type in attract_props.task_types.attract_shot %}
| <option value="{{ task_type }}" {% if task_type == task.properties.task_type %}selected{% endif %}>{{ task_type|undertitle }}</option>
| {% endfor %}
| {% if task.properties.task_type not in attract_props.task_types.attract_shot %}
option(value="{{ task.properties.task_type }}",selected).invalid_task {{ task.properties.task_type|undertitle }}
| {% endif %}
.input-group
span.input-group-addon#task-addon-description(title='Description') D
textarea.form-control(name="description",type=text,placeholder='Task description',aria-describedby="task-addon-description") {{ task.description|hide_none }}