%PDF- %PDF-
Direktori : /proc/309157/root/home/waritko/jetty-distribution-9.4.21.v20190926/webapps/ROOT/templates/ |
Current File : //proc/309157/root/home/waritko/jetty-distribution-9.4.21.v20190926/webapps/ROOT/templates/code.vm |
### ### Code page in the "view" mode ### $xwiki.jsfx.use('uicomponents/viewers/code.js', true)## $xwiki.jsfx.use('uicomponents/widgets/fullScreen.js', true)## $xwiki.ssfx.use('uicomponents/widgets/fullScreen.css', true)## <div id="document-title"><h1>$services.localization.render('core.viewers.code.title', [$escapetool.xml($doc.getPlainTitle()), $doc.getURL()])</h1></div> ## ---------------------------- ## Display the shortcuts ## ---------------------------- #if($displayShortcuts) #template("shortcuts.vm") #end ## ---------------------------- ## Display the code ## ---------------------------- #set($escapedcontent = $escapetool.html($tdoc.translatedContent)) #set($ln = "$!request.getParameter('showlinenumbers')") <div> #if($ln != '0') <a href="$doc.getURL('view', "viewer=code&showlinenumbers=0&$!docvariant")" id="toggleLineNumbers">$services.localization.render('core.viewers.code.hideLineNumbers')</a> #set($contentLines = $escapedcontent.split($util.newline)) #set($lineCount = $contentLines.size()) #set($p = 1) #foreach($i in [0..5]) #if($p > $lineCount) #set($positions = $i) #break #end #set($p = $p * 10) #end <textarea readonly="readonly" class="wiki-code" rows="25" cols="80"> #foreach($line in $contentLines) $doc.documentReference.name.format("%${positions}d:", $velocityCount) $line #end</textarea> #else <a href="$doc.getURL('view', "viewer=code&showlinenumbers=1&$!docvariant")" id="toggleLineNumbers">$services.localization.render('core.viewers.code.showLineNumbers')</a> <textarea readonly="readonly" class="wiki-code" rows="25" cols="80">$escapedcontent</textarea> #end </div>