## $Revision$ $Date$
## - URL generator macros -----------------------------------------------------
#macro(linkUser $user)
#linkUserShort($user)
#if(${user.firstName} && ${user.lastName})
($textFormatter.escape(${user.lastName}), $textFormatter.escape(${user.firstName}))
#end
#end
#macro(linkUserShort $user)
#if( !${user.name} || ${user.name} == "")
--
#else
$textFormatter.escape(${user.name})
#end
#end
#macro(linkUserEmail $user)
$textFormatter.escape(${user.email})
#end
#macro(linkUserPhone $user)
#if( !${user.phone} || ${user.phone} == "")
--
#else
$textFormatter.escape(${user.phone})
#end
#end
#macro(linkGeoIP $geoIP)
#if( !${geoIP.mapUrl})
--
#else
$textFormatter.escape(${geoIP.location})
#end
#end
## Link to any ReferableDto
#macro(linkReferableDto $referable)
#linkReferableDtoWithParams($referable "")
#end
## $refereable The link will be created to this referable
## $params Optional parameters on the url
#macro(linkReferableDtoWithParams $referable $params)
#set($url = "${cbBaseUrl}${referable.urlLink}")
#set($url = ${textFormatter.buildUrl(${url},${params})})
${textFormatter.escape($!{referable.shortDescription})}
#end
#macro(linkProject $project)#linkReferableDto($project)#end
#macro(linkArtifact $artifact)
$textFormatter.escape(${artifact.name})
#end
#macro(linkArtifactParent $artifact)
$textFormatter.escape(${artifact.ScopeName})
#end
#macro(linkArtifactComments $artifact)
View all comments on $textFormatter.escape(${artifact.name})
#end
#macro(linkWikiPageComments $wikiPage)
View all comments on $textFormatter.escape(${wikiPage.name})
#end
#macro(linkTrackerItemPane $item $trackerItemTabPane)
#if( !$trackerItemTabPane || $trackerItemTabPane == "")
#set( $trackerItemTabPane = "task-details-comments" )
#end
#if( !$item.summary || $item.summary == "")
#set($description = ${item.id})
#else
#set($description = $textFormatter.escape(${item.summary}))
#end
${item.typeName}
#if($item.closed)
[${item.keyAndId}]
#else
[${item.keyAndId}]
#end
- ${description}
#end
#macro(linkTrackerItem $item)
#linkTrackerItemPane($item "task-details-comments")
#end
#macro(linkTrackerItemAttachment $item)
#linkTrackerItemPane($item "task-details-attachments")
#end
#macro(linkTrackerItemComment $item)
#linkTrackerItemPane($item "task-details-comments")
#end
#macro(linkTrackerItemAssociation $item)
#linkTrackerItemPane($item "task-details-associations")
#end
#macro(linkAssociationDetails $association)
#if (${association.ToTypeId} == 5)
Association:
[DOC:${association.ToId}]
#elseif (${association.urlReference})
Association:
[${association.url}]
#elseif (${association.toUrl})
Association:
[${association.toInterwikiReference} $textFormatter.escape(${association.toDescription})]
#end
## ${association}, ToTypeId: ${association.ToTypeId}, ToId: ${association.ToId}
#end
##macro(linkTrackerItemAttachment $attachment)
## ${attachment.filename}
##end
#macro(linkTracker $tracker)
$textFormatter.escape(${tracker.name})
#end
#macro(linkMembersPane $project $linkName $membersTabPane)
#if( !$membersTabPane || $membersTabPane == "")
#set( $membersTabPane = "project-members-roles-accounts" )
#end
$textFormatter.escape(${linkName})
#end
#macro(linkForumThread ${forumPost})
#set ($anchor = "")
#if (${forumPost.threadId} > 0 && ${forumPost.threadId} != ${forumPost.id})
#set ($anchor = "#MSG_${forumPost.id}")
#end
#set ($forumPostLink = "${cbBaseUrl}/proj/forum/viewMessage.do?thread_id=${forumPost.threadId}" )
$textFormatter.escape(${forumPost.subject})
#end
#macro(linkForumPostAttachment ${forumPost})
$textFormatter.escape(${forumPost.attachmentFileName})
#end
#macro(linkWikiPage $wikiPage)
${wikiPage.name}
#end
#macro(linkReport $doc)
#if(${doc.additionalInfo.contentLastModifiedBy.name})
#set( $lastModifiedBy = ${doc.additionalInfo.contentLastModifiedBy.name})
#else
#set( $lastModifiedBy = "--")
#end
#set( $lastModified = "Last modified: $textFormatter.formatDate(${user}, ${doc.additionalInfo.contentLastModifiedAt}, true) by $textFormatter.escape($lastModifiedBy)" )
#if($doc.writable)${doc.name}#else${doc.name} ${lastModified}#end
#end
## - Table macros -------------------------------------------------------------
#macro(tableOpen)
$rowCounter.reset()