162 lines
5.5 KiB
Plaintext
162 lines
5.5 KiB
Plaintext
.attract-box.task.with-status(
|
|
class="status-{{ task.properties.status }}")
|
|
form#task_form(onsubmit="return task_save('{{task._id}}', '{{ url_for('attract.tasks.perproject.save', project_url=project['url'], task_id=task._id) }}')")
|
|
input(type='hidden',name='_etag',value='{{ task._etag }}')
|
|
//- NOTE: if you add fields here, also add them read-only below.
|
|
.input-transparent-group
|
|
| {% if 'PUT' in task.allowed_methods %}
|
|
input.input-transparent.item-name(
|
|
name="name",
|
|
type="text",
|
|
placeholder='Name',
|
|
value="{{ task.name | hide_none }}")
|
|
| {% else %}
|
|
h2.item-name {{ task.name | hide_none }}
|
|
| {% endif %}
|
|
|
|
.dropdown(style='margin-left: auto')
|
|
button#item-dropdown.btn.btn-default.dropdown-toggle(
|
|
type='button',
|
|
data-toggle='dropdown',
|
|
aria-haspopup='true', aria-expanded='true')
|
|
i.pi-more-vertical
|
|
ul.dropdown-menu(aria-labelledby='item-dropdown')
|
|
li.copy-to-clipboard(data-clipboard-text="{{ task._id }}")
|
|
a(href="javascript:void(0)")
|
|
i.pi-clipboard-copy
|
|
| Copy ID to Clipboard
|
|
| {% if attract_context != 'shot' and task.parent %}
|
|
li
|
|
a(href="{{ url_for('attract.shots.perproject.with_task', project_url=project['url'], task_id=task['_id']) }}")
|
|
i.pi-film-thick
|
|
| View in shot context
|
|
| {% endif %}
|
|
| {% if 'DELETE' in task.allowed_methods %}
|
|
li.divider(role='separator')
|
|
li.item-delete
|
|
a(href="javascript:task_delete('{{ task._id }}', '{{ task._etag }}', '{{ url_for('attract.tasks.delete', task_id=task._id, _method='DELETE') }}')")
|
|
i.pi-trash
|
|
| Delete Task
|
|
| {% endif %}
|
|
|
|
| {% if 'PUT' in task.allowed_methods %}
|
|
.input-transparent-group
|
|
textarea#task-description.input-transparent(
|
|
name="description",
|
|
type="text",
|
|
placeholder='Description') {{ task.description | hide_none }}
|
|
|
|
.input-group-flex
|
|
.input-transparent-group.field-type
|
|
label#task-task_type Type:
|
|
select.input-transparent(name="task_type",aria-describedby="task-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-transparent-group
|
|
label#task-status Status:
|
|
select.input-transparent(
|
|
name="status",
|
|
aria-describedby="task-status")
|
|
| {% for status in task_node_type.dyn_schema.status.allowed %}
|
|
| <option value="{{ status }}" {% if status == task.properties.status %}selected{% endif %}>{{ status | undertitle }}</option>
|
|
| {% endfor %}
|
|
|
|
.input-group-separator
|
|
|
|
.input-transparent-group.select_multiple
|
|
label Assignees:
|
|
select#assignees.input-transparent(
|
|
name="users",
|
|
multiple,
|
|
placeholder="Assigned to"
|
|
aria-describedby="task-addon-users")
|
|
| {% for u in project.users %}
|
|
| <option value="{{ u._id }}" {% if task.properties.assigned_to.users and u._id in task.properties.assigned_to.users %}selected{% endif %}>{{ u.full_name }}</option>
|
|
| {% endfor %}
|
|
|
|
.input-group-separator
|
|
|
|
.input-transparent-group
|
|
button#item-save.btn.btn-default.btn-block(type='submit')
|
|
i.pi-check
|
|
| Save Task
|
|
| {% else %}
|
|
//- NOTE: read-only versions of the fields above.
|
|
| {% if task.description %}
|
|
p.item-description {{ task.description | hide_none }}
|
|
| {% endif %}
|
|
|
|
.table.item-properties
|
|
.table-body
|
|
.table-row
|
|
.table-cell Task Type
|
|
.table-cell {{ task.properties.task_type | undertitle }}
|
|
.table-row.properties-status.js-help(
|
|
data-url="{{ url_for('attract.help', project_url=project.url) }}")
|
|
.table-cell Status
|
|
.table-cell(class="status-{{ task.properties.status }}")
|
|
| {{ task.properties.status | undertitle }}
|
|
| {% if attract_context != 'shot' and task._parent_info %}
|
|
.table-row
|
|
.table-cell Shot
|
|
.table-cell
|
|
a(href="{{ url_for('attract.shots.perproject.with_task', project_url=project['url'], task_id=task['_id']) }}") {{ task._parent_info.name }}
|
|
| {% endif %}
|
|
.table-row.properties-assignees
|
|
.table-cell Assignees
|
|
.table-cell
|
|
| {% for u in task.properties.assigned_to['users'] %}
|
|
span(title="{{ u.username }}") {{ u.full_name }}
|
|
| {% else %}
|
|
span.hint Not assigned yet
|
|
| {% endfor %}
|
|
|
|
| {% endif %}
|
|
|
|
#item-view-feed
|
|
#activities
|
|
#comments-container
|
|
|
|
| {% if config.DEBUG %}
|
|
.debug-info
|
|
a.debug-info-toggle(role='button',
|
|
data-toggle='collapse',
|
|
href='#debug-content',
|
|
aria-expanded='false',
|
|
aria-controls='debug-content')
|
|
i.pi-info
|
|
| Debug Info
|
|
#debug-content.collapse
|
|
pre.
|
|
{{ task.to_dict() | pprint }}
|
|
| {% endif %}
|
|
|
|
script.
|
|
$("#assignees").select2();
|
|
|
|
if (ProjectUtils.context() == 'shot'){
|
|
$('.field-type').hide();
|
|
}
|
|
|
|
new Clipboard('.copy-to-clipboard');
|
|
|
|
var url = "{{ url_for('.activities', project_url=project.url, task_id=task['_id']) }}";
|
|
load_activities(url); // from 10_tasks.js
|
|
loadComments("{{ url_for('nodes.comments_for_node', node_id=task['_id']) }}");
|
|
|
|
{% if 'PUT' in task.allowed_methods %}
|
|
/* Resize textarea */
|
|
var text = $('#task-description').val(),
|
|
matches = text.match(/\n/g),
|
|
breaks = matches ? matches.length : 2;
|
|
|
|
$('#task-description').attr('rows',breaks + 4);
|
|
{% endif %}
|
|
|
|
$('.js-help').openModalUrl('Help', "{{ url_for('attract.help', project_url=project.url) }}");
|