Julien Fastré b79ec18a38 apply ckeditor on multiple entities
Apply ckeditor into:

* activity;
* task;
* document;
* accompanying periods
2021-03-25 22:01:17 +01:00

126 lines
4.9 KiB
Twig

{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_single_task_show' %}
{% set person = task.person %}
{% block title %}{{ 'Task'|trans }}{% endblock %}
{% block personcontent %}
<h1 class="chill-red">{{ '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>
<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">
<li class="cancel">
<a class="sc-button bt-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="bt-dropdown">
<a href="" class="sc-button bt-task-exchange">&nbsp;{{'Change task status'|trans}}</a>
<div class="bt-dropdown-content">
{% for transition in workflow_transitions(task) %}
<a 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>
{% endfor %}
</div>
</div>
</li>
{% endif %}
{% if is_granted('CHILL_TASK_TASK_UPDATE', task) %}
<li>
<a class="sc-button bt-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="sc-button bt-delete">
{{ 'Delete'|trans }}
</a>
</li>
{% endif %}
</ul>
{% endblock %}