Wiki源代码PDFViewerConfiguration
由 qunlin wang 于 2025/07/17, 14:59 最后修改
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | #set ($configFullName = 'PDFViewer.Code.PDFViewerConfiguration') | ||
3 | #set ($configClassName = 'PDFViewer.Code.PDFViewerConfigurationClass') | ||
4 | #if ($doc.fullName == $configFullName) | ||
5 | $response.sendRedirect($xwiki.getURL('XWiki.XWikiPreferences', 'admin', 'editor=globaladmin§ion=pdfViewerMacro')) | ||
6 | #end | ||
7 | #set ($pdfConfigDoc = $xwiki.getDocument($configFullName)) | ||
8 | #set ($class = $pdfConfigDoc.getObject($configClassName).xWikiClass) | ||
9 | #set ($actionURL = $xwiki.getURL($configFullName, 'save')) | ||
10 | {{html clean="false"}} | ||
11 | <form id="pdfviewermacro_$configFullName" method="post" action="$actionURL" class="xform"> | ||
12 | <fieldset> | ||
13 | <dl> | ||
14 | #foreach ($prop in $class.properties) | ||
15 | <dt> | ||
16 | <label for="${configClassName}_0_$prop.name">$prop.prettyName</label> | ||
17 | <span class="xHint">$prop.hint</span> | ||
18 | </dt> | ||
19 | <dd> | ||
20 | {{/html}}${pdfConfigDoc.display($prop.name, 'edit')}{{html clean="false"}} | ||
21 | </dd> | ||
22 | #end | ||
23 | </dl> | ||
24 | #set ($queryString = $escapetool.url({ | ||
25 | 'editor': 'globaladmin', | ||
26 | 'section': 'pdfViewerMacro' | ||
27 | })) | ||
28 | #set ($redirectURL = $xwiki.getURL('XWiki.XWikiPreferences', 'admin', $queryString)) | ||
29 | <input type="hidden" id="PDFViewer.Code.PDFViewerConfiguration_redirect" name="xredirect" value="$redirectURL"/> | ||
30 | <input type="hidden" name="form_token" value="$services.csrf.token"/> | ||
31 | <input class="button" type="submit" name="formactionsac" value="Save"/> | ||
32 | </fieldset> | ||
33 | </form> | ||
34 | {{/html}} | ||
35 | {{/velocity}} |