## PAGE SPECIFIC DECORATOR ## Here the context is the page. Modes are 'view', 'edit', 'edit-preview', 'view-information', and 'view-attachments'. #set ($pagevmdTime = $themePress.startTimestamp("pagevmd.html")) #set ($helper = $params.get("helper")) #set ($mode = $params.get("mode")) #set ($context = $params.get("context")) #set ($confPage = $helper.page) #set ($brikitLikesLabelsHide = $themePress.likesAndLabelsDisplay($confPage) == "hide") #set ($brikitCommentsHide = $themePress.commentsDisplay($confPage) == "hide") #if (!$mode.contains("edit")) ## CONFDEV-35759 To avoid resource URLs changing depending on whether the pagetree is enabled, always require ## this context. #requireResourcesForContext("atl.confluence.plugins.pagetree-desktop") #end #infoPanelInitFromParams() ## GENERAL PAGE DECORATING BEGINS #requireResourcesForContext("page") #set ($isArchitectPage = $themePress.isArchitectPage($page)) #set ($isMenu = $themePress.isMenuPage($page)) #set ($isHeader = $themePress.isHeaderPage($page)) #set ($isFooter = $themePress.isFooterPage($page)) #set ($isBanner = $themePress.isBannerPage($page)) #set ($isLayout = $themePress.isLayoutPage($page)) #set ($isFrame = $themePress.isFrame($page)) #set ($isMobilePhonePage = $themePress.isMobilePhonePage($page)) #set ($themePressMobile = $brikitCore.phone) #set ($usingInstantPageCache = $themePress.cacheRenderedPage($page)) #set ($deferLoadingLabels = $themePress.deferLoadingLabels($page)) #if ($mode == "view") #requireResourcesForContext("pagebanner") #skiplink("page-banner", $i18n.getText("assistive.skiplink.to.banner.start"), $i18n.getText("assistive.skiplink.to.banner.end")) #webPanelForLocation("atl.page.metadata.banner", {"action": $action}) #end #end ## Added by Brikit #requireResource("com.atlassian.auiplugin:aui-experimental-progress-tracker") #if ($helper.isHistoricalVersion()) #end #httpStatsElapse('pageDecoratorContentNavigationStart') #if ($mode != "edit" && $mode != "edit-preview") ## Added by Brikit #if ($darkFeatures.isDarkFeatureEnabled('confluence.pagenav.deferred') && $mode == "view") #putMetadata('page-id', $page.id) $decoratorUtil.setContentNavContext($action.page, $mode, $context, $helper) #else #if (!$usingInstantPageCache) ## see toolbar.html for the placeholder #parse("$brikitCore.parseFileLocation/html/caching/content-navigation.html") #end #end #end #httpStatsElapse('pageDecoratorContentNavigationFinished') #httpStatsElapse('pageDecoratorInfoPanelStart') #if ($infoPanelRequired) #infoPanel() #end #httpStatsElapse('pageDecoratorInfoPanelFinished') #httpStatsElapse('pageDecoratorSidebarStart') #if (($mode != "edit" && $mode != "edit-preview" )) #if ($darkFeatures.isDarkFeatureEnabled('confluence.sidebar.deferred')) #set ($collectorKey = $params.get("collector-key")) $decoratorUtil.setSidebarContext(null, $confPage, $confPage.idAsString, $context, $context, $collectorKey) #else #foreach ($webPanel in $webInterfaceManager.getDisplayableWebPanels("atl.page.left.sidebar", {"page": $confPage, "context": $context})) $!webPanel.getHtml($action.context) #end #end #end #httpStatsElapse('pageDecoratorSidebarFinished') #set($customHeader = $helper.getCustomHeader($spaceKey)) #if ($mode == "view" && $customHeader != "")
$customHeader
#end #set($customFooter = $helper.getCustomFooter($spaceKey)) #if ($mode == "view" && $customFooter != "") #end #httpStatsElapse('pageDecoratorContentStart')
#parse("/decorators/includes/page-content-includes.vm") ## MODE SPECIFIC DECORATING BEGINS #* Display page based on mode: currently 'view', 'edit', 'preview-edit', 'info' and 'attachments. See the individual page templates (viewpage.vm, editpage.vm, etc.) for the setting of the mode parameter. *# ## VIEW #if ($mode == "view") #webPanelForLocation("atl.confluence.viewpage.header" $action.context) #parse("$brikitCore.parseFileLocation/html/includes/colors-javascript-bridge.html") #if ($space.personal) #set ($usernameFromSpaceKey = $spaceUtils.getUsernameFromPersonalSpaceKey($spaceKey)) #if ($permissionHelper.canView($action.authenticatedUser, $space.creator)) ## Deprecated: needed in case main.vmd hasn't been updated true #end #end #requireResourcesForContext("viewcontent") #set ($labelable = $page) #permitSearchEngines() #if ($helper.isHistoricalVersion()) true #end #if ($helper.isHistoricalVersion() || $helper.action.navigatingVersions) #versionInfo() #end ## If you choose to move page it's being done from view mode #putMetadata('browse-page-tree-mode', 'view') #putMetadata('parent-page-id', $!parentPage.id) #putMetadata('shared-drafts', $action.collaborativeEditingHelper.isSharedDraftsFeatureEnabled($spaceKey)) #set ($abstractPage = $page) #set ($usingFrame = $themePress.isUsingFrame($abstractPage)) #set ($isGrid = $themePress.isGrid($abstractPage)) #set ($usingGrid = $themePress.isUsingGrid($abstractPage)) #if ($usingGrid || $isGrid) #parse("$brikitCore.parseFileLocation/html/includes/content-layers.html") #if ($mode != "edit" && $mode != "edit-preview") #set($labelable = $page)
#parse ("/com/atlassian/confluence/plugins/labels/components/labels-editor.vm")
#end #if (!$action.childrenNotShown) #renderChildren() #end
#applyDecorator("root") #decoratorParam("sitemeshPage" $sitemeshPage) #decoratorParam("page" $page) #decoratorParam("context" $comments) #end
#else #parse("$brikitCore.parseFileLocation/html/includes/content-layers.html") ## Added/modified by Brikit #if (!$isArchitectPage || $isLayout || $isFrame) #if ($mode != "edit" && $mode != "edit-preview" && !$brikitLikesLabelsHide) #if ($usingInstantPageCache) #else #set($labelable = $page) #layerOpen("labels") #set( $labels = $webInterfaceContext.getParameter('labels')) #if ($deferLoadingLabels && $labels.size() > 0) #parse("$brikitCore.parseFileLocation/html/includes/defer-labels.html") #else #parse ("/com/atlassian/confluence/plugins/labels/components/labels-editor.vm") #end #layerClose #end #end #if (!$action.childrenNotShown) #renderChildren() #end #if (!$brikitCommentsHide) #if ($themePressMobile) #parse("$brikitCore.parseFileLocation/html/mobile/mobile-comments.html") #else #if ($usingInstantPageCache) #requireResourcesForContext("atl.general") #requireResourcesForContext("atl.comments") #requireResource("confluence.web.resources:ajs") #else #layerOpen("comments") #if ($page.comments.empty && !$brikitCore.canComment($spaceKey))

$brikitCore.text("com.brikit.comments.none")

#end #applyDecorator("root") #decoratorParam("sitemeshPage" $sitemeshPage) #decoratorParam("page" $page) #decoratorParam("context" $comments) #end #layerClose #end #end #end #end #end #webPanelForLocation("atl.page.content.footer", {"action": $action}) ## EDIT || PREVIEW-EDIT #elseif ($mode == "edit" || $mode == "edit-preview") #parse("$brikitCore.parseFileLocation/html/page-edit-before-body.html") $body #if (!$blueprintCreate) #parse("$brikitCore.parseFileLocation/html/page-edit-after-body.html") #end ## INFO #elseif ($mode == "view-information") #requireResourcesForContext("viewinformation") $body ## ATTACHMENTS #elseif ($mode == "view-attachments" || $mode == "move-attachments" || $mode == "view-attachment") #requireResourcesForContext("viewattachments") $body ## FOR CUSTOM WEB-ITEMS #else $body #end ## MODE SPECIFIC DECORATING ENDS
## GENERAL PAGE DECORATING ENDS #httpStatsElapse('pageDecoratorContentFinished') #parse ("/pages/page-breadcrumbs.vm") #if ($mode != "edit" && $mode != "edit-preview") #parse("/template/includes/space-tools-web-items.vm") #end #menuMacros_renderBrowseMenu() $themePress.stopTimestamp("pagevmd.html", $pagevmdTime)