<?php
/* Smarty version 4.3.2, created on 2024-07-30 18:20:03
  from '/var/www/html/public/legacy/themes/suite8/tpls/_headerModuleList.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.2',
  'unifunc' => 'content_66a92ed306e6c7_22213834',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'ad88ee0181118f4b16d038af20c6d49b18f2261f' => 
    array (
      0 => '/var/www/html/public/legacy/themes/suite8/tpls/_headerModuleList.tpl',
      1 => 1709743133,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_66a92ed306e6c7_22213834 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_link.php','function'=>'smarty_function_sugar_link',),1=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_translate.php','function'=>'smarty_function_sugar_translate',),2=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/modifier.replace.php','function'=>'smarty_modifier_replace',),3=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.suite_check_access.php','function'=>'smarty_function_suite_check_access',),4=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.counter.php','function'=>'smarty_function_counter',),5=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.search_controller.php','function'=>'smarty_function_search_controller',),));
?>
<!--Start Responsive Top Navigation Menu -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="dropdown">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <ul class="dropdown-menu mobile_menu" role="menu" id="mobile_menu">
                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['groupTabs']->value, 'modules', false, 'group', 'groupList', array (
  'last' => true,
  'index' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['modules']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['group']->value => $_smarty_tpl->tpl_vars['modules']->value) {
$_smarty_tpl->tpl_vars['modules']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['index']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['total'];
?>
                    <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last'] : null)) {?>
                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'extraparams', 'extraparams', null);?>parentTab=<?php echo $_smarty_tpl->tpl_vars['group']->value;
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules']->value['modules'], 'module', false, 'modulekey');
$_smarty_tpl->tpl_vars['module']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['modulekey']->value => $_smarty_tpl->tpl_vars['module']->value) {
$_smarty_tpl->tpl_vars['module']->do_else = false;
?>
                            <li role="presentation" data-test="1">
                                <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'moduleTabId', 'moduleTabId', null);?>moduleTab_<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index'] : null);?>
_<?php echo $_smarty_tpl->tpl_vars['module']->value;
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                <a href="javascript:void(0)" onclick="window.location.href = '<?php echo smarty_function_sugar_link(array('id'=>$_smarty_tpl->tpl_vars['moduleTabId']->value,'module'=>$_smarty_tpl->tpl_vars['modulekey']->value,'link_only'=>1,'data'=>$_smarty_tpl->tpl_vars['module']->value,'extraparams'=>$_smarty_tpl->tpl_vars['extraparams']->value),$_smarty_tpl);?>
'">
                                    <?php echo $_smarty_tpl->tpl_vars['module']->value;?>

                                    <?php if ($_smarty_tpl->tpl_vars['modulekey']->value != 'Home' && $_smarty_tpl->tpl_vars['modulekey']->value != 'Calendar') {?>
                                        <span class="glyphicon glyphicon-plus"  onclick="window.location.href = 'index.php?action=EditView&module=<?php echo $_smarty_tpl->tpl_vars['modulekey']->value;?>
'"></span>
                                                                            <?php }?>
                                </a>
                            </li>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules']->value['extra'], 'submodulename', false, 'submodule');
$_smarty_tpl->tpl_vars['submodulename']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['submodule']->value => $_smarty_tpl->tpl_vars['submodulename']->value) {
$_smarty_tpl->tpl_vars['submodulename']->do_else = false;
?>
                            <li role="presentation" data-test="2">
                                <a href="javascript:void(0)" onclick="window.location.href = '<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['submodule']->value,'link_only'=>1,'extraparams'=>$_smarty_tpl->tpl_vars['extraparams']->value),$_smarty_tpl);?>
'">
                                    <?php echo $_smarty_tpl->tpl_vars['submodulename']->value;?>

                                    <span class="glyphicon glyphicon-plus"  onclick="window.location.href = 'index.php?action=EditView&module=<?php echo $_smarty_tpl->tpl_vars['submodule']->value;?>
'"></span>
                                                                    </a>
                            </li>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    <?php }?>
                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
            </ul>
            <div id="mobileheader" class="mobileheader">
                <div id="modulelinks" class="modulelinks">
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['moduleTopMenu']->value, 'module', false, 'name', 'moduleList', array (
  'index' => true,
));
$_smarty_tpl->tpl_vars['module']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['name']->value => $_smarty_tpl->tpl_vars['module']->value) {
$_smarty_tpl->tpl_vars['module']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index']++;
?>
                        <?php if ($_smarty_tpl->tpl_vars['name']->value == $_smarty_tpl->tpl_vars['MODULE_TAB']->value) {?>
                            <span class="modulename" data-toggle="dropdown" aria-expanded="false">
                                <?php echo smarty_function_sugar_link(array('id'=>"moduleTab_".((string)$_smarty_tpl->tpl_vars['name']->value),'module'=>$_smarty_tpl->tpl_vars['name']->value,'data'=>$_smarty_tpl->tpl_vars['module']->value,'caret'=>true),$_smarty_tpl);?>

                            </span>
                            <ul class="dropdown-menu" role="menu">
                                <?php if ($_smarty_tpl->tpl_vars['name']->value != 'Home') {?>
                                    <?php if (is_array($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) && count($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) > 0) {?>
                                        <li class="mobile-current-actions" role="presentation">
                                            <ul class="mobileCurrentTab">
                                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value], 'item');
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
?>
                                                    <?php if ($_smarty_tpl->tpl_vars['item']->value['URL'] == "-") {?>
                                                        <li class="mobile-action"><a></a><span>&nbsp;</span></li>
                                                    <?php } else { ?>
                                                        <li class="mobile-action"><a href="<?php echo $_smarty_tpl->tpl_vars['item']->value['URL'];?>
"><?php echo $_smarty_tpl->tpl_vars['item']->value['LABEL'];?>
</a></li>
                                                    <?php }?>
                                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                            </ul>
                                        </li>
                                    <?php } else { ?>
                                        <li class="mobile-action"><a><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_NO_SHORTCUT_MENU'];?>
</a></li>
                                    <?php }?>
                                <?php }?>

                                <?php if (is_array($_smarty_tpl->tpl_vars['recentRecords']->value) && count($_smarty_tpl->tpl_vars['recentRecords']->value) > 0) {?>
                                    <li class="recent-links-title" role="presentation">
                                        <a><strong><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_LAST_VIEWED'];?>
</strong></a>
                                    </li>
                                    <li role="presentation">
                                        <ul class="recent-list">
                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null) < 4) {?>                                                     <li class="recentlinks" role="presentation">
                                                        <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                                           accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                                           href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-detail">
                                                            <span class="suitepicon suitepicon-module-<?php echo smarty_modifier_replace(mb_strtolower((string) $_smarty_tpl->tpl_vars['item']->value['module_name'], 'UTF-8'),'_','-');?>
"></span>
                                                            <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                                        </a>
                                                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                                        <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                                            <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-edit"><span class=" glyphicon glyphicon-pencil"></a>
                                                        <?php }?>
                                                    </li>
                                                <?php }?>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </ul>
                                    </li>
                                <?php }?>

                                <?php if (is_array($_smarty_tpl->tpl_vars['favoriteRecords']->value) && count($_smarty_tpl->tpl_vars['favoriteRecords']->value) > 0) {?>
                                    <li class="favorite-links-title" role="presentation">
                                        <a><strong><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_FAVORITES'];?>
</strong></a>
                                    </li>
                                    <li>
                                        <ul class="favorite-list">
                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null) < 4) {?>                                                     <li class="favoritelinks" role="presentation">
                                                        <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                                           accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                                           href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
"  class="favorite-links-detail">
                                                            <span class="suitepicon suitepicon-module-<?php echo smarty_modifier_replace(mb_strtolower((string) $_smarty_tpl->tpl_vars['item']->value['module_name'], 'UTF-8'),'_','-');?>
"></span>
                                                            <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                                        </a>
                                                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                                        <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                                            <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-edit"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></a>
                                                        <?php }?>
                                                    </li>
                                                <?php }?>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </ul>
                                    </li>
                                <?php }?>
                            </ul>

                        <?php }?>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                </div>
            </div>
        </div>
        <div class="desktop-toolbar" id="toolbar">
            <?php if ($_smarty_tpl->tpl_vars['USE_GROUP_TABS']->value) {?>
                <ul class="nav navbar-nav">
                    <li class="navbar-brand-container">
                        <a class="navbar-brand with-home-icon suitepicon suitepicon-action-home" href="index.php?module=Home&action=index"></a>
                    </li>
                    <?php $_smarty_tpl->_assignInScope('groupSelected', false);?>
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['moduleTopMenu']->value, 'module', false, 'name', 'moduleList', array (
  'index' => true,
));
$_smarty_tpl->tpl_vars['module']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['name']->value => $_smarty_tpl->tpl_vars['module']->value) {
$_smarty_tpl->tpl_vars['module']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index']++;
?>
                        <?php if ($_smarty_tpl->tpl_vars['name']->value == $_smarty_tpl->tpl_vars['MODULE_TAB']->value) {?>
                            <?php if ($_smarty_tpl->tpl_vars['name']->value != 'Home') {?>
                                <li class="topnav">
                                    <span class="currentTabLeft">&nbsp;</span>
                                    <span class="currentTab"><?php echo smarty_function_sugar_link(array('id'=>"moduleTab_".((string)$_smarty_tpl->tpl_vars['name']->value),'module'=>$_smarty_tpl->tpl_vars['name']->value,'data'=>$_smarty_tpl->tpl_vars['module']->value),$_smarty_tpl);?>
</span>
                                    <span>&nbsp;</span>
                                                                        <?php $_smarty_tpl->_assignInScope('foundRecents', false);?>
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['name']->value) {?>
                                            <?php $_smarty_tpl->_assignInScope('foundRecents', true);?>
                                        <?php }?>
                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>


                                                                        <?php $_smarty_tpl->_assignInScope('foundFavorits', false);?>
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['name']->value) {?>
                                            <?php $_smarty_tpl->_assignInScope('foundFavorits', true);?>
                                        <?php }?>
                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                    <?php if ($_smarty_tpl->tpl_vars['foundRecents']->value || $_smarty_tpl->tpl_vars['foundFavorits']->value || (is_array($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) && count($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) > 0)) {?>

                                        <ul class="dropdown-menu" role="menu">
                                            <li class="current-module-action-links">
                                                <ul>
                                                    <?php if (is_array($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) && count($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) > 0) {?>
                                                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value], 'item');
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
?>
                                                            <?php if ($_smarty_tpl->tpl_vars['item']->value['URL'] == "-") {?>
                                                                                                                            <?php } else { ?>
                                                                <li><a href="<?php echo $_smarty_tpl->tpl_vars['item']->value['URL'];?>
"><span class="topnav-fake-icon"></span><span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['LABEL'];?>
</span></a></li>
                                                            <?php }?>
                                                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                                    <?php }?>
                                                </ul>
                                            </li>

                                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleRecentRecordsTotal",'assign'=>"submoduleRecentRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['name']->value && $_smarty_tpl->tpl_vars['submoduleRecentRecordsTotal']->value == 0) {?>
                                                    <li class="recent-links-title"><a><strong><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_LAST_VIEWED'];?>
</strong></a></li>
                                                    <?php echo smarty_function_counter(array('name'=>"submoduleRecentRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                                <?php }?>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                            <li class="current-module-recent-links">
                                                <ul>
                                                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleRecentRecords",'assign'=>"submoduleRecentRecords",'print'=>false),$_smarty_tpl);?>

                                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['name']->value && $_smarty_tpl->tpl_vars['submoduleRecentRecords']->value < 3) {?>
                                                            <li class="recentlinks" role="presentation">
                                                                <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                                                   accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                                                   href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-detail">

                                                                    <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                                                </a>
                                                                <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                                                <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                                                    <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-edit"><span class=" glyphicon glyphicon-pencil"></a>
                                                                <?php }?>
                                                            </li>
                                                            <?php echo smarty_function_counter(array('name'=>"submoduleRecentRecords",'print'=>false),$_smarty_tpl);?>

                                                        <?php }?>
                                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                                </ul>
                                            </li>





                                            <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleFavoriteRecordsTotal",'assign'=>"submoduleFavoriteRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['name']->value && $_smarty_tpl->tpl_vars['submoduleFavoriteRecordsTotal']->value == 0) {?>
                                                    <li class="favorite-links-title"><a><strong><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_FAVORITES'];?>
</strong></a></li>
                                                    <?php echo smarty_function_counter(array('name'=>"submoduleFavoriteRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                                <?php }?>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                            <li class="current-module-favorite-links">
                                                <ul>
                                                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleFavoriteRecords",'assign'=>"submoduleFavoriteRecords",'print'=>false),$_smarty_tpl);?>

                                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['name']->value && $_smarty_tpl->tpl_vars['submoduleFavoriteRecords']->value < 3) {?>
                                                            <li class="favoritelinks" role="presentation">
                                                                <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                                                   accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                                                   href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-detail">
                                                                    <span class="suitepicon suitepicon-module-<?php echo smarty_modifier_replace(mb_strtolower((string) $_smarty_tpl->tpl_vars['item']->value['module_name'], 'UTF-8'),'_','-');?>
"></span>
                                                                    <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                                                </a>
                                                                <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                                                <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                                                    <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-edit"><span class=" glyphicon glyphicon-pencil" aria-hidden="true"></a>
                                                                <?php }?>
                                                            </li>
                                                            <?php echo smarty_function_counter(array('name'=>"submoduleFavoriteRecords",'print'=>false),$_smarty_tpl);?>

                                                        <?php }?>
                                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                                </ul>
                                            </li>
                                        </ul>

                                    <?php }?>
                                </li>
                            <?php }?>

                        <?php }?>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['groupTabs']->value, 'modules', false, 'group', 'groupList', array (
  'last' => true,
  'index' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['modules']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['group']->value => $_smarty_tpl->tpl_vars['modules']->value) {
$_smarty_tpl->tpl_vars['modules']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['index']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['total'];
?>
                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'extraparams', 'extraparams', null);?>parentTab=<?php echo $_smarty_tpl->tpl_vars['group']->value;
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                        <li class="topnav <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last'] : null)) {?>all<?php }?>">
                            <span class="notCurrentTabLeft">&nbsp;</span><span class="notCurrentTab">
                            <a href="#" id="grouptab_<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['index'] : null);?>
" class="dropdown-toggle grouptab"><?php echo $_smarty_tpl->tpl_vars['group']->value;?>
</a>
                            <span class="notCurrentTabRight">&nbsp;</span>
                            <ul class="dropdown-menu" role="menu" <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last'] : null)) {?> class="All"<?php }?>>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules']->value['modules'], 'module', false, 'modulekey');
$_smarty_tpl->tpl_vars['module']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['modulekey']->value => $_smarty_tpl->tpl_vars['module']->value) {
$_smarty_tpl->tpl_vars['module']->do_else = false;
?>
                                    <li>
                                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'moduleTabId', 'moduleTabId', null);?>moduleTab_<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index'] : null);?>
_<?php echo $_smarty_tpl->tpl_vars['module']->value;
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                        <?php echo smarty_function_sugar_link(array('id'=>$_smarty_tpl->tpl_vars['moduleTabId']->value,'module'=>$_smarty_tpl->tpl_vars['modulekey']->value,'data'=>$_smarty_tpl->tpl_vars['module']->value,'extraparams'=>$_smarty_tpl->tpl_vars['extraparams']->value),$_smarty_tpl);?>

                                    </li>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules']->value['extra'], 'submodulename', false, 'submodule');
$_smarty_tpl->tpl_vars['submodulename']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['submodule']->value => $_smarty_tpl->tpl_vars['submodulename']->value) {
$_smarty_tpl->tpl_vars['submodulename']->do_else = false;
?>
                                    <li>
                                        <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['submodule']->value,'link_only'=>1,'extraparams'=>$_smarty_tpl->tpl_vars['extraparams']->value),$_smarty_tpl);?>
"><?php echo $_smarty_tpl->tpl_vars['submodulename']->value;?>
</a>
                                    </li>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </ul>
                        </li>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                </ul>
                            
                <?php echo '<script'; ?>
>
                    var windowResize = function() {
                        // Since the height can be changed in Sass.
                        // Take a measurement of the initial desktop navigation bar height with just one menu item
                        $('.desktop-toolbar ul.navbar-nav > li').not('.all').addClass('hidden');
                        var dth = $('.desktop-toolbar').outerHeight();

                        // Show all desktop menu items
                        $('.desktop-toolbar ul.navbar-nav > li.hidden').removeClass('hidden');

                        // Remove the each menu item from the end of the toolbar until
                        // the navigation bar is the matches the initial height.
                        while($('.desktop-toolbar').outerHeight() > dth) {
                            ti = $('.desktop-toolbar ul.navbar-nav > li').not('.hidden').not('.all');
                            $(ti).last().addClass('hidden');
                        }
                    };
                    $(window).resize(windowResize);
                    $(document).ready(windowResize);
                <?php echo '</script'; ?>
>
            
            <?php } else { ?>

                <ul class="nav navbar-nav navbar-horizontal-fluid">
                    <li class="navbar-brand-container">
                        <a class="navbar-brand with-home-icon" href="index.php?module=Home&action=index">
                            <span class="suitepicon suitepicon-action-home"></span>
                        </a>
                    </li>
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['groupTabs']->value, 'modules', false, 'group', 'groupList', array (
  'last' => true,
  'index' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['modules']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['group']->value => $_smarty_tpl->tpl_vars['modules']->value) {
$_smarty_tpl->tpl_vars['modules']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['index']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_groupList']->value['total'];
?>
                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'extraparams', 'extraparams', null);?>parentTab=<?php echo $_smarty_tpl->tpl_vars['group']->value;
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

                    <!--nav items with actions -->
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules']->value['modules'], 'submodulename', false, 'submodule');
$_smarty_tpl->tpl_vars['submodulename']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['submodule']->value => $_smarty_tpl->tpl_vars['submodulename']->value) {
$_smarty_tpl->tpl_vars['submodulename']->do_else = false;
?>
                        <?php if ($_smarty_tpl->tpl_vars['submodule']->value != "Home") {?>
                            <li class="topnav with-actions">
                                <span class="notCurrentTabLeft">&nbsp;</span>
                                <span class="dropdown-toggle headerlinks notCurrentTab"> <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['submodule']->value,'link_only'=>1,'extraparams'=>$_smarty_tpl->tpl_vars['extraparams']->value),$_smarty_tpl);?>
"><?php echo $_smarty_tpl->tpl_vars['submodulename']->value;?>
</a> </span>
                                <span class="notCurrentTabRight">&nbsp;</span>
                                <ul class="dropdown-menu" role="menu">
                                    <li>
                                        <ul>
                                            <?php if (is_array($_smarty_tpl->tpl_vars['shortcutTopMenu']->value) && count($_smarty_tpl->tpl_vars['shortcutTopMenu']->value) > 0) {?>
                                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['submodule']->value], 'item');
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
?>
                                                    <?php if ($_smarty_tpl->tpl_vars['item']->value['URL'] == "-") {?>
                                                                                                            <?php } else { ?>
                                                        <li><a href="<?php echo $_smarty_tpl->tpl_vars['item']->value['URL'];?>
"><span class="topnav-fake-icon"></span><span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['LABEL'];?>
</span></a></li>
                                                    <?php }?>
                                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                            <?php }?>
                                        </ul>
                                    </li>
                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleRecentRecordsTotal",'assign'=>"submoduleRecentRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['submodule']->value && $_smarty_tpl->tpl_vars['submoduleRecentRecordsTotal']->value == 0) {?>
                                            <li class="recent-links-title"><a><strong><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_LAST_VIEWED'];?>
</strong></a></li>
                                            <?php echo smarty_function_counter(array('name'=>"submoduleRecentRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                        <?php }?>
                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                    <li>
                                        <ul>
                                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleRecentRecords",'assign'=>"submoduleRecentRecords",'print'=>false),$_smarty_tpl);?>

                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['submodule']->value && $_smarty_tpl->tpl_vars['submoduleRecentRecords']->value < 3) {?>
                                                    <li class="recentlinks" role="presentation">
                                                        <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                                           accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                                           href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-detail">
                                                            <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                                        </a>
                                                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                                        <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                                            <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-edit"><span class=" glyphicon glyphicon-pencil"></a>
                                                        <?php }?>
                                                    </li>
                                                    <?php echo smarty_function_counter(array('name'=>"submoduleRecentRecords",'print'=>false),$_smarty_tpl);?>

                                                <?php }?>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </ul>
                                    </li>
                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleFavoriteRecordsTotal",'assign'=>"submoduleFavoriteRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['submodule']->value && $_smarty_tpl->tpl_vars['submoduleFavoriteRecordsTotal']->value == 0) {?>
                                            <li class="favorite-links-title"><a><strong><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_FAVORITES'];?>
</strong></a></li>
                                            <?php echo smarty_function_counter(array('name'=>"submoduleFavoriteRecordsTotal",'print'=>false),$_smarty_tpl);?>

                                        <?php }?>
                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                    <li>
                                        <ul>
                                                                                        <?php echo smarty_function_counter(array('start'=>0,'name'=>"submoduleFavoriteRecords",'assign'=>"submoduleFavoriteRecords",'print'=>false),$_smarty_tpl);?>

                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                                                <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] == $_smarty_tpl->tpl_vars['submodule']->value && $_smarty_tpl->tpl_vars['submoduleFavoriteRecords']->value < 3) {?>
                                                    <li class="favoritelinks" role="presentation">
                                                        <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                                           accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                                           href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-detail">
                                                            <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                                        </a>
                                                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                                        <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                                            <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-edit"><span class=" glyphicon glyphicon-pencil" aria-hidden="true"></a>
                                                        <?php }?>
                                                    </li>
                                                    <?php echo smarty_function_counter(array('name'=>"submoduleFavoriteRecords",'print'=>false),$_smarty_tpl);?>

                                                <?php }?>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                        <?php }?>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    <?php if (count($_smarty_tpl->tpl_vars['moduleExtraMenu']->value) > 0) {?>
                        <li class="topnav overflow-toggle-menu">
                            <span class="notCurrentTabLeft">&nbsp;</span>
                            <span class="dropdown-toggle headerlinks notCurrentTab"><a href="#"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_MORE'];?>
</a></span>
                            <span class="notCurrentTabRight">&nbsp;</span>
                            <ul id="overflow-menu" class="dropdown-menu" role="menu">
                                <!--nav items without actions -->
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules']->value['extra'], 'submodulename', false, 'submodule');
$_smarty_tpl->tpl_vars['submodulename']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['submodule']->value => $_smarty_tpl->tpl_vars['submodulename']->value) {
$_smarty_tpl->tpl_vars['submodulename']->do_else = false;
?>
                                    <li class="topnav without-actions">
                                        <span class=" notCurrentTab"> <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['submodule']->value,'link_only'=>1,'extraparams'=>$_smarty_tpl->tpl_vars['extraparams']->value),$_smarty_tpl);?>
"><?php echo $_smarty_tpl->tpl_vars['submodulename']->value;?>
</a> </span>
                                    </li>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </ul>
                        </li>
                    <?php }?>
                </ul>
                <div class="hidden hidden-actions"></div>
                            
                <?php echo '<script'; ?>
>
                    var windowResize = function() {
                        // reset navbar
                        var $navCollapsedItems = $('ul#overflow-menu > li.with-actions');
                        if(typeof $navCollapsedItems !== "undefined") {
                            $($navCollapsedItems).each(function() {
                                $(this).addClass('topnav');
                                $(this).insertBefore('.overflow-toggle-menu');
                            });
                        }



                        var $navItemMore = $('.navbar-horizontal-fluid > li.overflow-toggle-menu'),
                            $navItems = $('.navbar-horizontal-fluid > li.with-actions'),
                            navItemMoreWidth = navItemWidth = $navItemMore.width(),
                            windowWidth = $(window).width() - ($(window).width()  * 0.55),
                            navItemMoreLeft, offset, navOverflowWidth;

                        $navItems.each(function() {
                            navItemWidth += $(this).width();
                        });

                        // Remove nav items that are cause the right hand nav-bar items to wrap
                        while (navItemWidth > windowWidth) {
                            navItemWidth -= $navItems.last().width();
                            $navItems.last().removeClass('topnav');
                            $navItems.last().prependTo('#overflow-menu');
                            $navItems.splice(-1,1);
                        }
                        if(typeof $navItemMoreLeft !== "undefined") {
                            navItemMoreLeft = $('.navbar-horizontal-fluid .overflow-toggle-menu').offset().left;
                            navOverflowWidth = $('#overflow-menu').width();
                            offset = navItemMoreLeft + navItemMoreWidth - navOverflowWidth;
                        }
                    };
                    $(window).resize(windowResize);
                    windowResize();
                <?php echo '</script'; ?>
>
            

            <?php }?>
        </div>

        <!-- Right side of the main navigation -->
        <div class="mobile-bar">
            <ul id="toolbar" class="toolbar">
                <li id="quickcreatetop" class="create dropdown nav navbar-nav quickcreatetop">
                    <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CREATE_BUTTON_LABEL'];?>
<span class="suitepicon suitepicon-action-caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="index.php?module=Accounts&action=EditView&return_module=Accounts&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Accounts",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Contacts&action=EditView&return_module=Contacts&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Contacts",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Opportunities&action=EditView&return_module=Opportunities&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Opportunities",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Leads&action=EditView&return_module=Leads&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Leads",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Documents&action=EditView&return_module=Documents&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Documents",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Calls",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Tasks",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                    </ul>
                </li>
                <li id="" class="dropdown nav navbar-nav navbar-search">
                    <button id="searchbutton" class="dropdown-toggle btn btn-default searchbutton suitepicon suitepicon-action-search" data-toggle="dropdown" aria-expanded="true">
                    </button>
                    <div class="dropdown-menu" role="menu" aria-labelledby="searchbutton">
                        <form id="searchformdropdown" class="searchformdropdown" name='UnifiedSearch' action='index.php'
                              onsubmit='return SUGAR.unifiedSearchAdvanced.checkUsaAdvanced()'>
                            <?php echo smarty_function_search_controller(array(),$_smarty_tpl);?>

                            <input type="hidden" class="form-control" name="module" value="Home">
                            <input type="hidden" class="form-control" name="search_form" value="false">
                            <input type="hidden" class="form-control" name="advanced" value="false">
                            <div class="input-group">
                                <input type="text" class="form-control query_string" name="query_string" id="query_string"
                                       placeholder="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH_BUTTON_TITLE'];?>
..." value="<?php echo $_smarty_tpl->tpl_vars['SEARCH']->value;?>
"/>
                                <span class="input-group-btn">
                                <button type="submit" class="btn btn-default suitepicon suitepicon-action-search"></button>
                            </span>
                            </div>
                        </form>
                    </div>
                </li>
                <li id="desktop_notifications" class="dropdown nav navbar-nav desktop_notifications">
                    <button class="alertsButton btn dropdown-toggle suitepicon suitepicon-action-alerts" data-toggle="dropdown"
                            aria-expanded="false">
                        <span class="alert_count hidden">0</span>
                    </button>
                    <div id="alerts" class="dropdown-menu" role="menu"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_EMAIL_ERROR_VIEW_RAW_SOURCE'];?>
</div>
                </li>
                <li>
                    <form id="searchform" class="navbar-form searchform" name='UnifiedSearch' action='index.php'
                          onsubmit='return SUGAR.unifiedSearchAdvanced.checkUsaAdvanced()'>
                        <?php echo smarty_function_search_controller(array(),$_smarty_tpl);?>

                        <input type="hidden" class="form-control" name="module" value="Home">
                        <input type="hidden" class="form-control" name="search_form" value="false">
                        <input type="hidden" class="form-control" name="advanced" value="false">
                        <div class="input-group">
                            <input type="text" class="form-control query_string " name="query_string" id="query_string"
                                   placeholder="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH'];?>
..." value="<?php echo $_smarty_tpl->tpl_vars['SEARCH']->value;?>
"/>
                            <span class="input-group-btn">
                        <button type="submit" class="btn btn-default suitepicon suitepicon-action-search"></button>
                    </span>
                        </div>
                    </form>
                </li>
                <li id="globalLinks" class="dropdown nav navbar-nav globalLinks-mobile">

                    <button id="usermenucollapsed" class="dropdown-toggle btn btn-default usermenucollapsed" data-toggle="dropdown" aria-expanded="true">
                        <span class="suitepicon suitepicon-action-user-small"></span>
                    </button>
                    <ul class="dropdown-menu user-dropdown user-menu" role="menu" aria-labelledby="dropdownMenu2">
                        <li role="presentation">
                            <a href='index.php?module=Users&action=EditView&record=<?php echo $_smarty_tpl->tpl_vars['CURRENT_USER_ID']->value;?>
'>
                                <?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_PROFILE'];?>

                            </a>
                        </li>
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['GCLS']->value, 'GCL', false, 'gcl_key', 'gcl', array (
));
$_smarty_tpl->tpl_vars['GCL']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['gcl_key']->value => $_smarty_tpl->tpl_vars['GCL']->value) {
$_smarty_tpl->tpl_vars['GCL']->do_else = false;
?>
                            <li role="presentation">
                                <a id="<?php echo $_smarty_tpl->tpl_vars['gcl_key']->value;?>
_link"
                                   href="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['URL'];?>
"
                                        <?php if (!empty($_smarty_tpl->tpl_vars['GCL']->value['ONCLICK'])) {?>
                                            onclick="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['ONCLICK'];?>
"
                                        <?php }?>
                                        <?php if (!empty($_smarty_tpl->tpl_vars['GCL']->value['TARGET'])) {?>
                                            target="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['TARGET'];?>
"
                                        <?php }?>
                                ><?php echo $_smarty_tpl->tpl_vars['GCL']->value['LABEL'];?>
</a>
                            </li>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        <li role="presentation"><a role="menuitem" id="logout_link" href='<?php echo $_smarty_tpl->tpl_vars['LOGOUT_LINK']->value;?>
'
                                                   class='utilsLink'><?php echo $_smarty_tpl->tpl_vars['LOGOUT_LABEL']->value;?>
</a></li>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="tablet-bar">
            <ul id="toolbar" class="toolbar">
                <li id="quickcreatetop" class="create dropdown nav navbar-nav quickcreatetop">
                    <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CREATE_BUTTON_LABEL'];?>
<span class="suitepicon suitepicon-action-caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="index.php?module=Accounts&action=EditView&return_module=Accounts&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Accounts",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Contacts&action=EditView&return_module=Contacts&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Contacts",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Opportunities&action=EditView&return_module=Opportunities&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Opportunities",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Leads&action=EditView&return_module=Leads&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Leads",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Documents&action=EditView&return_module=Documents&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Documents",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Calls",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Tasks",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                    </ul>
                </li>
                <li id="" class="dropdown nav navbar-nav navbar-search">
                    <button id="searchbutton" class="dropdown-toggle btn btn-default searchbutton suitepicon suitepicon-action-search" data-toggle="dropdown" aria-expanded="true">
                    </button>
                    <div class="dropdown-menu" role="menu" aria-labelledby="searchbutton">
                        <form id="searchformdropdown" class="searchformdropdown" name='UnifiedSearch' action='index.php'
                              onsubmit='return SUGAR.unifiedSearchAdvanced.checkUsaAdvanced()'>
                            <?php echo smarty_function_search_controller(array(),$_smarty_tpl);?>

                            <input type="hidden" class="form-control" name="module" value="Home">
                            <input type="hidden" class="form-control" name="search_form" value="false">
                            <input type="hidden" class="form-control" name="advanced" value="false">
                            <div class="input-group">
                                <input type="text" class="form-control query_string" name="query_string" id="query_string"
                                       placeholder="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH'];?>
..." value="<?php echo $_smarty_tpl->tpl_vars['SEARCH']->value;?>
"/>
                                <span class="input-group-btn">
                                <button type="submit" class="btn btn-default suitepicon suitepicon-action-search"></button>
                            </span>
                            </div>
                        </form>
                    </div>
                </li>
                <li>
                    <form id="searchform" class="navbar-form searchform" name='UnifiedSearch' action='index.php'
                          onsubmit='return SUGAR.unifiedSearchAdvanced.checkUsaAdvanced()'>
                        <?php echo smarty_function_search_controller(array(),$_smarty_tpl);?>

                        <input type="hidden" class="form-control" name="module" value="Home">
                        <input type="hidden" class="form-control" name="search_form" value="false">
                        <input type="hidden" class="form-control" name="advanced" value="false">
                        <div class="input-group">
                            <input type="text" class="form-control query_string" name="query_string" id="query_string"
                                   placeholder="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH'];?>
..." value="<?php echo $_smarty_tpl->tpl_vars['SEARCH']->value;?>
"/>
                            <span class="input-group-btn">
                        <button type="submit" class="btn btn-default suitepicon suitepicon-action-search"></button>
                    </span>
                        </div>
                    </form>
                </li>
                <li id="desktop_notifications" class="dropdown nav navbar-nav desktop_notifications">
                    <button class="alertsButton btn dropdown-toggle suitepicon suitepicon-action-alerts" data-toggle="dropdown"
                            aria-expanded="false">
                        <span class="alert_count hidden">0</span>
                    </button>
                    <div id="alerts" class="dropdown-menu" role="menu"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_EMAIL_ERROR_VIEW_RAW_SOURCE'];?>
</div>
                </li>
                <li id="globalLinks" class="dropdown nav navbar-nav globalLinks-mobile">

                    <button id="usermenucollapsed" class="dropdown-toggle btn btn-default usermenucollapsed" data-toggle="dropdown"
                            aria-expanded="true">
                        <span class="suitepicon suitepicon-action-current-user"></span>
                    </button>
                    <ul class="dropdown-menu user-dropdown user-menu" role="menu" aria-labelledby="dropdownMenu2">
                        <li role="presentation">
                            <a href='index.php?module=Users&action=EditView&record=<?php echo $_smarty_tpl->tpl_vars['CURRENT_USER_ID']->value;?>
'>
                                <?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_PROFILE'];?>

                            </a>
                        </li>
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['GCLS']->value, 'GCL', false, 'gcl_key', 'gcl', array (
));
$_smarty_tpl->tpl_vars['GCL']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['gcl_key']->value => $_smarty_tpl->tpl_vars['GCL']->value) {
$_smarty_tpl->tpl_vars['GCL']->do_else = false;
?>
                            <li role="presentation">
                                <a id="<?php echo $_smarty_tpl->tpl_vars['gcl_key']->value;?>
_link"
                                   href="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['URL'];?>
"
                                        <?php if (!empty($_smarty_tpl->tpl_vars['GCL']->value['ONCLICK'])) {?>
                                            onclick="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['ONCLICK'];?>
"
                                        <?php }?>
                                        <?php if (!empty($_smarty_tpl->tpl_vars['GCL']->value['TARGET'])) {?>
                                            target="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['TARGET'];?>
"
                                        <?php }?>
                                ><?php echo $_smarty_tpl->tpl_vars['GCL']->value['LABEL'];?>
</a>
                            </li>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        <li role="presentation"><a role="menuitem" id="logout_link" href='<?php echo $_smarty_tpl->tpl_vars['LOGOUT_LINK']->value;?>
'
                                                   class='utilsLink'><?php echo $_smarty_tpl->tpl_vars['LOGOUT_LABEL']->value;?>
</a></li>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="desktop-bar">
            <ul id="toolbar" class="toolbar">
                <li id="quickcreatetop" class="create dropdown nav navbar-nav quickcreatetop">
                    <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CREATE_BUTTON_LABEL'];?>
<span class="suitepicon suitepicon-action-caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="index.php?module=Accounts&action=EditView&return_module=Accounts&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Accounts",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Contacts&action=EditView&return_module=Contacts&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Contacts",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Opportunities&action=EditView&return_module=Opportunities&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Opportunities",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Leads&action=EditView&return_module=Leads&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Leads",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Documents&action=EditView&return_module=Documents&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Documents",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Calls",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                        <li><a href="index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_QUICK_CREATE'];
echo smarty_function_sugar_translate(array('module'=>"Tasks",'label'=>"LBL_MODULE_NAME"),$_smarty_tpl);?>
</a></li>
                    </ul>
                </li>
                <li id="" class="dropdown nav navbar-nav navbar-search">
                    <button id="searchbutton" class="dropdown-toggle btn btn-default searchbutton suitepicon suitepicon-action-search" data-toggle="dropdown" aria-expanded="true">
                    </button>
                    <div class="dropdown-menu" role="menu" aria-labelledby="searchbutton">
                        <form id="searchformdropdown" class="searchformdropdown" name='UnifiedSearch' action='index.php'
                              onsubmit='return SUGAR.unifiedSearchAdvanced.checkUsaAdvanced()'>
                            <?php echo smarty_function_search_controller(array(),$_smarty_tpl);?>

                            <input type="hidden" class="form-control" name="module" value="Home">
                            <input type="hidden" class="form-control" name="search_form" value="false">
                            <input type="hidden" class="form-control" name="advanced" value="false">
                            <div class="input-group">
                                <input type="text" class="form-control query_string" name="query_string" id="query_string"
                                       placeholder="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH'];?>
..." value="<?php echo $_smarty_tpl->tpl_vars['SEARCH']->value;?>
"/>
                                <span class="input-group-btn">
                                <button type="submit" class="btn btn-default suitepicon suitepicon-action-search"></button>
                            </span>
                            </div>
                        </form>
                    </div>
                </li>
                <li>
                    <form id="searchform" class="navbar-form searchform" name='UnifiedSearch' action='index.php'
                          onsubmit='return SUGAR.unifiedSearchAdvanced.checkUsaAdvanced()'>
                        <?php echo smarty_function_search_controller(array(),$_smarty_tpl);?>

                        <input type="hidden" class="form-control" name="module" value="Home">
                        <input type="hidden" class="form-control" name="search_form" value="false">
                        <input type="hidden" class="form-control" name="advanced" value="false">
                        <div class="input-group">
                            <input type="text" class="form-control query_string" name="query_string" id="query_string"
                                   placeholder="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH'];?>
..." value="<?php echo $_smarty_tpl->tpl_vars['SEARCH']->value;?>
"/>
                            <span class="input-group-btn">
                        <button type="submit" class="btn btn-default suitepicon suitepicon-action-search"></button>
                    </span>
                        </div>
                    </form>
                </li>
                <li id="desktop_notifications" class="dropdown nav navbar-nav desktop_notifications">
                    <button class="alertsButton btn dropdown-toggle suitepicon suitepicon-action-alerts" data-toggle="dropdown"
                            aria-expanded="false">
                        <span class="alert_count hidden">0</span>
                    </button>
                    <div id="alerts" class="dropdown-menu" role="menu"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_EMAIL_ERROR_VIEW_RAW_SOURCE'];?>
</div>
                </li>
                <li id="globalLinks" class="dropdown nav navbar-nav globalLinks-desktop">
                    <button id="with-label" class="dropdown-toggle user-menu-button" title="<?php echo $_smarty_tpl->tpl_vars['CURRENT_USER']->value;?>
"data-toggle="dropdown" aria-expanded="true">
                        <span class="suitepicon suitepicon-action-current-user"></span>
                        <span class="globallabel-user"><?php echo $_smarty_tpl->tpl_vars['CURRENT_USER']->value;?>
</span>
                        <span class="suitepicon suitepicon-action-caret"></span>
                    </button>
                    <ul class="dropdown-menu user-dropdown user-menu" role="menu" aria-labelledby="with-label">
                        <li role="presentation">
                            <a href='index.php?module=Users&action=EditView&record=<?php echo $_smarty_tpl->tpl_vars['CURRENT_USER_ID']->value;?>
'>
                                <?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_PROFILE'];?>

                            </a>
                        </li>
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['GCLS']->value, 'GCL', false, 'gcl_key', 'gcl', array (
));
$_smarty_tpl->tpl_vars['GCL']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['gcl_key']->value => $_smarty_tpl->tpl_vars['GCL']->value) {
$_smarty_tpl->tpl_vars['GCL']->do_else = false;
?>
                            <li role="presentation">
                                <a id="<?php echo $_smarty_tpl->tpl_vars['gcl_key']->value;?>
_link"
                                   href="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['URL'];?>
"
                                        <?php if (!empty($_smarty_tpl->tpl_vars['GCL']->value['ONCLICK'])) {?>
                                            onclick="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['ONCLICK'];?>
"
                                        <?php }?>
                                        <?php if (!empty($_smarty_tpl->tpl_vars['GCL']->value['TARGET'])) {?>
                                            target="<?php echo $_smarty_tpl->tpl_vars['GCL']->value['TARGET'];?>
"
                                        <?php }?>
                                ><?php echo $_smarty_tpl->tpl_vars['GCL']->value['LABEL'];?>
</a>
                            </li>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        <li role="presentation"><a role="menuitem" id="logout_link" href='<?php echo $_smarty_tpl->tpl_vars['LOGOUT_LINK']->value;?>
'
                                                   class='utilsLink'><?php echo $_smarty_tpl->tpl_vars['LOGOUT_LABEL']->value;?>
</a></li>
                    </ul>
                </li>
            </ul>

        </div>
</nav>
<!--End Responsive Top Navigation Menu -->
<?php if ($_smarty_tpl->tpl_vars['THEME_CONFIG']->value['display_sidebar']) {?>
    <!--Start Page Container and Responsive Sidebar -->
    <div id='sidebar_container' class="container-fluid sidebar_container">

        <a id="buttontoggle" class="buttontoggle"><span></span></a>

        <div <?php if ((isset($_COOKIE['sidebartoggle'])) && $_COOKIE['sidebartoggle'] == 'collapsed') {?>style="display:none"<?php }?>
             class="sidebar">

            <div id="actionMenuSidebar" class="actionMenuSidebar">
                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['moduleTopMenu']->value, 'module', false, 'name', 'moduleList', array (
  'index' => true,
));
$_smarty_tpl->tpl_vars['module']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['name']->value => $_smarty_tpl->tpl_vars['module']->value) {
$_smarty_tpl->tpl_vars['module']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_moduleList']->value['index']++;
?>
                    <?php if ($_smarty_tpl->tpl_vars['name']->value == $_smarty_tpl->tpl_vars['MODULE_TAB']->value) {?>
                        <ul>
                            <?php if ((isset($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value])) && is_array($_smarty_tpl->tpl_vars['shortcutTopMenu']->value) && count($_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value]) > 0) {?>
                                <h2 class="recent_h3"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_LINK_ACTIONS'];?>
</h2>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['shortcutTopMenu']->value[$_smarty_tpl->tpl_vars['name']->value], 'item');
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
?>
                                    <?php if ($_smarty_tpl->tpl_vars['item']->value['URL'] == "-") {?>
                                        <li><a></a><span>&nbsp;</span></li>
                                    <?php } else { ?>
                                        <li class="actionmenulinks" role="presentation">
                                            <a href="<?php echo $_smarty_tpl->tpl_vars['item']->value['URL'];?>
" data-action-name="<?php echo $_smarty_tpl->tpl_vars['item']->value['MODULE_NAME'];?>
">
                                                <div class="side-bar-action-icon">
                                                    <span class="suitepicon suitepicon-action-<?php echo smarty_modifier_replace(mb_strtolower((string) $_smarty_tpl->tpl_vars['item']->value['MODULE_NAME'], 'UTF-8'),'_','-');?>
"></span>
                                                </div>
                                                <div class="actionmenulink"><?php echo $_smarty_tpl->tpl_vars['item']->value['LABEL'];?>
</div>
                                            </a>
                                        </li>
                                    <?php }?>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            <?php }?>
                        </ul>
                    <?php }?>
                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
            </div>

            <div id="recentlyViewedSidebar" class="recentlyViewedSidebar">
                <?php if (is_array($_smarty_tpl->tpl_vars['recentRecords']->value) && count($_smarty_tpl->tpl_vars['recentRecords']->value) > 0) {?>
                    <h2 class="recent_h3"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_LAST_VIEWED'];?>
</h2>
                <?php }?>
                <ul class="nav nav-pills nav-stacked">
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['recentRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                        <?php if ($_smarty_tpl->tpl_vars['item']->value['module_name'] != 'Emails' && $_smarty_tpl->tpl_vars['item']->value['module_name'] != 'InboundEmail' && $_smarty_tpl->tpl_vars['item']->value['module_name'] != 'EmailAddresses') {?><!--Check to ensure that recently viewed emails or email addresses are not displayed in the recently viewed panel.-->
                            <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index'] : null) < 5) {?>
                                <div class="recently_viewed_link_container_sidebar">
                                    <li class="recentlinks" role="presentation">
                                        <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
"
                                           accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
"
                                           href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
"
                                           class="recent-links-detail">
                                            <span class="suitepicon suitepicon-module-<?php echo smarty_modifier_replace(mb_strtolower((string) $_smarty_tpl->tpl_vars['item']->value['module_name'], 'UTF-8'),'_','-');?>
"></span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                        </a>
                                        <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                        <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                            <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['item_id'],'link_only'=>1),$_smarty_tpl);?>
" class="recent-links-edit"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                                        <?php }?>
                                    </li>
                                </div>
                            <?php }?>
                        <?php }?>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                </ul>
            </div>
            <div id="favoritesSidebar" class="favoritesSidebar">
                <?php if (is_array($_smarty_tpl->tpl_vars['favoriteRecords']->value) && count($_smarty_tpl->tpl_vars['favoriteRecords']->value) > 0) {?>
                    <h2 class="recent_h3"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_FAVORITES'];?>
</h2>
                <?php }?>
                <ul class="nav nav-pills nav-stacked">
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['favoriteRecords']->value, 'item', false, NULL, 'lastViewed', array (
  'iteration' => true,
  'index' => true,
));
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']++;
?>
                        <?php if ((isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['index'] : null) < 5) {?>
                            <div class="recently_viewed_link_container_sidebar">
                                <li class="recentlinks" role="presentation">
                                    <a title="<?php echo smarty_function_sugar_translate(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'label'=>'LBL_MODULE_NAME'),$_smarty_tpl);?>
" accessKey="<?php echo (isset($_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_lastViewed']->value['iteration'] : null);?>
" href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'DetailView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-detail">
                                        <span class="suitepicon suitepicon-module-<?php echo smarty_modifier_replace(mb_strtolower((string) $_smarty_tpl->tpl_vars['item']->value['module_name'], 'UTF-8'),'_','-');?>
"></span>
                                        <span aria-hidden="true"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_summary_short'];?>
</span>
                                    </a>
                                    <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'default', 'access', null);
echo smarty_function_suite_check_access(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'edit','record'=>$_smarty_tpl->tpl_vars['item']->value['id']),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
                                    <?php if ($_smarty_tpl->tpl_vars['access']->value) {?>
                                        <a href="<?php echo smarty_function_sugar_link(array('module'=>$_smarty_tpl->tpl_vars['item']->value['module_name'],'action'=>'EditView','record'=>$_smarty_tpl->tpl_vars['item']->value['id'],'link_only'=>1),$_smarty_tpl);?>
" class="favorite-links-edit"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                                    <?php }?>
                                </li>
                            </div>
                        <?php }?>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                </ul>
            </div>
        </div>
        <!--</div>-->
    </div>
    <!--End Responsive Sidebar -->
<?php }?>
<!--Start Page content -->
<?php }
}
