fix creating workflow from document in accompanying course

This commit is contained in:
Julien Fastré 2022-02-03 13:16:13 +01:00
parent 9a9ed64298
commit 3f83c323be
2 changed files with 8 additions and 7 deletions

View File

@ -8,14 +8,13 @@
</div> </div>
<div class="col-8"> <div class="col-8">
<h3>{{ document.title }}</h3> <h3>{{ document.title }}</h3>
<small>{{ document.object.type }}</small>
{% if document.description is not empty %} {% if document.description is not empty %}
<blockquote class="chill-user-quote mt-2"> <blockquote class="chill-user-quote mt-2">
{{ document.description }} {{ document.description }}
</blockquote> </blockquote>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
@ -43,14 +42,15 @@
'changeClass' string 'changeClass' string
'noText' boolean 'noText' boolean
#} #}
{# vue component #} {# vue component
<span <span
data-module="wopi-link" data-module="wopi-link"
data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.object.uuid}) }}" data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.object.uuid}) }}"
data-doc-title="{{ document.title|e('html_attr') }}" data-doc-title="{{ document.title|e('html_attr') }}"
data-doc-type="{{ document.object.type|e('html_attr') }}" data-doc-type="{{ document.object.type|e('html_attr') }}"
data-button="{{ button|json_encode }}" data-button="{{ button|json_encode }}"
></span> ></span> #}
<a class="btn btn-update" href="{{ chill_path_add_return_path('chill_wopi_file_edit', {'fileId': document.object.uuid}) }}">{{ 'Edit'|trans }}</a>
{% else %} {% else %}
<a class="btn btn-update change-icon disabled" href="#" title="{{ 'workflow.freezed document'|trans }}"> <a class="btn btn-update change-icon disabled" href="#" title="{{ 'workflow.freezed document'|trans }}">
<i class="fa fa-lock me-2"></i>{{ 'Update document'|trans }} <i class="fa fa-lock me-2"></i>{{ 'Update document'|trans }}
@ -58,4 +58,4 @@
{% endif %} {% endif %}
</li> </li>
</ul> </ul>
{% endif %} {% endif %}

View File

@ -47,7 +47,8 @@ export default {
console.log('goToGenerateWorkflow', event, workflowName); console.log('goToGenerateWorkflow', event, workflowName);
if (!this.$props.preventDefaultMoveToGenerate) { if (!this.$props.preventDefaultMoveToGenerate) {
event.target.click(); console.log('to go generate');
window.location.assign(this.makeLink(workflowName));
} }
this.$emit('goToGenerateWorkflow', {event, workflowName, link: this.makeLink(workflowName)}); this.$emit('goToGenerateWorkflow', {event, workflowName, link: this.makeLink(workflowName)});