mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-09 00:04:59 +00:00
layout task list
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
/*
|
||||
!!!!!!!
|
||||
This is a legacy version for task list. The new task are now
|
||||
layed out in page/tile_list/index.js
|
||||
!!!!!!
|
||||
*/
|
||||
|
||||
table.chill-task-list {
|
||||
|
||||
.chill-task-list__row > div {
|
||||
margin-bottom: 0.50rem;
|
||||
}
|
||||
|
||||
|
||||
.chill-task-list__row__title {
|
||||
font-weight: bold;
|
||||
font-size: 1.40rem;
|
||||
}
|
||||
|
||||
|
||||
.chill-task-list__row__type {
|
||||
font-variant: small-caps;
|
||||
display: inline;
|
||||
@@ -21,31 +29,31 @@ table.chill-task-list {
|
||||
border: 1px solid var(--chill-dark-gray);
|
||||
color: var(--chill-dark-gray);
|
||||
}
|
||||
|
||||
|
||||
.chill-task-list__row__person-for {
|
||||
display: inline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.chill-task-list__row__assignee {
|
||||
display: inline;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.chill_task-list__row__assignee_by {
|
||||
display: inline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.chill-task-list__row__dates {
|
||||
& > ul {
|
||||
display: inline;
|
||||
list-style: none;
|
||||
|
||||
|
||||
& > li {
|
||||
display: inline;
|
||||
margin-right: 0.25rem;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,34 +1,22 @@
|
||||
// Access to Bootstrap variables and mixins
|
||||
@import '~ChillMainAssets/module/bootstrap/shared';
|
||||
|
||||
.task-status {
|
||||
&.box {
|
||||
font-variant: small-caps;
|
||||
display: inline;
|
||||
padding: .2em .6em .3em;
|
||||
font-size: 0.88rem;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: .25em;
|
||||
color: white;
|
||||
|
||||
// 'new', 'in_progress', 'closed', 'canceled'
|
||||
&.place-new {
|
||||
background-color: $chill-yellow;
|
||||
}
|
||||
|
||||
&.type-task_default {
|
||||
// 'new', 'in_progress', 'closed', 'canceled'
|
||||
&.place-new {
|
||||
background-color: var(--chill-yellow);
|
||||
}
|
||||
|
||||
&.place-in_progress {
|
||||
background-color: var(--chill-green);
|
||||
}
|
||||
&.place-in_progress {
|
||||
background-color: $chill-green;
|
||||
}
|
||||
|
||||
&.place-closed {
|
||||
background-color: var(--chill-blue);
|
||||
}
|
||||
&.place-closed {
|
||||
background-color: $chill-blue;
|
||||
}
|
||||
|
||||
&.place-canceled {
|
||||
background-color: var(--chill-beige);
|
||||
}
|
||||
&.place-canceled {
|
||||
background-color: $chill-beige;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
require("./task_list.scss");
|
@@ -0,0 +1,24 @@
|
||||
.chill-task-list {
|
||||
.task-type {
|
||||
font-variant: small-caps;
|
||||
display: inline;
|
||||
padding: 0.05rem .15rem;
|
||||
font-size: 0.88rem;
|
||||
font-weight: light;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border: 1px solid var(--chill-dark-gray);
|
||||
color: var(--chill-dark-gray);
|
||||
}
|
||||
|
||||
.assignee {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dates {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,153 @@
|
||||
{% extends 'ChillMainBundle::layout.html.twig' %}
|
||||
|
||||
{% block title 'My tasks'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{% if tasks|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'Any tasks'|trans }}</p>
|
||||
{% else %}
|
||||
<div class="flex-table chill-task-list">
|
||||
{% for task in tasks %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div class="denomination h2">
|
||||
{{ task.title }}
|
||||
{% for place in workflow_marked_places(task) %}
|
||||
<span class="task-status badge type-{{ task.type }} place-{{ place }}">
|
||||
{{ place|trans }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if task.type != 'task_default'%}
|
||||
<span class="task-type">
|
||||
{{ task_workflow_metadata(task, 'definition.name')|trans }}
|
||||
</span>
|
||||
{% endif %}
|
||||
<div>
|
||||
{% if task.person is not null %}
|
||||
<span class="chill-task-list__row__person">
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'person', id: task.person.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: task.person|chill_entity_render_string
|
||||
} %}
|
||||
</span>
|
||||
{% elseif task.course is not null %}
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': task.course.id }) }}"
|
||||
class="btn btn-sm btn-outline-primary" title="{{ 'See accompanying period'|trans }}">
|
||||
<i class="fa fa-random fa-fw"></i>
|
||||
</a>
|
||||
|
||||
{% for part in task.course.currentParticipations %}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'person', id: part.person.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: part.person|chill_entity_render_string
|
||||
} %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item-col">
|
||||
<div class="container">
|
||||
{% if task.assignee is not null %}
|
||||
<div class="assignee row">
|
||||
<span class="chill_task-list__row__assignee_by">{{ 'By'|trans }} :</span>
|
||||
<span>{{ task.assignee.username }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if task.startDate is not null or task.warningDate is not null or task.endDate is not null %}
|
||||
<div class="dates row">
|
||||
<ul class="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 %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ chill_pagination(paginator) }}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('page_task_list') }}
|
||||
{% endblock %}
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('page_task_list') }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user