## This template requires the com.atlassian.jira.web.component.webfragment.UserNavContextLayoutBean to be passed
##
#set ($displayableLinks = $webInterfaceManager.getDisplayableItems("$location/links", $user, $helper))
#set ($displayableViews = $webInterfaceManager.getDisplayableItems("$location/views", $user, $helper))
##
#if ($user)
- $userformat.formatUser($user.name,'profileLink', 'user_nav_bar')
#end
#if (!$displayableLinks.isEmpty())
#foreach ($item in $displayableLinks)
-
#if ($item.params.get("isLoginLink") && $item.params.get("isLoginLink") == "true")
$layout.getLoginLink($item.label.getDisplayableLabel($user, $helper))
#elseif ($item.params.get("isPopupLink") && $item.params.get("isPopupLink") == "true")
$item.label.getDisplayableLabel($user, $helper)
#elseif ($item.params.get("isPopupLink") && $item.params.get("isPopupLink") == "false")
$item.label.getDisplayableLabel($user, $helper)
#elseif ($item.params.get("presentation"))
#set ($pres = $item.params.get("presentation"))
#if ($pres == "popup")
$item.label.getDisplayableLabel($user, $helper)
#elseif ($pres == "loginlink")
$layout.getLoginLink($item.label.getDisplayableLabel($user, $helper))
#elseif ($pres == "simplelink")
$item.label.getDisplayableLabel($user, $helper)
##
## Dialogs have been canned for now but they may turn up in the future so we
## are leaving this here as an inactive example of how they could be used in this plugin
##
## elseif ($pres == "dialog")
## $item.label.getDisplayableLabel($user, $helper)
##
##
#elseif ($pres == "menubutton")
#end
#else
$item.label.getDisplayableLabel($user, $helper)
#end
#end
#end
#if (!$displayableViews.isEmpty())
#foreach ($item in $displayableViews)
-
#if ($item.icon)
#else
$item.link.getRenderedUrl($user, $helper)
#end
#end
#end