#elseif ($fieldValuesHolder && $displayParameters.dbFieldValuesHolder && $displayParameters.dbFieldValuesHolder.containsKey($fieldId) && $displayParameters.dbFieldValuesHolder.get($fieldId) != $fieldValuesHolder.get($fieldId))
#else
#end
#if($spanClass)
$textutils.htmlEncode($fieldName):
#else
$textutils.htmlEncode($fieldName):
#end
#end
#macro (searcherHeader $field)
#searcherHeaderNoField ($field.id $field.name)
#end
#macro (searcherFooter $field)
#end
#macro(searcherEditHeader $id $name)
#customControlHeader ($action "searcher-$id" $name false $!displayParameters $!auiparams)
#end
#macro(searcherEditFooter $id $description)
#customControlFooter($action $id $description $!displayParameters $!auiparams)
#end
#macro(searchContextDescriptionTitle $searcherNameKey $value $contextProjectNames $contextIssueTypeNames)
title="$i18n.getText("jira.search.context.invalid.generic", $i18n.getText($searcherNameKey), $textutils.htmlEncode($value))"
#end
#macro (searchContextDescriptionTitleGeneral $searcherNameKey $value $contextProjectNames $contextIssueTypeNames)
#if ($contextProjectNames.length() == 0 && $contextIssueTypeNames.length() == 0)
title="$i18n.getText("jira.search.context.general", $i18n.getText($searcherNameKey), $textutils.htmlEncode($value))"
#else
#searchContextDescriptionTitle($searcherNameKey $value $contextProjectNames $contextIssueTypeNames)
#end
#end
#macro(searchContextDescriptionTitleProjectOnly $searcherNameKey $value $contextProjectNames)
#if ($contextProjectNames.length() > 0)
title="$i18n.getText("jira.search.context.invalid.project.only", $i18n.getText($searcherNameKey), $textutils.htmlEncode($value))"
#end
#end
#macro (searchContextDescriptionTitleProjectOrGeneral $searcherNameKey $value $contextProjectNames)
#if ($contextProjectNames.length() > 0)
#searchContextDescriptionTitleProjectOnly($searcherNameKey $value $contextProjectNames)
#else
title="$i18n.getText("jira.search.context.general", $i18n.getText($searcherNameKey), $textutils.htmlEncode($value))"
#end
#end
#macro (configureIndexing $ctxPath)
$i18n.getText("gadget.common.indexing")
#if ($admin)
$i18n.getText("gadget.common.indexing.configure", "
", " ")
#else
$i18n.getText("gadget.common.indexing.admin")
#end
#end
## This displays a list of issues
#macro (displayRelatedIssues $issues)
#if ($issues)
#set ($size = $issues.size())
#foreach ($issue in $issues)
#set ($showComma = ($velocityCount != $size))
#if ($displayParams && $displayParams.get('nolink') && !${displayParams.excel_view})
#if ($issue.getResolution())
$issue.getKey() #if($showComma),#end
#else
$issue.getKey()#if($showComma),#end
#end
#elseif($displayParams && ${displayParams.excel_view})
$issue.getKey()#if($showComma),#end
#else
#if ($issue.isRemote())
#if ($issue.getResolution())
$textutils.htmlEncode($issue.getKey()) #if($showComma),#end
#else
$textutils.htmlEncode($issue.getKey()) #if($showComma),#end
#end
#else
#if ($issue.getResolution())
$textutils.htmlEncode($issue.getKey()) #if($showComma),#end
#else
$textutils.htmlEncode($issue.getKey()) #if($showComma),#end
#end
#end
#end
#end
#else
#end
#end
#macro (comma $list)
#if ($velocityCount == ($list.size() - 1)) $i18n.getText('common.words.and') #elseif ($velocityCount < $list.size()), #end
#end
#macro (commaor $list)
#if ($velocityCount == ($list.size() - 1)) $i18n.getText('common.words.or') #elseif ($velocityCount < $list.size()), #end
#end
#macro (commaonly $list)
#if ($velocityCount < $list.size()), #end
#end
#macro (datePopupOptions $dateTimeFormat $dateFormat $timeFormat $dateTimePicker $currentMillis $currentCalendar)
#datePopup ($null, $null, $dateTimeFormat $dateFormat $timeFormat $dateTimePicker $currentMillis $currentCalendar)
#end
#macro (datePopup $inputField $inputButton $dateTimeFormat $dateFormat $timeFormat $dateTimePicker $currentMillis $currentCalendar)
$calendarIncluder.includeForLocale($i18n.getLocale())
#set ($firstDay = $currentCalendar.firstDayOfWeek - 1)
## first day of the week
#if ($inputField)
## id of the input field
#end
#if ($inputButton)
## trigger for the calendar (button ID)
#end
## alignment (defaults to "Bl")
## use ISO8601 date/time standard?
#if($!{dateTimePicker})
## our date and time format
## display the time selector
## 12 or 24 hours format
#else
## our date only format
#end
#end
#macro (jiraform $title $description $cancelLinkURL $cancelLinkText)
#end
#* @vtlvariable name="comment" type="com.atlassian.jira.issue.comments.Comment" *#
#* @vtlvariable name="commentAction" type="com.atlassian.jira.issue.tabpanels.CommentAction" *#
## This does not belong here but is here to fix JRA-12066 till we move to velocity 1.5
#macro (actionDetailsBody $collapse $commentAction $i18n $suffix $shouldReturnPlainText $commentUrl)
#set ($comment = $commentAction.comment)
#if ($comment.authorApplicationUser)
#set($authorKey = $comment.authorApplicationUser.key )
#end
#set ($author = $comment.authorApplicationUser)
#set ($updateAuthor = $comment.updateAuthorApplicationUser)
#if ($comment.groupLevel)
#set ($level = $textutils.htmlEncode($comment.groupLevel))
#elseif ($comment.roleLevel)
#set ($level = $textutils.htmlEncode($comment.roleLevel.name))
#end
#if(!$comment.created.equals($comment.updated))
#set ($formattedUpdateDate = "$action.formatDisplayHtml($comment.updated)")
#if ($updateAuthor)
#set ($quote = '"')
#if ($comment.updateAuthorFullName)
#set ($updateInfo = "$textutils.htmlEncode($comment.updateAuthorFullName) - $formattedUpdateDate")
#else
#set ($updateInfo = "$comment.updateAuthorApplicationUser.name - $formattedUpdateDate")
#end
#else
#set ($updateInfo = "$i18n.getText('common.words.anonymous') - $formattedUpdateDate")
#end
#end
#set ($prettyCreateDate = "$action.formatDisplayHtml(${comment.created})")
#set ($iso8601CreateDate = "$action.formatIso8601Html(${comment.created})")
#set ($createdDate =
" - ")
#if ($level)
#set ($visibilityLevel ="
$i18n.getText('viewissue.comment.visibleby') $level ")
#end
#if (!$shouldReturnPlainText)
#if ($commentAction.pinned)
#set ($prettyPinnedDate = "$action.formatDisplayHtml(${commentAction.pinnedAt})")
#set ($iso8601PinnedDate = "$action.formatIso8601Html(${commentAction.pinnedAt})")
#set ($tooltipText = $i18n.getText('issue.tabpanels.commment.pinned.tooltip', $prettyPinnedDate))
#set ($pinicon = "
")
#if ($collapse)
#else
#set ($pinnedDate ="
$prettyPinnedDate ")
#if (!$shouldReturnPlainText)
#else
#set ($pinnedBy = $i18n.getText(
'issue.tabpanels.comment.pinnedby',$userformat.formatUserkey($commentAction.pinnedBy,
'profileNameActionHeader', 'commentauthor_${commentAction.comment.id}_pinnedby')))
$pinnedBy
#end
#end
#end
$i18n.getText(
'issue.tabpanels.comment.action.header', $userformat.formatUserkey($authorKey, 'profileLinkActionHeader',
"commentauthor_${comment.id}_$!{suffix}"), $createdDate) #if($visibilityLevel)
- $visibilityLevel #end #if($updateInfo) -
$i18n.getText(
'common.concepts.edited') #end #if($pinpart) $pinpart #end
#else
#if ($commentAction.pinned)
#set ($prettyPinnedDate = "$action.formatDisplayHtml(${commentAction.pinnedAt})")
#set ($iso8601PinnedDate = "$action.formatIso8601Html(${commentAction.pinnedAt})")
#set ($tooltipText = $i18n.getText('issue.tabpanels.commment.pinned.tooltip', $prettyPinnedDate))
#set ($pinicon = "
")
#if ($collapse)
#else
#set ($pinnedDate ="
$prettyPinnedDate ")
#if (!$shouldReturnPlainText)
#else
#set ($pinnedBy = $i18n.getText(
'issue.tabpanels.comment.pinnedby',$userformat.formatUserkey($commentAction.pinnedBy,
'profileNameActionHeader', 'commentauthor_${commentAction.comment.id}_pinnedby')))
$pinnedBy
#end
#end
#end
$i18n.getText(
'issue.tabpanels.comment.action.header', $userformat.formatUserkey($authorKey, 'profileNameActionHeader',
"commentinfoauthor_${comment.id}_$!{suffix}"), "- $prettyCreateDate")#if($visibilityLevel) - $i18n.getText(
'viewissue.comment.visibleby') $level#end#if($updateInfo), $i18n.getText(
'viewissue.comments.edited.by', $updateInfo)#end #if($pinpart) $pinpart #end
#end
#end
## Displays header
#macro(pagerHeader $i18n $issueCount $totalCount $navigatorURL)
#if($totalIssuesCount > 0)
#if($totalCount > $issueCount)
$i18n.getText("browseproject.unresolvedissues.more", "$issueCount", "", "$totalCount", " ")
#else
$i18n.getText("browseproject.unresolvedissues", "", "$totalCount", " ")
#end
#end
#end
## Helper to print the More issues footer.
#macro(pagerFooterIfNeeded $i18n $issueCount $totalCount $navigatorURL)
#if($totalCount > $issueCount)
$i18n.getText('browseproject.openissues.more.footer', "$issueCount", "$totalCount", "')
#end
#end
#macro(userProfileLinks $category $webInterfaceManager $location $helper)
#set ($displayableLinks = $webInterfaceManager.getDisplayableItems("$location/$category", $user, $helper))
#if (!$displayableLinks.isEmpty())
#foreach ($item in $displayableLinks)
#if ($item.params.get("actionName"))
#set ($linkActionName = $item.params.get("actionName"))
#else
#set ($linkActionName = $item.link.getDisplayableUrl($user, $helper))
#end
#if ($item.params.get("showLinkWhenNotMe"))
#set ($showLinkNormal = $user.equals($layout.profileUser))
#else
#set ($showLinkNormal = true)
#end
#if ($layout.getActionName() && $linkActionName.indexOf($layout.getActionName()) != -1 && $showLinkNormal)
$item.label.getDisplayableLabel($user, $helper)
#else
$item.label.getDisplayableLabel($user, $helper)
#end
#end
#end
#end
#macro(safeMenuAccessKey $i18n $accessKeyHelper $accessKeyI18nKey $layoutModifierKey)
#set ($i18nKey = "menu.accesskey.$accessKeyI18nKey")
#if ($i18n.isKeyDefined($i18nKey) && $accessKeyHelper.isAccessKeySafe($i18n.getText($i18nKey))) (${layoutModifierKey}+${i18n.getText($i18nKey)})#end
#end
#**
* The
et al. for the labels frother control when rendering the labels system and custom fields
* (except in the edit labels page and edit labels dialog, for that see labelsform.jsp).
*
* @param $i18n i18n helper
* @param $issue optional issue (will typically be null for create issue)
* @param $fieldId the labels field ID (system or custom field)
* @param $labels the labels associated with the field
*#
#macro(labelsSelect $i18n $issue $fieldId $labels)
#if ($issue && $issue.id)
#end
#foreach ($label in $labels)
${textutils.htmlEncode($label.label)}
#end
${i18n.getText('label.edit.start.typing')}
#end
#**
* The lozenges for the labels system and custom fields (with an optional edit link). Also see labelsLozenges.jsp
* which returns the same HTML for the in-line updating of labels fields.
*
* @param i18n i18n helper
* @param loggedInUser the user issuing the server request
* @param labelUtil labels helper
* @param issueId the ID of the issue; may be null for bulk edit preview
* @param fieldId the labels field name (e.g., 'labels' or 'customfield_10000')
* @param customFieldIdAsLong custom field (numeric) ID or false if it is the labels system field
* @param labels the labels to render
* @param canEdit true if the edit labels link should be rendered, false otherwise; note that the issue navigator
* currently doesn't allow editing, so if this changes, then the DOM IDs rendered here need to be modified.
* @param readOnly true if the labels are read only, false otherwise
* @param baseurl the JIRA instance's base URL
*#
#macro(labelsLozenges $i18n $loggedInUser $labelUtil $issueId $fieldId $customFieldIdAsLong $labels $canEdit $noLink $readOnly $baseUrl $prefix)
#if ($labels && $labels.size() > 0)
#else
${i18n.getText('common.words.none')}
#if ($canEdit && $readOnly == false && $applicationProperties.getOption('jira.issue.inline.edit.disabled'))
## Edit links don't appear in issue tables, so id's of the form edit-labels-(labels|customfield_10000) are good enough.
${i18n.getText('label.edit.title')}
#end
#end
#end
#macro(avatarPicker $defaultId $avatarOwnerId $avatarOwnerKey $title $id $src $width $height)
130000000
$defaultId
$textutils.htmlEncode($avatarOwnerId)
#if ($avatarOwnerKey)$avatarOwnerKey #end
user
#end
#**
* gets avatar url for given user
*#
#macro (getAvatarURL $displayUser)$avatarServiceHelper.renderURL($authcontext.getLoggedInUser(), $displayUser, $avatarSize)#end
#**
* Renders a group . This is parsed then rendered by javscript as a suggestion in sparkler controls/
*#
#macro (renderGroup $group $isSelected $removeOnUnselect $usePrefix)
$textutils.htmlEncode($group.getName())
#end
#**
* Renders a user . This is parsed then rendered by javscript as a suggestion in sparkler controls/
*#
#macro (renderUser $user $isSelected $removeOnUnselect $usePrefix)
$textutils.htmlEncode($user.getDisplayName())
#end
#**
* These hidden inputs sumbit back to the server all the previously selected values, so we know what changed
*#
#macro(prevValues $userField $values)
#if ($values && !$values.empty)
#foreach ($value in $values)
#if ($value.isGroup())
#elseif ($value.isUser())
#end
#end
#end
#end
#**
* Renders user suggestions. This optgroup represents what user are displayed when the control is initialized.
*#
#macro(userSuggestionsGroup $hasPermissionToPickUsers $suggestedUsers $hasEmpty $emptyValueKey $usePrefix $allowCurrentUser $hasCurrentUser)
#if ($emptyValueKey || $hasCurrentUser)
#if ($allowCurrentUser && $authcontext.isLoggedInUser())
#set ($user = $authcontext.getLoggedInUser())
#end
#if ($emptyValueKey)
#end
#end
#if ($hasPermissionToPickUsers && $suggestedUsers && !$suggestedUsers.empty)
#foreach ($user in $suggestedUsers)
#renderUser($user false, false, $usePrefix)
#end
#end
#end
#**
* Renders group suggestions. This optgroup represents what groups are displayed when the control is initialized.
*#
#macro (groupSuggestionsGroup $hasPermissionToPickUsers $suggestedGroups $usePrefix)
#if ($hasPermissionToPickUsers && $suggestedGroups && !$suggestedGroups.empty)
#foreach ($group in $suggestedGroups)
#renderGroup($group false, false $usePrefix)
#end
#end
#end
#**
* Renders selected suggestions. This optgroup represents what suggestions are currently selected.
*#
#macro(selectedGroup $values $usePrefix)
#if ($values && !$values.empty)
#foreach ($value in $values)
#if ($value.isGroup())
#renderGroup($value.getObject() true false $usePrefix)
#elseif ($value.isUser())
#renderUser($value.getObject() true false $usePrefix)
#end
#end
#end
#end
#**
* Renders users ONLY searcher
*#
#macro(userSearcher $id $name $values $hasPermissionToPickUsers $suggestedUsers $placeholderText $hasEmpty $emptyValueKey $description)
$!{auiparams.put("controlHeaderClass", "aui-field-userlist")}
#searcherEditHeader (${id} ${name})
#userSuggestionsGroup($hasPermissionToPickUsers $suggestedUsers $hasEmpty $emptyValueKey false, false, false)
#if ($values && !$values.empty)
#foreach ($value in $values)
#renderUser($value true true false)
#end
#end
#prevValues($id $values)
#searcherEditFooter (${id} ${description})
$!{auiparams.clear()}
#end
#**
* Renders group ONLY searcher
*#
#macro(groupSearcher $id $name $values $hasPermissionToPickUsers $suggestedGroups $placeholderText $hasEmpty $emptyValueKey $description)
$!{auiparams.put("controlHeaderClass", "aui-field-userlist")}
#searcherEditHeader (${id} ${name})
#groupSuggestionsGroup($hasPermissionToPickUsers $suggestedGroups false)
#if ($values && !$values.empty)
#foreach ($value in $values)
#renderGroup($value true true false)
#end
#end
#prevValues($id $values)
#searcherEditFooter (${id} ${description})
$!{auiparams.clear()}
#end
#**
* Renders users and groups searcher
*#
#macro(userGroupSearcher $id $name $fieldName $values $hasPermissionToPickUsers $suggestedUsers $suggestedGroups $hasEmpty $emptyValueKey $hasCurrentUser $description)
#userGroupSearcherWithFieldValues (${id} ${name} ${fieldName} ${values} $null ${hasPermissionToPickUsers} ${suggestedUsers} ${suggestedGroups} ${hasEmpty} ${emptyValueKey} ${hasCurrentUser} ${description})
#end
#macro(userGroupSearcherWithFieldValues $id $name $fieldName $fieldValuesMap $values $hasPermissionToPickUsers $suggestedUsers $suggestedGroups $hasEmpty $emptyValueKey $hasCurrentUser $description)
$!{auiparams.put("controlHeaderClass", "aui-field-userlist")}
#searcherEditHeader (${id} ${name})
#if ($fieldValuesMap && !$fieldValuesMap.empty)
#foreach ($fieldValue in $fieldValuesMap.entrySet())
#if ($fieldValue.value.size())
#foreach($fieldValueItem in $fieldValue.value)
#end
#else
#end
#end
#end
#userSuggestionsGroup($hasPermissionToPickUsers $suggestedUsers $hasEmpty $emptyValueKey true true $hasCurrentUser)
#groupSuggestionsGroup($hasPermissionToPickUsers $suggestedGroups true)
#selectedGroup($values true)
#prevValues($userField $values)
#searcherEditFooter (${userSelect} ${description})
$!{auiparams.clear()}
#end