<?php
/* Smarty version 4.3.2, created on 2024-04-08 16:46:36
  from '/var/www/html/public/legacy/themes/suite8/include/MySugar/tpls/MySugar.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.2',
  'unifunc' => 'content_66141f6c323381_77045638',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'ce06ef8a1184e630440ff55f1654b9ab3e5bb610' => 
    array (
      0 => '/var/www/html/public/legacy/themes/suite8/include/MySugar/tpls/MySugar.tpl',
      1 => 1709743133,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:themes/suite8/include/MySugar/tpls/actions_menu.tpl' => 1,
  ),
),false)) {
function content_66141f6c323381_77045638 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_getscript.php','function'=>'smarty_function_sugar_getscript',),1=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.counter.php','function'=>'smarty_function_counter',),2=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_getjspath.php','function'=>'smarty_function_sugar_getjspath',),));
?>

    <style>
        .menu {
            z-index: 100;
        }

        .subDmenu {
            z-index: 100;
        }

        div.moduleTitle {
            height: 10px;
        }
    </style>




<?php echo smarty_function_sugar_getscript(array('file'=>"cache/include/javascript/sugar_grp_yui_widgets.js"),$_smarty_tpl);?>

<?php echo smarty_function_sugar_getscript(array('file'=>'include/javascript/dashlets.js'),$_smarty_tpl);?>


<?php echo $_smarty_tpl->tpl_vars['chartResources']->value;?>

<?php echo $_smarty_tpl->tpl_vars['mySugarChartResources']->value;?>

<div class="dashboard" id="dashboard">
        <ul class="nav nav-tabs nav-dashboard">

        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dashboardPages']->value, 'tab', false, 'tabNum');
$_smarty_tpl->tpl_vars['tab']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['tabNum']->value => $_smarty_tpl->tpl_vars['tab']->value) {
$_smarty_tpl->tpl_vars['tab']->do_else = false;
?>
            <?php if ($_smarty_tpl->tpl_vars['tabNum']->value == 0) {?>
                <li role="presentation" class="active">
                    <a id="tab<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
" href="#tab_content_<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
" data-toggle="tab" <?php if (!$_smarty_tpl->tpl_vars['lock_homepage']->value) {?>ondblclick="renameTab(<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
)"<?php }?> onClick="retrievePage(<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
);" class="hidden-xs">
                        <?php echo $_smarty_tpl->tpl_vars['dashboardPages']->value[$_smarty_tpl->tpl_vars['tabNum']->value]['pageTitle'];?>

                    </a>

                    <a id="xstab<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
" href="#" class="visible-xs first-tab-xs dropdown-toggle" data-toggle="dropdown">
                        <?php echo $_smarty_tpl->tpl_vars['dashboardPages']->value[$_smarty_tpl->tpl_vars['tabNum']->value]['pageTitle'];?>

                        <span class="suitepicon suitepicon-action-caret"></span>
                    </a>
                    <ul id="first-tab-menu-xs" class="dropdown-menu">
                        <?php echo smarty_function_counter(array('name'=>"tabCountXS",'start'=>-1,'print'=>false,'assign'=>"tabCountXS"),$_smarty_tpl);?>

                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dashboardPages']->value, 'xstab', false, 'ta');
$_smarty_tpl->tpl_vars['xstab']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['ta']->value => $_smarty_tpl->tpl_vars['xstab']->value) {
$_smarty_tpl->tpl_vars['xstab']->do_else = false;
?>
                            <?php echo smarty_function_counter(array('name'=>"tabCountXS",'print'=>false),$_smarty_tpl);?>

                            <li role="presentation">
                                <a id="tabxs<?php echo $_smarty_tpl->tpl_vars['tabCountXS']->value;?>
" href="#tab_content_<?php echo $_smarty_tpl->tpl_vars['tabCountXS']->value;?>
" data-toggle="tab"  onClick="retrievePage(<?php echo $_smarty_tpl->tpl_vars['tabCountXS']->value;?>
);">
                                    <?php echo $_smarty_tpl->tpl_vars['dashboardPages']->value[$_smarty_tpl->tpl_vars['tabCountXS']->value]['pageTitle'];?>

                                </a>
                            </li>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    </ul>
                </li>
            <?php } else { ?>
                <li role="presentation">
                    <a id="tab<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
" href="#tab_content_<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
"  data-toggle="tab"  <?php if (!$_smarty_tpl->tpl_vars['lock_homepage']->value) {?>ondblclick="renameTab(<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
)"<?php }?> onClick="retrievePage(<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
);" class="hidden-xs">
                        <?php echo $_smarty_tpl->tpl_vars['dashboardPages']->value[$_smarty_tpl->tpl_vars['tabNum']->value]['pageTitle'];?>

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

        <?php if (!$_smarty_tpl->tpl_vars['lock_homepage']->value) {?>
            <li id="tab-actions" class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_LINK_ACTIONS'];?>
<span class="suitepicon suitepicon-action-caret"></span></a>
                <?php $_smarty_tpl->_subTemplateRender('file:themes/suite8/include/MySugar/tpls/actions_menu.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
            </li>
        <?php }?>
    </ul>
    <div class="clearfix"></div>
    <div class="tab-content">
        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dashboardPages']->value, 'tab', false, 'tabNum');
$_smarty_tpl->tpl_vars['tab']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['tabNum']->value => $_smarty_tpl->tpl_vars['tab']->value) {
$_smarty_tpl->tpl_vars['tab']->do_else = false;
?>
            <?php if ($_smarty_tpl->tpl_vars['tabNum']->value == 0) {?>
            <div class="tab-pane active fade in" id='tab_content_<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
'>
            <?php } else { ?>
            <div class="tab-pane fade" id='tab_content_<?php echo $_smarty_tpl->tpl_vars['tabNum']->value;?>
'>
            <?php }?>
                <img src="themes/suite8/images/loading.gif" width="48" height="48" align="baseline" border="0" alt="">
            </div>
        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
    </div>
</div>
    <div class="modal fade modal-add-dashlet" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo $_smarty_tpl->tpl_vars['lblAddDashlets']->value;?>
</h4>
                </div>
                <div class="modal-body" id="dashletsList">
                    <p><img src="themes/suite8/images/loading.gif" width="48" height="48" align="baseline" border="0" alt=""></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $_smarty_tpl->tpl_vars['app']->value['LBL_CLOSE_BUTTON_TITLE'];?>
</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

    <div class="modal fade modal-add-dashboard" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo $_smarty_tpl->tpl_vars['lblAddTab']->value;?>
</h4>
                </div>
                <div class="modal-body" id="dashboardDialog">
                    <p><img src="themes/suite8/images/loading.gif" width="48" height="48" align="baseline" border="0" alt=""></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger btn-add-dashboard" data-dismiss="modal"><?php echo $_smarty_tpl->tpl_vars['lblAddTab']->value;?>
</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $_smarty_tpl->tpl_vars['app']->value['LBL_CANCEL_BUTTON_LABEL'];?>
</button>                    
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->


    <div class="modal fade modal-edit-dashboard" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo $_smarty_tpl->tpl_vars['app']->value['LBL_EDIT_TAB'];?>
</h4>
                </div>
                <div class="modal-body">
                    <p><img src="themes/suite8/images/loading.gif" width="48" height="48" align="baseline" border="0" alt=""></p>                </div>
                    <div class="container-fluid">
                        <div class="panel panel-default panel-template">
                            <div class="panel-heading">
                                <div>
                                    <div class="col-xs-10 col-sm-11 col-md-11">
                                        <div class="edit-dashboard-tabs">
                                            <span class="suitepicon suitepicon-mimetype-tab"></span>
                                            <span class="panel-title">Untitled</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $_smarty_tpl->tpl_vars['app']->value['LBL_CLOSE_BUTTON_TITLE'];?>
</button></div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

    <!-- fix errors in mysugar.js -->
    <div style="visibility: collapse">
        <div id="dashletsDialog"></div>
        <div id="dashletsDialog_c"></div>
    </div>

<?php echo '<script'; ?>
 type="text/javascript" src="themes/suite8/include/MySugar/javascript/AddRemoveDashboardPages.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="themes/suite8/include/MySugar/javascript/retrievePage.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript">

    var activePage = <?php echo $_smarty_tpl->tpl_vars['activePage']->value;?>
;
    var theme = '<?php echo $_smarty_tpl->tpl_vars['theme']->value;?>
';
    current_user_id = '<?php echo $_smarty_tpl->tpl_vars['current_user']->value;?>
';
    jsChartsArray = new Array();
    var moduleName = '<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
';
    document.body.setAttribute("class", "yui-skin-sam");
    
    var mySugarLoader = new YAHOO.util.YUILoader({
        require: ["my_sugar", "sugar_charts"],
        // Bug #48940 Skin always must be blank
        skin: {
            base: 'blank',
            defaultSkin: ''
        },
        onSuccess: function () {
            initMySugar();
            initmySugarCharts();
            SUGAR.mySugar.maxCount =    <?php echo $_smarty_tpl->tpl_vars['maxCount']->value;?>
;
            SUGAR.mySugar.homepage_dd = new Array();
            var j = 0;

            
            var dashletIds = <?php echo $_smarty_tpl->tpl_vars['dashletIds']->value;?>
;

            <?php if (!$_smarty_tpl->tpl_vars['lock_homepage']->value) {?>
            for (i in dashletIds) {
                SUGAR.mySugar.homepage_dd[j] = new ygDDList('dashlet_' + dashletIds[i]);
                SUGAR.mySugar.homepage_dd[j].setHandleElId('dashlet_header_' + dashletIds[i]);
                // Bug #47097 : Dashlets not displayed after moving them
                // add new property to save real id of dashlet, it needs to have ability reload dashlet by id
                SUGAR.mySugar.homepage_dd[j].dashletID = dashletIds[i];
                SUGAR.mySugar.homepage_dd[j].onMouseDown = SUGAR.mySugar.onDrag;
                SUGAR.mySugar.homepage_dd[j].afterEndDrag = SUGAR.mySugar.onDrop;
                j++;
                }
            <?php if ($_smarty_tpl->tpl_vars['hiddenCounter']->value > 0) {?>
            for (var wp = 0; wp <= <?php echo $_smarty_tpl->tpl_vars['hiddenCounter']->value;?>
; wp++) {
                SUGAR.mySugar.homepage_dd[j++] = new ygDDListBoundary('page_' + activePage + '_hidden' + wp);
                }
            <?php }?>
            YAHOO.util.DDM.mode = 1;
            <?php }?>
            
            SUGAR.mySugar.renderDashletsDialog();
            SUGAR.mySugar.sugarCharts.loadSugarCharts(activePage);
            
            
        }
    });
    mySugarLoader.addModule({
        name: "my_sugar",
        type: "js",
        fullpath: "<?php echo smarty_function_sugar_getjspath(array('file'=>'include/MySugar/javascript/MySugar.js'),$_smarty_tpl);?>
",
        varName: "initMySugar",
        requires: []
    });
    mySugarLoader.addModule({
        name: "sugar_charts",
        type: "js",
        fullpath: "<?php echo smarty_function_sugar_getjspath(array('file'=>"include/SugarCharts/Jit/js/mySugarCharts.js"),$_smarty_tpl);?>
",
        varName: "initmySugarCharts",
        requires: []
    });
    mySugarLoader.insert();
    
<?php echo '</script'; ?>
>
<?php }
}
