mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
111 lines
3.4 KiB
Twig
111 lines
3.4 KiB
Twig
<div class="task-show">
|
|
|
|
<h1>{{ 'Task'|trans }}</h1>
|
|
|
|
<h2>{{ task.title }}
|
|
{% for place in workflow_marked_places(task) %}
|
|
<span class="task-status box type-{{ task.type }} place-{{ place }}">{{ place|trans }}</span>
|
|
{% endfor %}
|
|
</h2>
|
|
|
|
<dl class="chill_view_data">
|
|
|
|
<dt class="inline">{{ 'Description'|trans }}</dt>
|
|
<dd>
|
|
{% if task.description is empty %}
|
|
<span class="chill-no-data-statement">{{"No description"|trans}}</span>
|
|
{% else %}
|
|
<blockquote class="chill-user-quote">
|
|
{{ task.description|chill_markdown_to_html }}
|
|
</blockquote>
|
|
{% endif %}
|
|
</dd>
|
|
|
|
<dt class="inline">{{ 'Assignee'|trans }}</dt>
|
|
<dd>
|
|
{% if task.assignee is null %}
|
|
<span class="chill-no-data-statement">{{"No one assignee"|trans}}</span>
|
|
{% else %}
|
|
{{ task.assignee }}
|
|
{% endif %}
|
|
</dd>
|
|
|
|
<dt class="inline">{{ 'Scope'|trans }}</dt>
|
|
<dd>
|
|
<span class="scope">{{ task.scope.name|localize_translatable_string }}</span>
|
|
</dd>
|
|
|
|
<h3>{{"Dates"|trans}}</h3>
|
|
{% if task.startDate is null and task.endDate is null and task.warningDate is null %}
|
|
<dt></dt>
|
|
<dd>
|
|
<span class="chill-no-data-statement">{{"No dates specified"|trans}}</span>
|
|
</dd>
|
|
</dt>
|
|
{% else %}
|
|
{% if task.startDate is not null %}
|
|
<dt class="inline">{{ 'Start'|trans }}</dt>
|
|
<dd>{{ task.startDate|format_date('long') }}</dd>
|
|
{% endif %}
|
|
|
|
{% if task.endDate is not null %}
|
|
<dt class="inline">{{ 'End'|trans }}</dt>
|
|
<dd>{{ task.endDate|format_date('long') }}</dd>
|
|
{% endif %}
|
|
|
|
{% if task.warningDate is not null %}
|
|
<dt class="inline">{{ 'Warning'|trans }}</dt>
|
|
<dd>{{ task.warningDate|format_date('long') }}</dd>
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
</dl>
|
|
|
|
{% if timeline is not null %}
|
|
<h3>{{"Timeline"|trans}}</h3>
|
|
{{ timeline|raw }}
|
|
{% endif %}
|
|
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class="cancel">
|
|
<a class="btn btn-cancel" href="{%- if app.request.query.has('returnPath') -%} {{ app.request.query.get('returnPath')|escape('html_attr') }} {%- else -%} {{ path('chill_task_singletask_list', app.request.query.get('list_params', {}) ) }} {%- endif -%}">
|
|
{{ app.request.query.get('returnLabel')|default('Back to the list'|trans) }}
|
|
</a>
|
|
</li>
|
|
|
|
{% if workflow_transitions(task)|length > 0 %}
|
|
<li>
|
|
<div class="btn-group">
|
|
<a class="btn btn-task-exchange dropdown-toggle" href="#" role="button" id="taskExchange" data-bs-toggle="dropdown" aria-expanded="false">
|
|
{{'Change task status'|trans}}
|
|
</a>
|
|
<ul class="dropdown-menu" aria-labelledby="taskExchange">
|
|
{% for transition in workflow_transitions(task) %}
|
|
<li>
|
|
<a class="dropdown-item" href="{{ path('chill_task_task_transition', { 'taskId': task.id, 'transition': transition.name, 'kind': 'single-task', 'return_path': app.request.uri }) }}" class="{{ task_workflow_metadata(task, 'transition.class', transition)|e('html_attr') }}">
|
|
{{ task_workflow_metadata(task, 'transition.verb', transition)|trans }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% if is_granted('CHILL_TASK_TASK_UPDATE', task) %}
|
|
<li>
|
|
<a class="btn btn-update" href="{{ path('chill_task_single_task_edit', { 'id': task.id }) }}">
|
|
{{ 'Edit the task'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% if is_granted('CHILL_TASK_TASK_CREATE', task) %}
|
|
<li>
|
|
<a href="{{ path('chill_task_single_task_delete', { 'id': task.id } ) }}" class="btn btn-delete">
|
|
{{ 'Delete'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul></div>
|