mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
add delete feature for entityWorkflow (wip)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title 'workflow.Delete workflow ?'|trans %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container chill-md-10">
|
||||
{{ include('@ChillMain/Util/confirmation_template.html.twig',
|
||||
{
|
||||
'title' : 'workflow.Delete workflow ?'|trans,
|
||||
'confirm_question' : 'workflow.Are you sure you want to delete this workflow ?'|trans,
|
||||
'cancel_route' : 'chill_main_workflow_show',
|
||||
'cancel_parameters' : {'id' : entityWorkflow.id},
|
||||
'form' : delete_form
|
||||
} ) }}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -24,7 +24,7 @@
|
||||
{% block content %}
|
||||
<div class="col-10 workflow">
|
||||
<h1 class="mb-5">{{ block('title') }}</h1>
|
||||
|
||||
|
||||
{# handler_template:
|
||||
- src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig
|
||||
- src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig
|
||||
@@ -35,8 +35,18 @@
|
||||
{% include handler_template_title with handler_template_data|merge({'breadcrumb': true }) %}
|
||||
</div>
|
||||
{% include handler_template with handler_template_data|merge({'display_action': true }) %}
|
||||
|
||||
{% if is_granted('CHILL_MAIN_WORKFLOW_DELETE', entity_workflow) %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-delete"
|
||||
href="{{ chill_path_add_return_path('chill_main_workflow_delete', {'id': entity_workflow.id}) }}"
|
||||
></a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
|
||||
<section class="step my-4">{% include '@ChillMain/Workflow/_follow.html.twig' %}</section>
|
||||
<section class="step my-4">{% include '@ChillMain/Workflow/_decision.html.twig' %}</section>{#
|
||||
<section class="step my-4">{% include '@ChillMain/Workflow/_comment.html.twig' %}</section> #}
|
||||
|
@@ -8,9 +8,9 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="col-10 workflow">
|
||||
|
||||
|
||||
<h1 class="mb-5">{{ block('title') }}</h1>
|
||||
|
||||
|
||||
<ul class="nav nav-pills justify-content-center">
|
||||
<li class="nav-item">
|
||||
<a href="{{ path('chill_main_workflow_list_subscribed') }}"
|
||||
@@ -36,7 +36,7 @@
|
||||
<button type="button" class="accordion-button collapsed"
|
||||
data-bs-toggle="collapse" data-bs-target="#flush-collapse-{{ l.entity_workflow.id }}"
|
||||
aria-expanded="false" aria-controls="flush-collapse-{{ l.entity_workflow.id }}">
|
||||
|
||||
|
||||
<div class="item-row col">
|
||||
<h2>
|
||||
{{ 'workflow_'|trans }}
|
||||
@@ -46,16 +46,16 @@
|
||||
'add_classes': 'ms-3 h3'
|
||||
}) %}
|
||||
</div>
|
||||
|
||||
|
||||
</button>
|
||||
{{ macro.breadcrumb(l) }}
|
||||
|
||||
|
||||
</div>
|
||||
<div id="flush-collapse-{{ l.entity_workflow.id }}"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="flush-heading-{{ l.entity_workflow.id }}"
|
||||
data-bs-parent="#workflow-fold">
|
||||
|
||||
|
||||
<div class="item-row flex-column">
|
||||
{% include l.handler.template(l.entity_workflow) with l.handler.templateData(l.entity_workflow)|merge({
|
||||
'display_action': false
|
||||
@@ -78,6 +78,13 @@
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_MAIN_WORKFLOW_DELETE', l.entity_workflow) %}
|
||||
<li>
|
||||
<a class="btn btn-delete"
|
||||
href="{{ chill_path_add_return_path('chill_main_workflow_delete', {'id': l.entity_workflow.id}) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_workflow_show', {'id': l.entity_workflow.id}) }}"
|
||||
class="btn btn-show">
|
||||
@@ -87,7 +94,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user