76 lines
2.7 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 "ChillPersonBundle::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>
<dl class="chill_view_data">
<dt class="inline">{{ 'Title'|trans }}</dt>
<dd>{{ task.title }}</dd>
<dt class="inline">{{ 'Description'|trans }}</dt>
<dd>{{ task.description }}</dd>
<dt class="inline">{{ 'Assignee'|trans }}</dt>
<dd>{{ task.assignee }}</dd>
<dt class="inline">{{ 'Scope'|trans }}</dt>
<dd><span class="scope">{{ task.scope.name|localize_translatable_string }}</span></dd>
<dt class="inline">{{ 'Start date'|trans }}</dt>
<dd>{{ task.startDate|localizeddate('long', 'none') }}</dd>
<dt class="inline">{{ 'End date'|trans }}</dt>
<dd>{{ task.endDate|localizeddate('long', 'none') }}</dd>
<dt class="inline">{{ 'Warning interval'|trans }}</dt>
<dd>{{ task.warningInterval|localizeddate('long', 'none') }}</dd>
</dl>
<ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_task_task_list', { 'personId': person.id } ) }}">
{{ 'Back to the list'|trans }}
</a>
</li>
{% if not 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 activity'|trans }}
</a>
</li>
{% endif %}
{% if not 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 %}