{namespace JIRA.Templates} /** * Renders mentions suggestions * @param suggestions * @param? query the query used to generate the suggestions * @param? activity whether the mentions control is actively retrieving data or not * @param? isRolesEnabled whether roles based mentions are supported */ {template .mentionsSuggestions}
{if length($suggestions) > 0} {else} {call .noSuggestions} {param activity: $activity/} {param query}{$query}{/param} {/call} {/if} {if $isRolesEnabled} {/if}
{/template} /** * @param? query the query used to generate the suggestions * @param? activity whether the mentions control is actively retrieving data or not */ {template .noSuggestions} {if length($query) == 0}
{getText('jira.mentions.startsearch')}
{elseif $activity}
{getText('jira.mentions.searching', '', $query, '')|noAutoescape}
{else}
{getText('jira.mentions.nomatch', '', $query, '')|noAutoescape}
{/if} {/template} /** * Prints the display name, email address and name of a user (and highlights if necessary) * * @param displayName * @param emailAddress * @param avatarUrls * @param name * @param? issueRoles */ {template .highlitEntry} {$displayName} {call .highlightMention} {param match: $displayName /} {/call} {sp}-{sp} {$emailAddress} {call .highlightMention} {param prefix}{sp}({/param} {param match: $name /} {param suffix}){/param} {/call} {if $issueRoles} {call .renderIssueRoles} {param issueRoles: $issueRoles /} {/call} {/if} {/template} /** * Prints highlit text (if any). * * @param match * @param? prefix * @param? suffix */ {template .highlightMention} {if $match.text or $match.match} {if $prefix}{$prefix}{/if} {if $match.match} {$match.prefix}{$match.match}{$match.suffix} {else} {$match.text} {/if} {if $suffix}{$suffix}{/if} {/if} {/template} /** * Render issue user types of an user * * @param issueRoles */ {template .renderIssueRoles} {foreach $role in $issueRoles} {sp} {call .highlightMention} {param prefix}{/param} {param match: $role /} {param suffix}{/param} {/call} {/foreach} {/template}