]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SubPanel/tpls/singletabmenu.tpl
Release 6.4.0
[Github/sugarcrm.git] / include / SubPanel / tpls / singletabmenu.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38
39
40
41 *}
42
43
44 <script type="text/javascript">
45 SUGAR.util.doWhen("typeof get_module_name != 'undefined'", function()
46 {ldelim}
47         SUGAR.subpanelUtils.currentSubpanelGroup = '{$startSubPanel}';
48
49         SUGAR.subpanelUtils.subpanelMoreTab = '{$moreTab}';
50
51         SUGAR.subpanelUtils.subpanelMaxSubtabs = '{$maxSubtabs}';
52
53         SUGAR.subpanelUtils.subpanelHtml = new Array();
54
55         SUGAR.subpanelUtils.loadedGroups = Array();
56         SUGAR.subpanelUtils.loadedGroups.push('{$startSubPanel}');
57
58         SUGAR.subpanelUtils.subpanelSubTabs = new Array();
59         SUGAR.subpanelUtils.subpanelGroups = new Array();
60 {foreach from=$othertabs item=tab}
61 {assign var='notFirst' value='0'}
62         SUGAR.subpanelUtils.subpanelGroups['{$tab.key}'] = [{foreach from=$tab.tabs item=subtab}{if $notFirst != 0}, {else}{assign var='notFirst' value='1'}{/if}'{$subtab.key}'{/foreach}{foreach from=$otherMoreSubMenu[$tab.key].tabs item=subtab}, '{$subtab.key}'{/foreach}];
63 {/foreach}
64
65 {assign var='notFirst' value='0'}
66         SUGAR.subpanelUtils.subpanelTitles = {$subpanelTitlesJSON};
67
68         SUGAR.subpanelUtils.tabCookieName = get_module_name() + '_sp_tab';
69
70         SUGAR.subpanelUtils.showLinks = {$showLinks};
71
72         SUGAR.subpanelUtils.requestUrl = 'index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$smarty.request.module}&record={$smarty.request.record}&subpanels=';
73 {rdelim});
74 </script>
75
76
77 {if !empty($sugartabs)}
78 <ul id="groupTabs" class="subpanelTablist">
79 {foreach from=$sugartabs item=tab}
80         <li id="{$tab.label}_sp_tab">
81                 <a class="{$tab.type}" href="javascript:SUGAR.subpanelUtils.loadSubpanelGroup('{$tab.label}');">{$tab.label}</a>
82         </li>
83 {/foreach}
84 {if !empty($moreMenu)}
85         <li>
86                 <div id='MorePanelHandle' onmouseover='SUGAR.subpanelUtils.menu.tbspButtonMouseOver(this.id,"","",0);'>
87                         {sugar_getimage name="blank" ext=".gif" width="16" height="16" alt=$app_strings.LBL_MORE other_attributes='border="0" '}
88                 </div>
89         </li>
90 {/if}
91 </ul>
92 {* Table closed in SubPanelTiles.php, line 295 *}
93 <table width="100%" cellspacing="0" cellpadding="0" border="0" class="subpanelTabForm">
94         <tr>
95                 <td>
96 {/if}
97
98 {if $showLinks == 'true'}
99 <table cellpadding="0" cellspacing="0" width='100%'>
100         <tr height="20">
101                 <td class="subpanelSubTabBar" colspan="100" id="subpanelSubTabs">
102                         <table border="0" cellpadding="0" cellspacing="0" height="20" width="100%" class="subTabs">
103                                 <tbody>
104                                 <tr>
105 {foreach from=$subtabs item=tab}
106 {if !empty($notFirst) && ($notFirst != 0) && ($notFirst != 1)}
107                                         <td width='1'> | </td>
108 {else}
109 {assign var='notFirst' value='2'}
110 {/if}
111                                         <td nowrap="nowrap">
112                                                 <a href='#{$tab.key}' class='subTabLink'>{$tab.label}</a>
113                                         </td>
114 {/foreach}
115 {if !empty($otherMoreSubMenu[$moreSubMenuName].tabs)}
116                                         <td nowrap="nowrap"> | &nbsp;<span class="subTabMore" id="MoreSub{$moreSubMenuName}PanelHandle" style="margin-left:2px; cursor: pointer; cursor: hand;" align="absmiddle" onmouseover="SUGAR.subpanelUtils.menu.tbspButtonMouseOver(this.id,'','',0);">&gt;&gt;</span></td>
117 {/if}
118                                         <td width='100%'>&nbsp;</td>
119                                 </tr>
120                                 </tbody>
121                         </table>
122                 </td>
123         </tr>
124 </table>
125 {/if}
126
127 {if !empty($moreMenu)}
128 <div id="MorePanelMenu" class="menu">
129 {foreach from=$moreMenu item=tab}
130         <a href="javascript:SUGAR.subpanelUtils.loadSubpanelGroupFromMore('{$tab.label}');" class="menuItem" id="{$tab.label}_sp_mm" parentid="MorePanelMenu" onmouseover="hiliteItem(this,'yes'); closeSubMenus(this);" onmouseout="unhiliteItem(this);">{$tab.label}</a>
131 {/foreach}
132 </div>
133 {/if}
134
135 {foreach from=$otherMoreSubMenu item=group}
136 {if !empty($group.tabs)}
137 <div id="MoreSub{$group.key}PanelMenu" class="menu">
138 {foreach from=$group.tabs item=subtab}
139         <a href="#{$subtab.key}" class="menuItem" parentid="MoreSub{$group.key}PanelMenu" onmouseover="hiliteItem(this,'yes'); closeSubMenus(this);" onmouseout="unhiliteItem(this);">{$subtab.label}</a>
140 {/foreach}
141 </div>
142 {/if}
143 {/foreach}
144
145