<!-- GLOBAL DECORATOR
    This decorator handles a global context, i.e. information which is independent of space.
    Supports modes: 'dashboard', 'userdir', 'rss'.
-->

#set ($mode     = $params.get("mode"))
#set ($context  = $params.get("context"))
#set ($helper  = $params.get("helper"))
#set ($infoPanelWidth = $params.get("infopanel-width"))
#set ($maxFavouritePages = "10")  ## Change this value to increase the number of favourite pages displayed on the Dashboard

#infoPanelInitFromParams()

<!-- GENERAL PAGE DECORATING BEGINS -->

<div class="pagebody">
    <!-- output errors -->
    #parse ( "/template/includes/actionerrors.vm" )

    <table class="dashboard" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>

        #if ($mode == "dashboard")
            #parse ("/decorators/includes/dashboard-navigation.vm")
            #requireResourcesForContext("dashboard")
            #rssautodiscovery($action.rssDescriptor)
            #permitSearchEngines()

            <td class="left" width="40%" valign="top">
                <div class="padded">
                #parse ( "/dashboard/dashboard-welcome.vm" )

                $helper.renderConfluenceMacro("{spaces}")
                <br/>
                #dashboard_renderGlobalActions("dashboardActionsId", ["system.dashboard"] )
                </div>

            </td>
            <td class="right" width="60%" valign="top">
                <div class="padded">
                $helper.renderConfluenceMacro("{recently-updated-dashboard:dashboard|showProfilePic=true}")
                $helper.renderConfluenceMacro("{favpages:maxResults=$maxFavouritePages}")
                </div>
            </td>
        #elseif ($mode == "userdir")
            <td width="100%" valign="top">
            $body
            </td>
        #elseif ($mode == "rss")
            <td width="50%" valign="top">
                $body
            </td>
         #end

        ## INFO PANEL FOR ANY PAGE
        #if ($infoPanelRequired)
            <td width="$infoPanelWidth" valign="top" id="helptd">
                #infoPanel(true true true true)
            </td>
        #end

        </tr>
    </table>
</div>

#parse ( "/breadcrumbs.vm" )
<content tag="browse-menu">
    #menuMacros_renderGlobalBrowseMenu()
</content>

<!-- GENERAL PAGE DECORATING ENDS -->
