Wiki source code of AdminInlineSheet
Last modified by Thomas Mortagne on 2016/03/17 19:54
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}}###---------------------------------- | ||
| 2 | ## modified version of editinline.vm | ||
| 3 | ###---------------------------------- | ||
| 4 | #if ($doc.fullName != 'XWiki.AdminInlineSheet') ## Prevents infinite loops | ||
| 5 | #set($formname = 'inline') | ||
| 6 | #set($saveaction = 'save') | ||
| 7 | #set($previewenabled = true) | ||
| 8 | #set($xnotification = $!request.getParameter('xnotification')) | ||
| 9 | {{html}} | ||
| 10 | <form id="inline" method="post" action="$doc.getURL('preview')"> | ||
| 11 | <div> | ||
| 12 | <div class="hidden"><input type="hidden" name="xcontinue" value="$doc.getURL('admin', "${request.queryString}&editmode=inline").replaceAll('&','&')" /></div> | ||
| 13 | <input type="hidden" name="xredirect" value="$doc.getURL('admin', "editor=${editor}§ion=${section}&space=XWiki").replaceAll('&','&')" /> | ||
| 14 | <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> | ||
| 15 | <input type="hidden" name="xnotification" value="$!xnotification" /> | ||
| 16 | <input type="hidden" name="template" value="$!request.template" /> | ||
| 17 | <input type="hidden" name="language" value="$!doc.locale" /> | ||
| 18 | #if("$!request.parent" != '') | ||
| 19 | <input type="hidden" name="parent" value="$!request.parent" /> | ||
| 20 | #end | ||
| 21 | #if("$!request.title" != "") | ||
| 22 | <input type="hidden" name="title" value="$!request.title" /> | ||
| 23 | #end | ||
| 24 | #set($force = $!request.get('force')) | ||
| 25 | #if(($doc.getLocked() == true) && (!$force)) ## locking | ||
| 26 | <div> | ||
| 27 | $services.localization.render('doclockedby') $xwiki.getLocalUserName($doc.getLockingUser()). <br /> | ||
| 28 | <a href="$doc.getURL('inline', "$!request.getQueryString()&force=1")">$services.localization.render('forcelock')</a> | ||
| 29 | </div> | ||
| 30 | #else | ||
| 31 | #foreach($class in $doc.xWikiClasses) | ||
| 32 | #set($nb = $doc.getObjectNumbers("${class.name}")) | ||
| 33 | <input type="hidden" name="${class.name}_nb" value="$nb" /> | ||
| 34 | #end | ||
| 35 | $doc.getTranslatedDocument().getRenderedContent() | ||
| 36 | <div class="bottombuttons"> | ||
| 37 | <p class="admin-buttons"> | ||
| 38 | <span class="buttonwrapper"><input class="button" type="submit" name="formactioncancel" value="$services.localization.render('cancel')" onclick="document.forms.update.action='$doc.getURL('cancel')'; if (document.forms.update.onsubmit) document.forms.update.onsubmit();" /></span> | ||
| 39 | <span class="buttonwrapper"><input class="button" type="submit" name="formactionsac" value="$services.localization.render('saveandcontinue')" onclick="document.forms.update.action='$doc.getURL('saveandcontinue')'; if (document.forms.update.onsubmit) document.forms.update.onsubmit();if(checkDocumentContent()) document.forms.update.submit(); return false;" /></span> | ||
| 40 | <span class="buttonwrapper"><input class="button" type="submit" name="formactionsave" value="$services.localization.render('saveandview')" onclick="document.forms.update.action='$doc.getURL('saveandview')'; if (document.forms.update.onsubmit) document.forms.update.onsubmit();if(checkDocumentContent()) document.forms.update.submit(); return false;" /></span> | ||
| 41 | </p> | ||
| 42 | </div> ## bottombuttons | ||
| 43 | #end | ||
| 44 | </div> ## form | ||
| 45 | </form> | ||
| 46 | #template('textarea_wysiwyg.vm') | ||
| 47 | {{html}} | ||
| 48 | #end | ||
| 49 | {{/velocity}} |