add action btns in the view page

This commit is contained in:
nobohan 2018-05-07 17:02:39 +02:00
parent 585b8b3927
commit 7e9a584944
3 changed files with 19 additions and 6 deletions

View File

@ -29,17 +29,18 @@ div#single_task_warningInterval {
}
.bt-task {
display: block;
display: inline-block;
height: 0;
width: 8px;
padding-right: 3px;;
}
.bt-task-exchange {
background: $chill-green;
color: #fff;
}
.bt-task-exchange:hover {
background: $chill-green-dark;
color: #fff;
}
.bt-task-exchange::before {
@ -80,5 +81,6 @@ div#single_task_warningInterval {
}
.bt-dropdown:hover .bt-dropdown-content {
display: block;
display: inline-block;
width: min-content;
}

View File

@ -37,6 +37,7 @@ User: Utilisateur
'View the task': 'Voir la tâche'
'Update the task': 'Mettre à jour la tâche'
'Remove task': 'Supprimer la tâche'
'Change task status': 'Changer le statut'
'Are you sure you want to remove the task about "%name%" ?': 'Êtes-vous sûr·e de vouloir supprimer la tâche de "%name%"?'
'See more': 'Voir plus'
'Associated tasks': 'Tâches associées'
@ -72,4 +73,4 @@ cancel: annuler
'The task has been updated': 'La tâche a été mise à jour'
'The transition is successfully applied': 'La transition a bien été effectuée'
'The transition could not be applied': "La transition n'a pas pu être appliquée"
'%number% tasks near deadline': '{0} Aucune tâche à échance|{1} Une tâche à échéance | ]1,Inf[ %count% tâches à échéance'
'%number% tasks near deadline': '{0} Aucune tâche à échance|{1} Une tâche à échéance | ]1,Inf[ %count% tâches à échéance'

View File

@ -80,14 +80,24 @@
{{ 'Back to the list'|trans }}
</a>
</li>
{% if not is_granted('CHILL_TASK_TASK_UPDATE', task) %}
<li>
<div class="bt-dropdown">
<a href="" class="sc-button bt-task-exchange">&nbsp;{{'Change task status'|trans}}</a>
<div class="bt-dropdown-content">
{% 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 }) }}" class="{{ task_workflow_metadata(task, 'transition.class', transition)|e('html_attr') }}">{{ task_workflow_metadata(task, 'transition.verb', transition)|trans }}</a>
{% endfor %}
</div>
</div>
</li>
{% if 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 task'|trans }}
</a>
</li>
{% endif %}
{% if not is_granted('CHILL_TASK_TASK_CREATE', task) %}
{% if 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 }}