front-end dev of tasks lists

This commit is contained in:
nobohan
2018-04-27 17:42:21 +02:00
parent 3719ce0896
commit 2d57757682
5 changed files with 72 additions and 38 deletions

View File

@@ -7,10 +7,11 @@
<tr>
<th class="chill-red">{{ 'Title'|trans }}</th>
<th class="chill-green">{{ 'Task type'|trans }}</th>
{% if person is null %}
<th>{{ 'Person'|trans }}</th>
{% endif %}
<th class="chill-orange">{{ 'Task status'|trans }}</th>
<th>{{ 'Task start date'|trans }}</th>
<th>{{ 'Task warning date'|trans }}</th>
<th>{{ 'Task end date'|trans }}</th>
<th>{{ 'Dates'|trans }}</th>
</tr>
</thead>
<tbody>
@@ -18,18 +19,41 @@
<tr>
<td>{{ task.title }}</td>
<td>{{ task.type }}</td>
{% if person is null %}
<td>{{ task.person }}</td>
{% endif %}
<td>
{% for place in workflow_marked_places(task) %}
<span class="">{{ place }}</span>
<span class="">{{ place|trans }}</span>
{% endfor %}
{% 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 }) }}" style="background-color: {{ task_workflow_metadata(task, 'transition.background-color', transition)|e('html_attr') }}; color: {{ task_workflow_metadata(task, 'transition.text-color', transition)|e('html_attr') }}">{{ task_workflow_metadata(task, 'transition.verb', transition) }}</a>
<a href="{{ path('chill_task_task_transition', { 'taskId': task.id, 'transition': transition.name|trans, '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) }}</a>
{% endfor %}
</td>
<td>{% if task.startDate is not null %}{{ task.startDate|localizeddate('medium', 'none') }}{% endif %}</td>
<td>{% if task.warningDate is not null %}{{ task.warningDate|localizeddate('medium', 'none') }}{% endif %}</td>
<td>{% if task.endDate is not null %}{{ task.endDate|localizeddate('medium', 'none') }}{% endif %}</td>
<td>
{% if task.startDate is null and task.warningDate is null and task.endDate is null %}
{{'Unknown dates'|trans}}
{% else %}
<ul class="record_actions_column">
<li>
{% if task.startDate is not null %}
{{'Start: '|trans}}{{ task.startDate|localizeddate('medium', 'none') }}
{% endif %}
</li>
<li>
{% if task.warningDate is not null %}
{{'Warning: '|trans}}{{ task.warningDate|localizeddate('medium', 'none') }}
{% endif %}
</li>
<li>
{% if task.endDate is not null %}
{{'End: '|trans}}{{ task.endDate|localizeddate('medium', 'none') }}
{% endif %}
</li>
</ul>
{% endif %}
</td>
<td>
<ul class="record_actions">
<li>
@@ -54,7 +78,7 @@
{% if isSingleStatus %}
{% if tasks|length > paginator.getTotalItems %}
{% if tasks|length < paginator.getTotalItems %}
{{ chill_pagination(paginator) }}
{% endif %}
@@ -89,12 +113,12 @@
<ul class="record_actions">
<li>
{% if person is not null %}
<a href="{{ path('chill_task_singletask_list', {'person_id': person.id, 'status' : [ status ] }) }}" class="sc-button bt-cancel">
<a href="{{ path('chill_task_singletask_list', {'person_id': person.id, 'status' : [ status ] }) }}" class="sc-button">
{{ 'See more' | trans }}
</a>
{% endif %}
{% if user is not null %}
<a href="{{ path('chill_task_singletask_list', {'status' : [ status ] }) }}" class="sc-button bt-cancel">
<a href="{{ path('chill_task_singletask_list', {'status' : [ status ] }) }}" class="sc-button">
{{ 'See more' | trans }}
</a>
{% endif %}

View File

@@ -38,6 +38,8 @@
{% endblock %}
{% else %}
{% block content %}
{% include 'ChillTaskBundle:SingleTask:_list.html.twig' %}
<div class="grid-8 push-1 grid-mobile-9 grid-tablet-9 push-mobile-0 push-tablet-0">
{% include 'ChillTaskBundle:SingleTask:_list.html.twig' %}
</div>
{% endblock %}
{% endif %}