Merge pull request #5037 from G-Chubinidze/gc_SCI_7673

Add office file to task step - reload file option shows plain html page [SCI-7673]
This commit is contained in:
artoscinote 2023-04-05 15:26:18 +02:00 committed by GitHub
commit a1cebecdcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,8 @@
:data-gallery-view-id="stepId"
:data-preview-url="attachment.attributes.urls.preview"
>
<span data-toggle="tooltip"
data-placement="bottom"
<span data-toggle="tooltip"
data-placement="bottom"
:title="`${ attachment.attributes.file_name }`">
{{ attachment.attributes.file_name }}
</span>
@ -44,8 +44,8 @@
<div v-else class="empty-office-file">
<h2>{{ i18n.t('assets.empty_office_file.description') }}</h2>
<a :href="attachment.attributes.urls.load_asset"
remote="true"
class="btn btn-primary reload-asset"
@click.prevent="reloadAsset"
:params="{asset: {view_mode: attachment.attributes.view_mode}}">
{{ i18n.t('assets.empty_office_file.reload') }}
</a>
@ -90,5 +90,13 @@
required: true
}
},
methods: {
reloadAsset() {
$.ajax({
method: 'GET',
url: this.attachment.attributes.urls.load_asset
});
}
},
}
</script>