Wiki-Quellcode von OfficeImporter
Version 2.1 von MACH formsolutions am 20.08.2020
Zeige letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity wiki="false"}} | ||
| 2 | #if ("$!request.fileName" != '') | ||
| 3 | #set ($attachmentReference = $services.model.createAttachmentReference($doc.documentReference, $request.fileName)) | ||
| 4 | #set ($parameters = { | ||
| 5 | 'filterStyles': $request.filterStyles, | ||
| 6 | 'useOfficeViewer': $request.useOfficeViewer | ||
| 7 | }) | ||
| 8 | #set ($output = $services.wysiwyg.importOfficeAttachment($attachmentReference, $parameters)) | ||
| 9 | #if ($output != '' && "$!output" == '') | ||
| 10 | ## Null output means an error has occured. | ||
| 11 | $response.sendError(500) | ||
| 12 | #else | ||
| 13 | $output | ||
| 14 | #end | ||
| 15 | #end | ||
| 16 | {{/velocity}} | ||
| 17 | |||
| 18 | {{velocity}} | ||
| 19 | #if ("$!request.fileName" == '' && $xcontext.action == 'get') | ||
| 20 | {{html clean="false"}} | ||
| 21 | <form class="xform"> | ||
| 22 | <dl> | ||
| 23 | <dt> | ||
| 24 | <label> | ||
| 25 | $services.localization.render('ckeditor.plugin.office.importer.filePath') | ||
| 26 | <span class="xRequired">($services.localization.render('ckeditor.plugin.office.importer.required'))</span> | ||
| 27 | </label> | ||
| 28 | <span class="xHint">$services.localization.render('ckeditor.plugin.office.importer.filePath.hint')</span> | ||
| 29 | </dt> | ||
| 30 | <dd> | ||
| 31 | <input type="file" name="filePath" /> | ||
| 32 | </dd> | ||
| 33 | <dt> | ||
| 34 | <label> | ||
| 35 | <input type="checkbox" name="filterStyles" value="true" checked="checked" /> | ||
| 36 | $services.localization.render('ckeditor.plugin.office.importer.filterStyles') | ||
| 37 | </label> | ||
| 38 | <span class="xHint">$services.localization.render('ckeditor.plugin.office.importer.filterStyles.hint')</span> | ||
| 39 | </dt> | ||
| 40 | <dd></dd> | ||
| 41 | <dt> | ||
| 42 | <label> | ||
| 43 | <input type="checkbox" name="useOfficeViewer" value="true" /> | ||
| 44 | $services.localization.render('ckeditor.plugin.office.importer.useOfficeViewer') | ||
| 45 | </label> | ||
| 46 | <span class="xHint">$services.localization.render('ckeditor.plugin.office.importer.useOfficeViewer.hint')</span> | ||
| 47 | </dt> | ||
| 48 | <dd></dd> | ||
| 49 | </dl> | ||
| 50 | </form> | ||
| 51 | {{/html}} | ||
| 52 | #end | ||
| 53 | {{/velocity}} |