diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig
index 9d6175e12..fbb8cbde0 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig
@@ -46,6 +46,12 @@
{{ 'Back to the list' | trans }}
+
+ {% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %}
+ {% if workflows_frame is not empty %}
+ {{ workflows_frame|raw }}
+ {% endif %}
+
{{ m.download_button(document.object, document.title) }}
@@ -61,12 +67,7 @@
{% endblock %}
{% block block_post_menu %}
-
+
{% endblock %}
{% block js %}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/entity-workflow-pick/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/entity-workflow-pick/index.js
index d6d657719..1572c9c9a 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/module/entity-workflow-pick/index.js
+++ b/src/Bundle/ChillMainBundle/Resources/public/module/entity-workflow-pick/index.js
@@ -1,49 +1,35 @@
import { createApp } from "vue";
-import PickWorkflowVue from 'ChillMainAssets/vuejs/_components/EntityWorkflow/PickWorkflow.vue';
-import ListWorkflowVue from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflow.vue';
+import ListWorkflowModalVue from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
+import { _createI18n } from "ChillMainAssets/vuejs/_js/i18n";
-// pick workflow
-document.querySelectorAll('[data-pick-workflow]')
- .forEach(function(el) {
+const i18n = _createI18n({});
+
+// list workflow
+document.querySelectorAll('[data-list-workflows]')
+ .forEach(function (el) {
+ console.log('allowCreate', el.dataset.allowCreate);
const app = {
components: {
- PickWorkflowVue
+ ListWorkflowModalVue,
},
template:
- '',
+ '>',
data() {
return {
+ workflows: JSON.parse(el.dataset.workflows),
+ allowCreate: el.dataset.allowCreate === "1",
relatedEntityClass: el.dataset.relatedEntityClass,
relatedEntityId: Number.parseInt(el.dataset.relatedEntityId),
workflowsAvailables: JSON.parse(el.dataset.workflowsAvailables),
}
}
};
- createApp(app).mount(el);
- })
-;
-
-// list workflow
-document.querySelectorAll('[data-list-workflows]')
- .forEach(function (el) {
- const app = {
- components: {
- ListWorkflowVue,
- },
- template:
- '',
- data() {
- return {
- workflows: JSON.parse(el.dataset.workflows),
- }
- }
- };
- createApp(app).mount(el);
+ createApp(app).use(i18n).mount(el);
})
;
\ No newline at end of file
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue
new file mode 100644
index 000000000..ac08a9f29
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+ Liste des workflows
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig
index 67037465b..96c33e207 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig
@@ -1,13 +1,13 @@
+{% set acl = "0" %}
{% if is_granted('CHILL_MAIN_WORKFLOW_CREATE', blank_workflow) %}
- {# vue component #}
-
+ {% set acl = "1" %}
{% endif %}
-{% if entity_workflows|length > 0 %}
- {# vue component #}
-
-{% endif %}
+{# vue component #}
+