mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
add a button 'new task' in page head and improve voter
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% macro date_status(title, tasks, count, paginator, status, isSingleStatus, person, user) %}
|
||||
{% if tasks|length > 0 %}
|
||||
<h2>{{ title|trans }}</h2>
|
||||
<h3>{{ title|trans }}</h3>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
@@ -141,10 +141,10 @@
|
||||
{% import _self as helper %}
|
||||
|
||||
|
||||
<h1>{{ 'Task list'|trans }}</h1>
|
||||
<h1>{{ app.request.title|default('Task list')|trans }}</h1>
|
||||
|
||||
{% if false == app.request.query.boolean('hide_form', false) %}
|
||||
<h3>{{ 'Filter the tasks'|trans }}</h3>
|
||||
<h2>{{ 'Filter the tasks'|trans }}</h2>
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.user_id) }}
|
||||
|
||||
@@ -168,18 +168,32 @@
|
||||
|
||||
{% if tasks_count == 0 %}
|
||||
<p class="chill-no-data-statement">{{ "There is no tasks."|trans }}</p>
|
||||
{% if person is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if person is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<!-- Pour l'instant, il n'est pas encore possible d'ajouter une tache sans personne liée -->
|
||||
<!-- {% if person is null %}
|
||||
<a href="{{ path('chill_task_single_task_new') }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %} -->
|
||||
{% else %}
|
||||
|
||||
<h2>{{ 'Tasks'|trans }}</h2>
|
||||
|
||||
{% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if person is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if single_task_ended_tasks is defined %}
|
||||
{{ helper.date_status('Tasks with expired deadline', single_task_ended_tasks, single_task_ended_count, single_task_ended_paginator, 'ended', isSingleStatus, person) }}
|
||||
@@ -204,17 +218,11 @@
|
||||
{% if isSingleStatus == false %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if person is not null %}
|
||||
{% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<!-- Pour l'instant, il n'est pas encore possible d'ajouter une tache sans personne liée -->
|
||||
<!-- {% if person is null %}
|
||||
<a href="{{ path('chill_task_single_task_new') }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %} -->
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user