%PDF- %PDF-
Direktori : /home/waritko/jetty-distribution-9.4.21.v20190926/webapps/ROOT/skins/flamingo/ |
Current File : //home/waritko/jetty-distribution-9.4.21.v20190926/webapps/ROOT/skins/flamingo/docextra.vm |
## ## ## More document related data: comments, attachments ... ## <div id="xwikidata"> ## ## Build the list of documents extras to display, if it does not exist (default). ## List format : ['ExtraAnchor', 'ExtraName', 'ExtraTabText', ExtraNumberOfItems, 'extratemplate.vm', 'keyboardShortcut'] ## #if (!$docextras) #set ($docextras = []) #if ($showcomments) $xwiki.jsfx.use('uicomponents/viewers/comments.js', {'forceSkinAction': true, 'language': ${xcontext.locale}}) $xwiki.ssfx.use('uicomponents/viewers/comments.css', true) #set ($discard = $docextras.add(['Comments', 'comments', $services.localization.render('docextra.comments'), $doc.getObjects('XWiki.XWikiComments').size(), 'commentsinline.vm', $services.localization.render('core.shortcuts.view.comments')])) #end #if ($showannotations) #if (!$annotationCount) ## Annotation count is supposed to be defined in xwikivars.vm. If for a reason or another it is not ## defined at this point, we tap into the standard annotation class, and do not load again the ## config document. This however should not happen. #set ($annotationCount = $services.annotations.getAnnotations($doc).size()) #end #set ($discard = $docextras.add(['Annotations', 'annotations', $services.localization.render('docextra.annotations'), $annotationCount, 'annotationsinline.vm', $services.localization.render('core.shortcuts.view.annotations')])) #end #if ($showattachments) $xwiki.jsfx.use('uicomponents/widgets/upload.js', {'forceSkinAction': true, 'language': ${xcontext.locale}}) $xwiki.ssfx.use('uicomponents/widgets/upload.css', true) $xwiki.jsfx.use('js/xwiki/viewers/attachments.js', {'forceSkinAction': true, 'language': ${xcontext.locale}}) $xwiki.ssfx.use('js/xwiki/viewers/attachments.css', true) ### Support attachment sorting #set ($sortAttachmentsBy = "$!{request.sortAttachmentsBy}") #if ($sortAttachmentsBy != '') ## Prepend request parameter #set ($sortAttachmentsBy = "&sortAttachmentsBy=$escapetool.url(${sortAttachmentsBy})") #end #set ($discard = $docextras.add(['Attachments', 'attachments', $services.localization.render('docextra.attachments'), $doc.getAttachmentList().size(), "attachmentsinline.vm$!{sortAttachmentsBy}", $services.localization.render('core.shortcuts.view.attachments')])) #end #if ($showhistory) ## Pagination style $xwiki.ssfx.use('uicomponents/pagination/pagination.css', true)## $xwiki.jsfx.use('uicomponents/viewers/history.js', true) #set ($discard = $docextras.add(['History', 'history', $services.localization.render('docextra.history'), -1, 'historyinline.vm', $services.localization.render('core.shortcuts.view.history')])) #end #if ($showinformation) $xwiki.jsfx.use('js/xwiki/viewers/information.js', {'forceSkinAction': true, 'language': ${xcontext.locale}}) $xwiki.ssfx.use('js/xwiki/viewers/information.css', true) #set ($discard = $docextras.add(['Information', 'information', $services.localization.render('docextra.information'), -1, 'informationinline.vm', $services.localization.render('core.shortcuts.view.information')])) #end #end ## ## Put anchors before the footer, otherwise the top of each section would be hidden by the floating topmenu ## #if ($docextras.size() > 0) <div id="docextraanchors"> #foreach ($docextra in $docextras)<span id="${docextra.get(0)}anchor"> </span>#end </div> #end ## ## Display tabs ## #if($docextras.size() > 0) <div id="xwikidatacontents"> <div class="floatcontainer" id="docExtraTabs"> <ul class="xwikitabbar" id="docExtrasTabsUl"> #foreach($docextra in $docextras) <li id="${docextra.get(0)}tab"> ## Note: Add rel='nofollow' to prevent search crawler from navigating the links and indexing them in search results <a id="${docextra.get(0)}link" href="$doc.getURL('view', "viewer=${docextra.get(1)}")" rel="nofollow"> $docextra.get(2) #if($docextra.get(3) >= 0) <span class="itemCount">$services.localization.render('docextra.extranb', [$docextra.get(3)])</span> #end </a> </li> #end </ul> </div> ## ## Display panes (AJAX placeholders) ## <div id="docextrapanes"> #foreach($docextra in $docextras) <div id="${docextra.get(0)}pane" class="hidden empty"></div> #end </div> ## ## JavaScript code generation ## <script type="text/javascript"> var hashviewer = self.document.location.hash.substring(1); #foreach($docextra in $docextras) #set ($extraAnchor = $docextra[0]) #set ($extraName = $docextra[1]) #set ($extraTemplate = $docextra[4]) #set ($extraShortcut = $docextra[5]) ## ## Set the extra to load ## #if ($velocityCount == 1) var extraInit = function(){ XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", false) }; #end if (hashviewer == "${extraAnchor}") { var extraInit = function(){ XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", true) }; } ## ## Replace tab link ## if ($("${extraAnchor}link") != null) { $("${extraAnchor}link").href="#${extraAnchor}"; Event.observe($("${extraAnchor}link"), "click", function(){ XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", false); }, false); } ## ## Replace top menu link (if any) ## if ($("tmShow${extraAnchor}") != null) { $("tmShow${extraAnchor}").href="#${extraAnchor}"; Event.observe($("tmShow${extraAnchor}"), "click", function(){ XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", true); }, false); } ## ## Replace shortcut link (if any) ## if ($("${extraName}shortcut") != null) { $("${extraName}shortcut").down('a').href="#${extraName}"; Event.observe($("${extraName}shortcut"), "click", function(){ XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", true); }, false); } ## ## Override keyboard shortcut (if any) ## #if ($keyboardShortcutsEnabled && "$!extraShortcut" != "") shortcut.remove("$extraShortcut"); shortcut.add("$extraShortcut", function() { XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", true); }, { 'disable_in_input':true }); #end #end document.observe("dom:loaded", extraInit, false); </script> </div> ## xwikidatacontents #end </div> ## xwikidata