diff --git a/CHANGELOG.md b/CHANGELOG.md
index af1105275..8e36787e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,9 @@ and this project adheres to
## Unreleased
+* [person] Accompanying course evaluation documents: disable the WOPI edit link if mimetype not supported and if no keyInfos
+(https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/585)
+
* [activity] display error messages above the form in creating a new location (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/481)
* [activity] show required field in activity edit/new by an asterix in the vuejs fields (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/494)
* [ACL] fix allow to see the course, event if the scope'course does not contains the scope's user
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue
index ca3d8b397..eff62bbbb 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue
@@ -113,9 +113,8 @@
:storedObject="d.storedObject"
>
-
-
+
@@ -220,7 +219,79 @@ export default {
maxFiles: 1,
maxPostSize: 15000000,
required: false,
- }
+ },
+ mime: [
+ // TODO temporary hardcoded. to be replaced by twig extension or a collabora server query
+ 'application/clarisworks',
+ 'application/coreldraw',
+ 'application/macwriteii',
+ 'application/msword',
+ 'application/vnd.lotus-1-2-3',
+ 'application/vnd.ms-excel',
+ 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
+ 'application/vnd.ms-excel.sheet.macroEnabled.12',
+ 'application/vnd.ms-excel.template.macroEnabled.12',
+ 'application/vnd.ms-powerpoint',
+ 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+ 'application/vnd.ms-powerpoint.template.macroEnabled.12',
+ 'application/vnd.ms-visio.drawing',
+ 'application/vnd.ms-word.document.macroEnabled.12',
+ 'application/vnd.ms-word.template.macroEnabled.12',
+ 'application/vnd.ms-works',
+ 'application/vnd.oasis.opendocument.chart',
+ 'application/vnd.oasis.opendocument.formula',
+ 'application/vnd.oasis.opendocument.graphics',
+ 'application/vnd.oasis.opendocument.graphics-flat-xml',
+ 'application/vnd.oasis.opendocument.graphics-template',
+ 'application/vnd.oasis.opendocument.presentation',
+ 'application/vnd.oasis.opendocument.presentation-flat-xml',
+ 'application/vnd.oasis.opendocument.presentation-template',
+ 'application/vnd.oasis.opendocument.spreadsheet',
+ 'application/vnd.oasis.opendocument.spreadsheet-flat-xml',
+ 'application/vnd.oasis.opendocument.spreadsheet-template',
+ 'application/vnd.oasis.opendocument.text',
+ 'application/vnd.oasis.opendocument.text-flat-xml',
+ 'application/vnd.oasis.opendocument.text-master',
+ 'application/vnd.oasis.opendocument.text-master-template',
+ 'application/vnd.oasis.opendocument.text-template',
+ 'application/vnd.oasis.opendocument.text-web',
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
+ 'application/vnd.openxmlformats-officedocument.presentationml.template',
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+ 'application/vnd.sun.xml.calc',
+ 'application/vnd.sun.xml.calc.template',
+ 'application/vnd.sun.xml.chart',
+ 'application/vnd.sun.xml.draw',
+ 'application/vnd.sun.xml.draw.template',
+ 'application/vnd.sun.xml.impress',
+ 'application/vnd.sun.xml.impress.template',
+ 'application/vnd.sun.xml.math',
+ 'application/vnd.sun.xml.writer',
+ 'application/vnd.sun.xml.writer.global',
+ 'application/vnd.sun.xml.writer.template',
+ 'application/vnd.visio',
+ 'application/vnd.visio2013',
+ 'application/vnd.wordperfect',
+ 'application/x-abiword',
+ 'application/x-aportisdoc',
+ 'application/x-dbase',
+ 'application/x-dif-document',
+ 'application/x-fictionbook+xml',
+ 'application/x-gnumeric',
+ 'application/x-hwp',
+ 'application/x-iwork-keynote-sffkey',
+ 'application/x-iwork-numbers-sffnumbers',
+ 'application/x-iwork-pages-sffpages',
+ 'application/x-mspublisher',
+ 'application/x-mswrite',
+ 'application/x-pagemaker',
+ 'application/x-sony-bbeb',
+ 'application/x-t602',
+ ]
}
},
computed: {
@@ -268,6 +339,10 @@ export default {
},
methods: {
ISOToDatetime,
+ canEditDocument(document) {
+ return 'storedObject' in document ?
+ this.mime.includes(document.storedObject.type) && document.storedObject.keyInfos.length === 0 : false;
+ },
listAllStatus() {
console.log('load all status');
let url = `/api/`;
@@ -340,4 +415,4 @@ export default {
font-weight: bold;
font-size: 1rem;
}
-
\ No newline at end of file
+