mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
reorganize templates for a better structure
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_task_task_list' %}
|
||||
{% set course = task.course %}
|
||||
|
||||
{% block title 'Remove task'|trans %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ include('@ChillMain/Util/confirmation_template.html.twig',
|
||||
{
|
||||
'title' : 'Remove task'|trans,
|
||||
'confirm_question' : 'Are you sure you want to remove the task about accompanying period "%id%" ?'|trans({ '%id%' : course.id } ),
|
||||
'cancel_route' : 'chill_task_singletask_courselist',
|
||||
'cancel_parameters' : app.request.query.get('list_params', { } ),
|
||||
'form' : delete_form,
|
||||
} ) }}
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,15 @@
|
||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_task_single_task_edit' %}
|
||||
{% set course = task.course %}
|
||||
|
||||
{% block title %}
|
||||
{{ 'Edit task'|trans }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@ChillTask/SingleTask/_edit.html.twig' %}
|
||||
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,107 @@
|
||||
{% if tasks|length > 0 %}
|
||||
<h3>{{ title|trans }}</h3>
|
||||
|
||||
<table class="table table-bordered border-dark chill-task-list">
|
||||
<tbody>
|
||||
{% for task in tasks %}
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<span class="chill-task-list__row__title">{{ task.title }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="chill-task-list__row__type">{{ task_workflow_metadata(task, 'definition.name')|trans }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% for place in workflow_marked_places(task) %}
|
||||
<span class="task-status box type-{{ task.type }} place-{{ place }}">{{ place|trans }}</span>
|
||||
{% endfor %}
|
||||
{% if task.assignee is not null %}
|
||||
<div class="chill-task-list__row__assignee">
|
||||
<span class="chill_task-list__row__assignee_by">{{ 'By'|trans }} :</span>
|
||||
{{ task.assignee.username }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if task.startDate is not null or task.warningDate is not null or task.endDate is not null %}
|
||||
<div class="chill-task-list__row__dates">
|
||||
<ul class="record_actions column">
|
||||
{% if task.startDate is not null %}
|
||||
<li title="{{ 'Start'|trans|escape('html_attr') }}">
|
||||
<i class="fa fa-play"></i>
|
||||
{{ task.startDate|format_date('medium') }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if task.warningDate is not null %}
|
||||
<li title="{{ 'Warning'|trans|escape('html_attr') }}">
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
{{ task.warningDate|format_date('medium') }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if task.endDate is not null %}
|
||||
<li title="{{ 'End'|trans|escape('html_attr') }}">
|
||||
<i class="fa fa-hourglass-end"></i>
|
||||
{{ task.endDate|format_date('medium') }}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<ul
|
||||
class="record_actions">
|
||||
{# {% 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', 'list_params': app.request.query.all }) }}" 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 %} #}
|
||||
|
||||
<li>
|
||||
<a href="{{ path('chill_task_single_task_show', { 'id': task.id, 'list_params': app.request.query.all }) }}" class="btn btn-show "></a>
|
||||
</li>
|
||||
|
||||
{# {% if is_granted('CHILL_TASK_TASK_UPDATE', task) %} #}
|
||||
<li>
|
||||
<a href="{{ path('chill_task_single_task_edit', { 'id': task.id, 'list_params': app.request.query.all }) }}" class="btn btn-update "></a>
|
||||
</li>
|
||||
{# {% endif %} #}
|
||||
|
||||
{# {% if is_granted('CHILL_TASK_TASK_DELETE', task) %} #}
|
||||
<li>
|
||||
<a href="{{ path('chill_task_single_task_delete', { 'id': task.id, 'list_params': app.request.query.all } ) }}" class="btn btn-delete "></a>
|
||||
</li>
|
||||
{# {% endif %} #}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if accompanyingCourse is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'course_id': accompanyingCourse.id}) }}" class="btn btn-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
@@ -0,0 +1,13 @@
|
||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_task_single_task_new' %}
|
||||
{# {% set person = task.person %} #}
|
||||
|
||||
{% block title %}
|
||||
{{ 'New task'|trans }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include '@ChillTask/SingleTask/_new.html.twig' %}
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,17 @@
|
||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
||||
|
||||
|
||||
{% set activeRouteKey = 'chill_task_single_task_show' %}
|
||||
{% set accompanyingCourse = task.course %}
|
||||
|
||||
{% block title %}
|
||||
{{ 'Task'|trans }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@ChillTask/SingleTask/_show.html.twig' %}
|
||||
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,12 @@
|
||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_task_task_list' %}
|
||||
{% set accompanyingCourse = task.course %}
|
||||
|
||||
{% block title 'Remove task'|trans %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@ChillTask/SingleTask/_transition.html.twig' %}
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user