Wiki-Quellcode von OfficeImporter
Zuletzt geändert von Daniel Herrmann am 2026/02/04 20:23
Verstecke letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | {{include reference="CKEditor.VelocityMacros" /}} |
| 2 | |||
| 3 | {{velocity wiki="false"}} | ||
| 4 | #if ("$!request.fileName" != '') | ||
| 5 | #set ($attachmentReference = $services.model.createAttachmentReference($doc.documentReference, $request.fileName)) | ||
| 6 | #set ($parameters = { | ||
| 7 | 'filterStyles': $request.filterStyles, | ||
| 8 | 'useOfficeViewer': $request.useOfficeViewer | ||
| 9 | }) | ||
| |
2.1 | 10 | #template('display_macros.vm') |
| 11 | #initRequiredSkinExtensions() | ||
| |
1.1 | 12 | #set ($output = $services.wysiwyg.importOfficeAttachment($attachmentReference, $parameters)) |
| 13 | #if ($output != '' && "$!output" == '') | ||
| 14 | ## Null output means an error has occured. | ||
| 15 | $response.sendError(500) | ||
| 16 | #else | ||
| 17 | ## When importing presentations using the Office Viewer macro the slides are displayed using the gallery widget for | ||
| 18 | ## which we need to load the required CSS and JavaScript resources. | ||
| |
2.1 | 19 | #sendRequiredSkinExtensions() |
| |
1.1 | 20 | $output |
| 21 | #end | ||
| 22 | #end | ||
| 23 | {{/velocity}} | ||
| 24 | |||
| 25 | {{velocity}} | ||
| 26 | #if ("$!request.fileName" == '' && $xcontext.action == 'get') | ||
| 27 | {{html clean="false"}} | ||
| 28 | <form class="xform"> | ||
| 29 | <dl> | ||
| 30 | <dt> | ||
| 31 | <label> | ||
| 32 | $escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.filePath')) | ||
| 33 | <span class="xRequired"> | ||
| 34 | ($escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.required'))) | ||
| 35 | </span> | ||
| 36 | </label> | ||
| 37 | <span class="xHint"> | ||
| 38 | $escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.filePath.hint')) | ||
| 39 | </span> | ||
| 40 | </dt> | ||
| 41 | <dd> | ||
| 42 | <input type="file" name="filePath" /> | ||
| 43 | </dd> | ||
| 44 | <dt> | ||
| 45 | <label> | ||
| 46 | <input type="checkbox" name="filterStyles" value="true" checked="checked" /> | ||
| 47 | $escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.filterStyles')) | ||
| 48 | </label> | ||
| 49 | <span class="xHint"> | ||
| 50 | $escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.filterStyles.hint')) | ||
| 51 | </span> | ||
| 52 | </dt> | ||
| 53 | <dd></dd> | ||
| 54 | <dt> | ||
| 55 | <label> | ||
| 56 | <input type="checkbox" name="useOfficeViewer" value="true" /> | ||
| 57 | $escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.useOfficeViewer')) | ||
| 58 | </label> | ||
| 59 | <span class="xHint"> | ||
| 60 | $escapetool.xml($services.localization.render('ckeditor.plugin.office.importer.useOfficeViewer.hint')) | ||
| 61 | </span> | ||
| 62 | </dt> | ||
| 63 | <dd></dd> | ||
| 64 | </dl> | ||
| 65 | </form> | ||
| 66 | {{/html}} | ||
| 67 | #end | ||
| 68 | {{/velocity}} |