]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SubPanel/tpls/singletabmenu.tpl
Release 6.2.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>
45         SUGAR.subpanelUtils.currentSubpanelGroup = '{$startSubPanel}';
46         
47         SUGAR.subpanelUtils.subpanelMoreTab = '{$moreTab}';
48         
49         SUGAR.subpanelUtils.subpanelMaxSubtabs = '{$maxSubtabs}';
50         
51         SUGAR.subpanelUtils.subpanelHtml = new Array();
52         
53         SUGAR.subpanelUtils.loadedGroups = Array();
54         SUGAR.subpanelUtils.loadedGroups.push('{$startSubPanel}');
55         
56         SUGAR.subpanelUtils.subpanelSubTabs = new Array();
57         SUGAR.subpanelUtils.subpanelGroups = new Array();
58 {foreach from=$othertabs item=tab}
59 {assign var='notFirst' value='0'}
60         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}];
61 {/foreach}
62
63 {assign var='notFirst' value='0'}
64         SUGAR.subpanelUtils.subpanelTitles = {ldelim}{foreach from=$othertabs.All.tabs item=subtab}{if $notFirst != 0}, {else}{assign var='notFirst' value='1'}{/if}'{$subtab.key}':'{$subtab.label}'{/foreach}{foreach from=$otherMoreSubMenu.All.tabs item=subtab}, '{$subtab.key}':'{$subtab.label}'{/foreach}{rdelim};
65
66         SUGAR.subpanelUtils.tabCookieName = get_module_name() + '_sp_tab';
67         
68         SUGAR.subpanelUtils.showLinks = {$showLinks};
69         
70         SUGAR.subpanelUtils.requestUrl = 'index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$smarty.request.module}&record={$smarty.request.record}&subpanels=';
71 </script>
72
73
74 {if !empty($sugartabs)}
75 <ul id="groupTabs" class="subpanelTablist">
76 {foreach from=$sugartabs item=tab}
77         <li id="{$tab.label}_sp_tab">
78                 <a class="{$tab.type}" href="javascript:SUGAR.subpanelUtils.loadSubpanelGroup('{$tab.label}');">{$tab.label}</a>
79         </li>
80 {/foreach}
81 {if !empty($moreMenu)}
82         <li>
83                 <div id='MorePanelHandle' onmouseover='SUGAR.subpanelUtils.menu.tbspButtonMouseOver(this.id,"","",0);'>
84                         <img src="{sugar_getimagepath file='blank.gif'}" alt="more" border="0" height="16" width="16" />
85                 </div>
86         </li>
87 {/if}
88 </ul>
89 {* Table closed in SubPanelTiles.php, line 295 *}
90 <table width="100%" cellspacing="0" cellpadding="0" border="0" class="subpanelTabForm">
91         <tr>
92                 <td>
93 {/if}
94
95 {if $showLinks == 'true'}
96 <table cellpadding="0" cellspacing="0" width='100%'>
97         <tr height="20">
98                 <td class="subpanelSubTabBar" colspan="100" id="subpanelSubTabs">
99                         <table border="0" cellpadding="0" cellspacing="0" height="20" width="100%" class="subTabs">
100                                 <tbody>
101                                 <tr>
102 {foreach from=$subtabs item=tab}
103 {if !empty($notFirst) && ($notFirst != 0) && ($notFirst != 1)}
104                                         <td width='1'> | </td>
105 {else}
106 {assign var='notFirst' value='2'}
107 {/if}
108                                         <td nowrap="nowrap">
109                                                 <a href='#{$tab.key}' class='subTabLink'>{$tab.label}</a>
110                                         </td>
111 {/foreach}
112 {if !empty($otherMoreSubMenu[$moreSubMenuName].tabs)}
113                                         <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>
114 {/if}
115                                         <td width='100%'>&nbsp;</td>
116                                 </tr>
117                                 </tbody>
118                         </table>
119                 </td>
120         </tr>
121 </table>
122 {/if}
123
124 {if !empty($moreMenu)}
125 <div id="MorePanelMenu" class="menu">
126 {foreach from=$moreMenu item=tab}
127         <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>
128 {/foreach}
129 </div>
130 {/if}
131
132 {foreach from=$otherMoreSubMenu item=group}
133 {if !empty($group.tabs)}
134 <div id="MoreSub{$group.key}PanelMenu" class="menu">
135 {foreach from=$group.tabs item=subtab}
136         <a href="#{$subtab.key}" class="menuItem" parentid="MoreSub{$group.key}PanelMenu" onmouseover="hiliteItem(this,'yes'); closeSubMenus(this);" onmouseout="unhiliteItem(this);">{$subtab.label}</a>
137 {/foreach}
138 </div>
139 {/if}
140 {/foreach}
141
142