#macro (contentIcon $content) #if ($content.type == "page") #if ($content.homePage) #elseif ($remoteUser && $content.isRecentlyUpdatedFor($remoteUser)) #else #end #elseif ($content.type == "comment") #elseif ($content.type == "spacedesc") #elseif ($content.type == "userinfo") #elseif ($content.type == "blogpost") #elseif ($content.type == "trackback") #elseif ($content.type == "mail") #elseif ($content.type == "attachment")#set ($attachment = $content)#parse ("/pages/includes/attachment_icon.vm")#end #end #macro (contentIcon2 $content $linkColor $linkHref $linkTitle) #if($content.type == "page") #if($content.homePage) #elseif($remoteUser && $content.isRecentlyUpdatedFor($remoteUser)) #else #end #elseif($content.type == "comment") #elseif($content.type == "spacedesc") #elseif($content.type == "userinfo") #elseif($content.type == "blogpost") #elseif($content.type == "trackback") #elseif($content.type == "mail") #elseif($content.type == "attachment")#set ($attachment = $content)#parse ("/pages/includes/attachment_icon.vm")#end#end #macro (typeIcon $type) #if ($type == "page") #elseif ($type == "comment") #elseif ($type == "spacedesc") #elseif ($type == "userinfo") #elseif ($type == "blogpost") #elseif ($type == "attachment") #elseif ($type == "mail") #end #end #macro (icon $imageName $size $title)#end #macro (contentHref $content) #if ($content.type == "attachment") $webwork.htmlEncode($content.content.realTitle) > $webwork.htmlEncode($content.realTitle) #elseif ($content.type == "comment") $webwork.htmlEncode($content.page.realTitle) > $webwork.htmlEncode($content.realTitle) #else $webwork.htmlEncode($content.realTitle) #end #end #macro (contentOther $content) #if ($content.type == "page" || $content.type == "blogpost") #if ($content.originalVersion) v. $content.version ($content.originalVersion.space.name) #else ($content.space.name) #end #elseif ($content.type == "comment") ($content.page.space.name) #elseif ($content.type == "userinfo") ($content.username) ## If the attachment is attached to a profile, the container text is different (CONF-4465) #elseif ($content.type == "attachment" && $content.content.type == "userinfo") ($content.content.username) #elseif ($content.type == "attachment") ($content.content.space.name) #end #end #macro (contentLink2 $content $showIcon $showSpace) #if ($showIcon) #contentIcon($content) #end #contentHref($content) #if ($showSpace) #contentOther($content) #end #end #macro (contentLink $content) #contentLink2($content true true) #end #macro (contentLinkWithAnchor $content $anchor) #contentIcon($content) $webwork.htmlEncode($content.realTitle) #end #macro (pageHierarchy $contentNode $name) #if( $contentNode.getChildren().size() > 0 ) #foreach( $childNode in $contentNode.getChildren() ) #pageHierarchy($childNode $name) #end
#end #end #* PARAMETERS: request - the http request title - the text of the link url - the URI to link to selected - the nav item will be selected if this link matches request.getServletPath().startsWith(selected) tooltip - an optional phrase to be used as the tooltip for the navitem link. *# #macro( navitem $title $url $selected $tooltip $accessKey) ## only hide the javascript if it is IE or Mozilla (not netscape or Opera) - Fixes JRA-1427 #if ($webReqUtils.isGoodBrowser($req) && $textUtils.noNull($req.getHeader("USER-AGENT")).indexOf("Opera") == -1) #set ($captureJavascript = true) #end #if ($req.servletPath.startsWith($selected)) ## css hack as described here: http://www.fo3nix.pwp.blueyonder.co.uk/tutorials/css/hacks/ ## only good browsers recognise that 'return false' isn't killing the tag. So don't 'return false' in netscape 4    #else    #end $title    #end #* this can only be used with page titles that are safe to append to a URL *# #* must check existance of page before $permissionCheckDispatcher, otherwise dispatcher will throw an IllegalStatementException *# #macro (includePage $spaceKey $pageTitle) #if ($generalUtil.isAllAscii($pageTitle)) #if ($renderBean.pageExists($spaceKey, $pageTitle)) #if ($permissionCheckDispatcher.isPermitted("/pages/viewpage.action?spaceKey=$spaceKey&title=$pageTitle")) $renderBean.render($spaceKey, $pageTitle) #else You do not have sufficient privileges to include this page. #end #else Page not found #end #else The includePage macro can only be used with ASCII titles. For other titles use the includePageWithId macro. #end #end #macro (includePageWithId $pageId) #if ($renderBean.pageExists($pageId)) #if ($permissionCheckDispatcher.isPermitted("/pages/viewpage.action?pageId=$pageId")) $renderBean.render($pageId) #else You do not have sufficient privileges to include this page. #end #else Page not found #end #end #* Link to a user's profile page, given their username. If the username doesn't exist, "Anonymous" is printed *# #macro (usernameLink $username) #if ($username != "") #if ($action.getUserFullName($username))$generalUtil.htmlEncode($action.getUserFullName($username))#else$username#end #else Anonymous#end #end #macro (usernameLinkWithCustomBaseUrl $username $baseurl) #if ($username != "") #if ($action.getUserFullName($username))$generalUtil.htmlEncode($action.getUserFullName($username))#else$username#end #else Anonymous#end #end #macro (usernameLinkParentWindow $username) #if ($username) $generalUtil.htmlEncode($action.getUserFullName($username)) #else Anonymous #end #end #macro (emailUserLink $user $baseurl) #if ($user) $generalUtil.htmlEncode($user.fullName) #else Anonymous #end #end #macro (userNonLink $user) #if($user && $user.name)$generalUtil.htmlEncode($action.getUserFullName($user.name))#else Anonymous #end #end #macro (siteTitle)$settingsManager.globalSettings.siteTitle#end #* Prints the search result pagination info. *# #macro(pagination $paginationSupport $actionContext) #set ($previousIndexes = $paginationSupport.previousStartIndexes) #set ($nextIndexes = $paginationSupport.nextStartIndexes)
#if( $paginationSupport.items.size() > 0 ) #set ($startIndex = $paginationSupport.startIndex + 1) #set ($endIndex = $paginationSupport.endIndex) #end #if( $previousIndexes || $nextIndexes ) #set ($currentIndex = 0) #if( $previousIndexes ) << Previous #foreach( $index in $previousIndexes ) #set ($currentIndex = $currentIndex + 1) #if ($velocityCount > $generalUtil.arraySize($previousIndexes) - 10) | $currentIndex #end #end | #end #set ($currentIndex = $currentIndex + 1) $currentIndex #if( $nextIndexes ) #foreach( $index in $nextIndexes ) #set ($currentIndex = $currentIndex + 1) #if ($velocityCount < 10) | $currentIndex #end #end | Next >> #end (total: $paginationSupport.total) #end
#end #* Prints the search result pagination info. for a pager object (i.e. with total size unknown). *# #macro(entityPagination $paginationSuppor $actionContext) #set ($previousIndexes = $paginationSupport.previousStartIndexes) #set ($nextIndexes = $paginationSupport.nextStartIndexes)
#if( $paginationSupport.items ) #set ($startIndex = $paginationSupport.startIndex + 1) #set ($endIndex = $paginationSupport.endIndex) #end #if( $previousIndexes || $nextIndexes ) #set ($currentIndex = 0) #if( $previousIndexes ) << Previous #foreach( $index in $previousIndexes ) #set ($currentIndex = $currentIndex + 1) | $currentIndex #end | #end #set ($currentIndex = $currentIndex + 1) $currentIndex #if( $nextIndexes ) #foreach( $index in $nextIndexes ) #set ($currentIndex = $currentIndex + 1) #if ($velocityCount < 10) | $currentIndex #end #end | Next >> #end #else #if ($paginationSupport.tryNext) << Previous #end #if (!$paginationSupport.items.onLastPage()) Next >> #end #end
#end #* Prints the search box (if Confluence is setup) *# #macro(searchbox) #if ($bootstrap.isSetupComplete())
Search:
#end #end #* Prints the breadcrumbs *# #macro(breadcrumbs) #if ($sitemeshPage.getProperty("page.breadcrumbs")) $sitemeshPage.getProperty("page.breadcrumbs") #end #end #macro(usernavbar) #if ($bootstrap.isSetupComplete()) #if ($user) Welcome $generalUtil.htmlEncode($user.fullName) | #if ($userHistory) #set ($windowHeight = 100 + (25 * $userHistory.content.size())) History | #end Profile | #if ($permissionHelper.isGlobalAdministrator($user)) Administration | #end Log Out  #else #* for the login link, we want it to carry the current page the user is viewing anonymously, so that once they login they will be taken back to this page. However, we do not want to do this if they are on the logout/signup page/forgot password pages *# Log In #if (!$settingsManager.getGlobalSettings().isExternalUserManagement()) #if (!$settingsManager.getGlobalSettings().isDenyPublicSignup()) | Sign Up #end   #end #end #end #end #macro(helpicon) Get help from the Confluence website. #end #macro(printableicon) View a printable version of the current page. #if ($sitemeshPage && $sitemeshPage.req) View a printable version of the current page. #end #end #macro(pdficon) #set ($pageId = $sitemeshPage.getProperty("page.pageId")) #if ($sitemeshPage && $req && $pageId && $permissionCheckDispatcher.isPermitted("/pages/doexportpage.action?pageId=$pageId&type=TYPE_PDF")) #else #end #end #macro(pagetitle $class) #if ($bootstrap.isSetupComplete() && $sitemeshPage.getProperty("page.spacename"))
#if ($sitemeshPage.getProperty("page.spacekey"))#end#if ($sitemeshPage.getProperty("page.spacekey"))#end $sitemeshPage.getProperty("page.spacename")
#else
CONFLUENCE
#end #end #macro(bottomshadow) #if ($generalUtil.isSetupComplete()) #set ($license = $licenseManager.getLicense("CONF") ) #if ($license && $license.licenseType.niceName != "Confluence: Commercial Server") #if ($license.licenseType.niceName == "Confluence: Evaluation")
#if ($generalUtil.isLicenseExpired()) LICENSE EXPIRED #else EVALUATION LICENSE #end - Are you enjoying Confluence? Please consider purchasing it today.
#elseif ($license.licenseType.niceName == "Confluence: Non-Profit / Open Source")
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
#elseif ($license.licenseType.niceName == "Confluence: Personal Server")
This site is powered by a free Atlassian Confluence Personal Server License. Evaluate Confluence for your organisation or read more about Confluence licensing here.
#end #elseif (!$license)
LICENSING ERROR - An error has occurred with your license that may impact the usability of this application, please contact us.
#end #end
#end #macro(poweredby)
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: $generalUtil.versionNumber Build:#${generalUtil.buildNumber} ${generalUtil.buildDateString}) - Bug/feature request - Contact Administrators
#end #macro(dashboardlink) #if ($req.getRequestURI().indexOf("dashboard.action") != -1) $action.getText("dashboard.name") #else $action.getText("dashboard.name") #end #end #macro (colourRow $name $colour $isDefault) $action.getText($name)
 
#if($isDefault)<default>#else$colour#end #end #macro (trackbackRdf $identifier $title $ping) #end #macro (onoff $test) #if ($test) ON #else OFF #end #end #macro (yesno $test) #if ($test) YES #else NO #end #end ## Expects a javascript function as a variable which can be excecuted in this script. #macro (fielderrorExecuteFunction $fieldname $javascriptFunction) #set ($fieldErrors = $action.fieldErrors) #if ($fieldErrors) #if ($fieldErrors.get($fieldname)) #foreach ($error in $fieldErrors.get($fieldname))
#set( $message = $action.getText(${error}) ) #if( $message && $message != "" ) $message #else $error #end
#end #end #end #end #macro (fielderror $fieldname) #set ($fieldErrors = $action.fieldErrors) #if ($fieldErrors) #if ($fieldErrors.get($fieldname)) #foreach ($error in $fieldErrors.get($fieldname))
#set( $message = $action.getText(${error}) ) #if( $message && $message != "" ) $message #else $error #end
#end #end #end #end #macro (fielderrorRow $fieldname) #set ($fieldErrors = $stack.findValue("fieldErrors")) #if ($fieldErrors) #if ($fieldErrors.get($fieldname)) #foreach ($error in $fieldErrors.get($fieldname)) #set( $message = $stack.findValue("getText(${error})") ) #if( $message && $message != "" ) $message #else $error #end #end #end #end #end #* Sets up variables which are used to determine whether or not the help panel should be displayed. *# #macro(infoPanelInit) #if ($sitemeshPage.getProperty("meta.help-path")) #set ($helpPath = $sitemeshPage.getProperty("meta.help-path")) #end #if ($sitemeshPage.getProperty("page.help-content")) #set ($helpContent = $sitemeshPage.getProperty("page.help-content")) #end ## decide whether or not to include the right nav bar #if ($helpPath || $helpContent) #set ($helpAvailable = true) #end #if ($sitemeshPage.getProperty("meta.infopanel-width")) #set ($panelWidth = $sitemeshPage.getProperty("meta.infopanel-width")) #end #set ($infoPanelRequired = $helpAvailable) #end #* Sets up variables which are used to determine whether or not the help panel should be displayed, using the parameter object passed by the inline decorator directive: applyDecorator *# #macro(infoPanelInitFromParams) #if ($params.get("help-path")) #set ($helpPath = $params.get("help-path")) #end #if ($params.get("help-content")) #set ($helpContent = $params.get("help-content")) #end ## decide whether or not to include the right nav bar #if ($helpPath || $helpContent) #set ($helpAvailable = true) #end #if ($params.get("infopanel-width")) #set ($panelWidth = $params.get("infopanel-width")) #end #set ($infoPanelRequired = $helpAvailable) #end #macro(standardHeader) ##infoPanelInit() we now initialize the info panel in the content decorator #if ($sitemeshPage.getProperty("page.spacekey")) #else #end #if (!$sitemeshPage.getProperty("page.allowindex")) #end #if ($sitemeshPage.getProperty("page.rssautodiscovery")) $sitemeshPage.getProperty("page.rssautodiscovery") #end #if ($sitemeshPage.getProperty("page.headsection")) $sitemeshPage.getProperty("page.headsection") #end #end #macro(rssautodiscovery $rssDescriptor) #if($rssDescriptor) #end #end #macro(infoPanel $incomingLinks $trackbacks $referrers $externalReferences)
#if ($helpAvailable)
Help Tips
#if ($helpContent) $sitemeshPage.getProperty("page.help-content") #else #parse ($helpPath) #end
#else #if ($hasPageOperations) #if ($sitemeshPage.getProperty("page.operations.title")) #else #end #end #end
#end #macro(breadcrumbsAndSearch) #end #macro (nameList $names) #set($user = "") #foreach ($user in $names) #if ($velocityCount == $names.size()) #usernameLink ($user) #else #usernameLink($user), #end #set($user = "") #end #end #macro (blogPostsCalendar $cal) #foreach ( $week in [0..4] ) #foreach ($day in [1..7] ) #end #end
#if ($cal.lastPostInPreviousMonth) #else   #end $cal.formatMonthYear() #if ($cal.firstPostInNextMonth) #else   #end
Sun Mon Tue Wed Thu Fri Sat
#set ($date = $week * 7 + $day - $cal.startingDayOfMonth) #if ($date < 1 || $date > $cal.getDaysInMonth())   #elseif ($cal.getPostsForDay($date).size() == 0) $date #else #set ($thePost = $cal.getPostsForDay($date).get(0)) $date #end
#end #* passes the url to the permissionDispatcher first. if user has permissions to see link, this macro will display it * $url: the url of the action. You must drop the contextPath off the url before passing it in here. * $linkTextKey: the i18n key for the name of the link *# #macro (confluenceLink $url $linkTextKey) #if ($permissionCheckDispatcher.isPermitted($url)) $action.getText($linkTextKey) #end #end #macro (confluenceLink2 $url $linkTextKey $prefix $suffix) #if ($permissionCheckDispatcher.isPermitted($url)) $prefix $action.getText($linkTextKey) $suffix #end #end #macro (showPermissionsHeader)     Pages News Comments Attachments Mail Space   View Create Export Restrict Remove Create Remove Create Remove Create Remove Remove Export Admin #end #* * Macro for getting the URL of a resource from within a themed decorator *# #macro (themeResource $resourcePath)$req.contextPath$sitemeshPage.getProperty("theme.resource.path")$resourcePath#end #* * This macro is quite messy but is neater than simply copying and pasting the HTML three times on two different * screens to represent view and edit views of permissions for groups, users, and anonymous entities. * * Note - this macro renders form elements when in edit mode but you must wrap it in a form element yourself. * * $who: list containing the following symbols - "g" (group), "u" (user), "a" (anonymous), "e" (everyone). * Each symbol is a directive to print out symbolized information in the order in which the symbols are expressed. * Note - "e" is actually ["g", "u", "a"] * * $action: an object carry functionality to support calls for group, user, and anonymous permissions; for example * com.atlassian.confluence.security.actions.EditSpacePermissionsAction . * * $edit: string literal; if set to "true" it will output input boxes for each permission listing, otherwise it will * use a tick or cross image for read-only. *# #macro (showPermissions $who $action $edit ) #if ($who == ["e"]) #set ($who = ["g", "u", "a"]) #end #foreach( $entity in $who ) #* -- outputting group permissions from $action -- *# #if ($entity == "g") #set ($groups = $action.activeGroups) #if ($groups.size() > 0) #showPermissionsHeader() #foreach ($group in $groups) #foreach ($permission in ["editspace", "exportpage", "setpagepermissions", "removepage", "editblog", "removeblog", "comment", "removecomment", "createattachment", "removeattachment", "removemail", "exportspace", "setspacepermissions"]) #end #end #else #end #end #* -- outputting user permissions from $action -- *# #if ($entity == "u") #set ($users = $action.activeUsers) #if ($users.size() > 0) #showPermissionsHeader() #foreach ($user in $users) #foreach ($permission in ["editspace", "exportpage", "setpagepermissions", "removepage", "editblog", "removeblog", "comment", "removecomment", "createattachment", "removeattachment", "removemail", "exportspace", "setspacepermissions"]) #end #end #else #end #end #* -- outputting anonymous permissions from $action -- *# #if ($entity == "a") #showPermissionsHeader() #foreach ($permission in ["editspace", "exportpage", "setpagepermissions", "removepage", "editblog", "removeblog", "comment", "removecomment", "createattachment", "removeattachment", "removemail", "exportspace", "setspacepermissions"]) #end #end
$group.name #if ($edit == "true") #else #if ($action.hasGroupPermission($group.name, 'viewspace')) #else #end #end #if ($edit == "true") #if ($action.hasGroupPermission($group.name, $permission)) #else #end #else #if ($action.hasGroupPermission($group.name, $permission)) #else #end #end
No groups currently have access rights to this space.
$generalUtil.htmlEncode($user.fullName) #if ($edit == "true") #else #if ($action.hasUserPermission($user, 'viewspace')) #else #end #end #if ($edit == "true") #if ($action.hasUserPermission($user, $permission)) #else #end #else #if ($action.hasUserPermission($user, $permission)) #else #end #end
No users currently have access rights to this space.
Anonymous #if ($edit == "true") #if ($action.hasAnonymousPermission('viewspace')) #else #end #else #if ($action.hasAnonymousPermission('viewspace')) #else #end #end #if ($edit == "true") #if ($action.hasAnonymousPermission($permission)) #else #end #else #if ($action.hasAnonymousPermission($permission)) #else #end #end
#end #end #macro (user_picker $formName $textAreaOn)
#if ($action.fieldErrors.get("usersToAdd")) #foreach ($error in $action.fieldErrors.get("usersToAdd")) #end #end
#set( $message = $action.getText(${error}) ) #if( $message && $message != "" ) $message #else $error #end
Users to add: #if ($textAreaOn == "on") #else #end #if ($textAreaOn != "on") #end

#end #macro (group_picker $formName $textAreaOn)
#if ($action.fieldErrors.get("groupsToAdd")) #foreach ($error in $action.fieldErrors.get("groupsToAdd")) #end #end
#set( $message = $action.getText(${error}) ) #if( $message && $message != "" ) $message #else $error #end
Belonging to: #if ($textAreaOn == "on") #else #end #if ($textAreaOn != "on") #end

#end ## use this function in tr's to alternate the row colors when displaying a list of items. #macro (alternateRowColors) #if ($velocityCount % 2 == 0) class="rowAlternate" #end #end #macro (spaceTitleLink) #if ($sitemeshPage.getProperty("page.spacename")) #if($sitemeshPage.getProperty("page.spacekey"))#end$sitemeshPage.getProperty("page.spacename")#if($sitemeshPage.getProperty("page.spacekey"))#end #else   #end #end #macro (pageTitleLink) #if ($sitemeshPage.getProperty("page.pageTitle")) $sitemeshPage.getProperty("page.pageTitle") #else $title #end #end #macro (quickSearch)
#end #macro (watchLink ) #set ($action = $helper.action) #if(!$action.anonymousUser && !$action.isPrintableVersion() && $actionErrors.size() == 0) #if(!$action.userWatchingSpace) #if($action.userWatchingPage) #if( $permissionCheckDispatcher.isPermitted("/pages/removepagenotification.action?pageId=$helper.page.id") ) #end #else #if( $permissionCheckDispatcher.isPermitted("/pages/addpagenotification.action?pageId=$helper.page.id") ) #end #end #else #end #end #end #macro (favouriteLink ) #set ($action = $helper.action) #if(!$action.anonymousUser && !$action.isPrintableVersion() && $actionErrors.size() == 0) #if($action.favouritePage) #if( $permissionCheckDispatcher.isPermitted("/pages/removepagenotification.action?pageId=$helper.page.id") ) #end #else #if( $permissionCheckDispatcher.isPermitted("/pages/addpagenotification.action?pageId=$helper.page.id") ) #end #end #end #end #* Renders an edit link with image, for a blog. *# #macro (editBlogPostWithImageLink ) #set ($page = $helper.page) #if ($permissionCheckDispatcher.isPermitted("/pages/editblogpost.action?pageId=$page.id")) Edit #end #end #macro (renderChildren ) #set ($page = $helper.page) #if (!$page.originalVersion && $helper.childrenShowing) #if ($helper.action.getPermittedChildren().size() > 0)
Children   Hide Children | View in hierarchy #if ($permissionHelper.canCreatePage($remoteUser, $space)) #if ($page.type == "page") | $helper.getText("action.add.page.child") #end #end
#foreach ($child in $helper.action.getPermittedChildren()) #contentLink ($child)
#end
#end #else #if ($helper.action.getPermittedChildren().size() > 0)
$helper.action.getPermittedChildren().size() children | View in hierarchy
#end #end #end #macro (renderComments) #applyDecorator("root") #decoratorParam("sitemeshPage" $sitemeshPage) #decoratorParam("page" $page) #decoratorParam("context" "sharedcomments") #end #end #macro (onLoad) #if (!$textUtil.stringSet($sitemeshPage.getProperty("page.bodyOnLoad"))) #else #end #end #macro (versionInfo)

You are viewing an old version (v. $page.version) of this page.
The latest version is v. $page.originalVersion.version, last edited on $generalUtil.format(${page.originalVersion.lastModificationDate}) (view differences | #if ($permissionCheckDispatcher.isPermitted("/pages/revertpagebacktoversion.action?pageId=$page.originalVersion.id&version=${page.version}")) restore this version | #end view page history).
#if ($action.hasPreviousVersion($page)) << View previous version | #end #if ($action.hasNextVersion($page)) View next version >> #else No next version #end
#versionComment()

#end #macro (versionComment) #end #macro (editReport) Added by #usernameLink ($page.creatorName), #if ($page.isLatestVersion() == true)last#end edited by #usernameLink ($page.lastModifierName) on $generalUtil.format( $page.lastModificationDate ) #if ($page.isLatestVersion()) #if ($page.previousVersions.size() != 0) #set($length = $page.previousVersions.size() - 1) #set($prevVersionId = $page.previousVersions.get($length).id)  (view change) #end #end #if ($page.isVersionCommentAvailable()) show comment #versionComment() #end #end #macro (labelsWithNone $labels $showNone) #if ($labels.size() > 0) #foreach($label in $labels)#if($velocityCount > 1), #end #labelLink($label)#end #elseif ($showNone) (None) #end #end #* Renders a comma seperated list of labels limited by a max amount. If there are more than max labels it shows: ... x $message. *# #macro (labelsMax $labels $max $message) #if ($labels.size() > 0) #set($remaining = $labels.size() - $max) #foreach($label in $labels)#if($velocityCount <= $max)#if($velocityCount > 1), #end #labelLink($label)#end#end #if($remaining > 0) ... $remaining $message #end #end #end #macro (labels $labels) #labelsWithNone ($labels true) #end ## label links shown in the context of a space should take the user to a page that contains content for that space only ## to do this, we need to pull the space key either from the $helper or from the $action ## neither of these are available for the $label.urlPath method (which contains the intelligence to display a i18n label properly by id) ## the compromise is to move $label.urlPath logic into here (and also append a spacekey at the end of the i18n friendly url) ## please use this macro to generate url's for labels where ever possible #macro (labelLinkUrl $label)#* *##if ($generalUtil.isSafeTitleForUrl($label.realTitle))#* *#$req.contextPath/label/#if($helper.spaceKey)$helper.spaceKey/#elseif($spaceKey)$spaceKey/#end$webwork.urlEncode($label.realTitle)#* *##else#* *#$req.contextPath$label.urlPath#if($helper.spaceKey)&key=$helper.spaceKey#elseif($spaceKey)&key=$spaceKey#end#* *##end#* *##end #macro (labelLink $label)$label.realTitle#end ## Displays the label link without the namespace #macro (labelLinkBasic $label)$label.name#end #macro (labelString $labelable)#if ($labelable.labels.size() > 0) #foreach($label in $labelable.labels)#if($velocityCount > 1), #end$label.name#end#end #macro (mailOperations $helper) #end #* ----------------------------------------------- LOGO MACROS ----------------------------------------------- *# ## only returns the image url of the appropriate logo #macro (logo $spaceKey)#* *##if ($textUtil.stringSet($spaceKey) && $resourceManager.getResourceWithSpaceKey("logo", $spaceKey))#* *#$req.contextPath/download/userResources/$spaceKey/logo#* *##elseif ($resourceManager.getResource("logo", null))#* *#$req.contextPath/download/userResources/logo#* *##else#* *#$req.contextPath/images/confluence_logo.gif#* *##end#* *##end ## checks if space preferences to determine if the logo has been disabled, and then displays it. ## include href link just in case we want to customize this part based on some preference in the future (without breaking people's stuff again) #macro (logoBlock $spaceKey)#* *##if ($textUtil.stringSet($spaceKey))#* *##spaceLogoBlock($spaceKey)#* *##else#* *##globalLogoBlock()#* *##end#* *##end ## private - use #logoBlock #macro (spaceLogoBlock $spaceKey)#* *##if ($settingsManager.getSpaceSettings($spaceKey).isDisableLogo())#* render nothing *##else#* *##if($resourceManager.getResourceWithSpaceKey("logo", $spaceKey))#* check if a space logo exists so we know if we need to defer to global logo settings *##* *##else#* *##globalLogoBlock()#* *##end#* *##end#* *##end ## private - use #logoBlock #macro (globalLogoBlock)#* *##if ($settingsManager.getGlobalSettings().isDisableLogo())#* render nothing *##else#* *##* *##end#* *##end #* ----------------------------------------------- SIMPLE LINK MACROS ----------------------------------------------- Store macros which render a one line link here. *# #macro (tinyLink ) $helper.domainName/x/$helper.tinyUrl #end #* Renders a link and image for removing the current page. *# #macro (removePageLinkAndImage ) #end #* Renders a link for removing the current page. *# #macro (removePageLink) Remove #end #* Renders a link and image for removing the current blogpost. *# #macro (removeBlogPostLinkAndImage ) #end #* Renders a link for removing the current blogpost. *# #macro (removeBlogPostLink ) Remove #end #macro (browseSpaceLinkAndImage) #set ($spaceKey = $helper.spaceKey) #if (!$spaceKey && $space) #set ($spaceKey = $space.key) #end #if ($permissionCheckDispatcher.isPermitted("/pages/listpages.action?key=$spaceKey")) Browse Space #end #end #macro (browseSpaceLink) #set ($spaceKey = $helper.spaceKey) #if ($permissionCheckDispatcher.isPermitted("/pages/listpages.action?key=$spaceKey")) Browse Space #end #end #macro (addPageLinkAndImage) #set ($spaceKey = $helper.spaceKey) #if ($permissionHelper.canCreatePage($remoteUser, $space)) ## if user currently viewing a page, add page automatically creates a new page with that page is the parent #if ($helper.page.id && !$helper.page.postingDay) Add Page #else Add Page #end #end #end #macro (addPageLink) #set ($spaceKey = $helper.spaceKey) #if ($permissionHelper.canCreatePage($remoteUser, $space)) ## if user currently viewing a page, add page automatically creates a new page with that page is the parent #if ($helper.page.pageId && !$helper.page.postingDay) Add Page #else Add Page #end #end #end #macro (addNewsLinkAndImage) #set ($spaceKey = $helper.spaceKey) #if ($permissionCheckDispatcher.isPermitted("/pages/createblogpost.action?spaceKey=$spaceKey")) #if ($helper.page.id) #set ($fromPageParam = "&fromPageId=$helper.page.id") #else #set ($fromPageParam = "") #end Add News #end #end #macro (addNewsLink) #set ($spaceKey = $helper.spaceKey) #if ($permissionCheckDispatcher.isPermitted("/pages/createblogpost.action?spaceKey=$spaceKey")) #if ($helper.page.id) #set ($fromPageParam = "&fromPageId=$helper.page.id") #else #set ($fromPageParam = "") #end Add News #end #end #macro (viewPageLink ) #if ($helper.page.id) #if ( $permissionCheckDispatcher.isPermitted("/pages/viewpage.action?pageId=$pageId") ) View #end #end #end #macro (attachmentsLink) #if ( $permissionCheckDispatcher.isPermitted("/pages/viewattachments.action?pageId=$pageId") ) Attachments ($!helper.numberOfAttachments) #end #end #macro (recentlyUpdatedListLink) Recently Updated #end #macro (alphabeticalListLink) Alphabetical #end #macro (contentTreeLink) Tree #end #macro (pluginStylesheet $pluginCompleteKey $stylesheetName) #end #macro (node $p $idsToExpandAsList $openId) #if ($action.hasPermittedChildren($p)) #if($idsToExpandAsList.contains($p.id)) #else #end #else #end #if ($p.id == $openId) #contentLinkWithAnchor($p 'selectedPageInHierarchy') #else #contentLink2 ($p true false) #end
#if ($idsToExpandAsList.contains($p.id)) #end
#end #macro (permitSearchEngines) true #end #macro (viewPageComment $comment $rootDepth) #set ($depth = $comment.depth - $rootDepth) #set ($page = $comment.page)
$xHtmlComments.get($comment)
Posted by #usernameLink ($comment.creatorName) at $generalUtil.formatDateTime( $comment.creationDate ) #if ($action.isPrintableVersion() == false) | Permalink #if ( $permissionHelper.canRemove($remoteUser, $comment )) | Remove #end #if ($threadComments && $permissionHelper.canComment($remoteUser, $page)) | $action.getText("reply.to.comment") #end #end
#trackbackRdf ($trackbackUtils.getContentIdentifier($comment) $comment.title $trackbackUtils.getPingUrl($comment)) #if ( $threadComments && $replyToComment == $comment.id && $permissionCheckDispatcher.isPermitted("/pages/doaddcomment.action?pageId=$page.id") && $action.isPrintableVersion()==false )
#if( !$remoteUser ) #parse ("/includes/alert-anonymous.vm") #end
#bodytag (Component "name='content'" "theme='notable'" "template='wiki-textarea.vm'") #param ("formname" "threadedcommentform") #param ("spaceKey" "$spaceKey") #param ("rows" 15) #param ("cols" 70) #param ("width" "100%") #param ("tabindex" "4") #param ("tdcolor" "f0f0f0") #param ("toolbarExpanded" "false") #param ("initialFocus" "false") #param ("edit" "true") #param ("heartbeat" "false") #end #tag (Submit "name='confirm'" "value='post.name'" "theme='notable'" ) #tag( Submit "name='preview'" "value='preview.name'" "theme='notable'" )
#end
#if ($threadComments) #if ($comment.children.size() > 0) #if ($depth < 3 || $comment.descendantsCount == 1) #foreach ($childComment in $comment.children) #viewPageComment($childComment $rootDepth) #end #else
View the rest of this thread. Most recent comment: #if ($generalUtil.isInLastDays($comment.threadChangedDate, 60)) $generalUtil.getRelativeTime($comment.threadChangedDate) #else $generalUtil.format($comment.threadChangedDate) #end
$comment.descendantsCount more comments by: #nameList($comment.descendantAuthors)
#end #end #end
#end #macro (searchResultContentLink $content) #contentIcon($content) ## Render the search result link #if ($content.type == "attachment") $webwork.htmlEncode($content.realTitle) #elseif ($content.type == "comment") $webwork.htmlEncode($content.realTitle) #else $webwork.htmlEncode($content.realTitle) #end ## Render the context of the search result (what space it was in, etc) #if ($content.type == "page" || $content.type == "blogpost") #if ($content.originalVersion) v. $content.version ($content.originalVersion.space.name) #else ($content.space.name) #end #elseif ($content.type == "comment") ($content.page.space.name > $webwork.htmlEncode($content.page.realTitle)) #elseif ($content.type == "spacedesc") (Space Description) #elseif ($content.type == "userinfo") ($content.username) ## If it is a profile attachment, display the username (CONF-4272) #elseif ($content.type == "attachment" && $content.content.type == "userinfo") ($content.content.username) #elseif ($content.type == "attachment") ($content.content.space.name > $webwork.htmlEncode($content.content.realTitle)) #elseif ($content.type == "mail") ($content.space.name) #end #end #macro (searchResult $searchResultWithExcerpt $showExcerpts) #set ($content = $searchResultWithExcerpt.resultObject) #set ($contentBody = $searchResultWithExcerpt.content) #searchResultContentLink($content) #if ('true' == $showExcerpts) #if ($content.type != "attachment") #set ($summary = $generalUtil.makeSummary($contentBody, $action.searchQuery.getSearchWords())) #elseif ($content.type == "attachment" && $contentBody) #set ($summary = $generalUtil.makeSummary($contentBody, $action.searchQuery.getSearchWords())) #elseif ($content.type == "attachment" && $content.comment) #set ($summary = $generalUtil.makeSummary($content.comment, $action.searchQuery.getSearchWords())) #end #if ($summary)
## this is all one one line so that fragments are concatenated properly without spaces #foreach ($fragment in $summary.fragments)#if ($fragment.isHighlight() == true)$generalUtil.htmlEncode($fragment.toString())#else$generalUtil.htmlEncode($fragment.toString())#end#end #end #end
#if ($content.type == 'attachment') #if ($content.niceType) $content.niceType - #end $content.niceFileSize - #end $generalUtil.format($content.lastModificationDate) #if ($content.type == 'attachment') - Download - All Attachments #elseif ($content.type == 'comment') - All Comments #elseif ($content.type == 'blogpost') - All News #elseif ($content.type == 'mail') - All Mail #end #end #if ($content.labels.size() > 0)
Labels: #labelsMax($content.labels 5 'more labels.') #end #end #macro (commaDelimitedList $list) #foreach($item in $list)#if($velocityCount != 1), #end$item#end #end