2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
41 global $app_list_strings, $app_strings, $mod_strings;
43 require_once('modules/Studio/TabGroups/TabGroupHelper.php');
44 require_once('modules/Studio/parsers/StudioParser.php');
46 $tabGroupSelected_lang = (!empty($_GET['lang'])?$_GET['lang']:$_SESSION['authenticated_user_language']);
47 $tg = new TabGroupHelper();
48 $smarty = new Sugar_Smarty();
49 if(empty($GLOBALS['tabStructure'])){
50 require_once('include/tabConfig.php');
52 $title=get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONFIGURE_GROUP_TABS'], true);
55 $selectedAppLanguages = return_application_language($tabGroupSelected_lang);
56 require_once('include/GroupedTabs/GroupedTabStructure.php');
57 $groupedTabsClass = new GroupedTabStructure();
58 $groupedTabStructure = $groupedTabsClass->get_tab_structure('', '', true,true);
59 foreach($groupedTabStructure as $mainTab => $subModules){
60 $groupedTabStructure[$mainTab]['label'] = $mainTab;
61 $groupedTabStructure[$mainTab]['labelValue'] = $selectedAppLanguages[$mainTab];
64 $smarty->assign('tabs', $groupedTabStructure);
66 $selectedLanguageModStrings = return_module_language($tabGroupSelected_lang , 'Studio');
67 $smarty->assign('TGMOD', $selectedLanguageModStrings);
68 $smarty->assign('MOD', $GLOBALS['mod_strings']);
69 $smarty->assign('otherLabel', 'LBL_TABGROUP_OTHER');
70 $selected_lang = (!empty($_REQUEST['dropdown_lang'])?$_REQUEST['dropdown_lang']:$_SESSION['authenticated_user_language']);
71 if(empty($selected_lang)){
72 $selected_lang = $GLOBALS['sugar_config']['default_language'];
74 $availableModules = $tg->getAvailableModules($tabGroupSelected_lang);
75 $smarty->assign('availableModuleList',$availableModules);
77 $smarty->assign('dropdown_languages', get_languages());
80 $imageSave = SugarThemeRegistry::current()->getImage( 'studio_save', '');
83 $buttons [] = array ( 'text' => $GLOBALS['mod_strings']['LBL_BTN_SAVEPUBLISH'],'actionScript'=>"onclick='studiotabs.generateForm(\"edittabs\");document.edittabs.submit()'" ) ;
85 foreach ( $buttons as $button )
87 $html .= "<td><input type='button' valign='center' class='button' style='cursor:pointer' onmousedown='this.className=\"buttonOn\";return false;' onmouseup='this.className=\"button\"' onmouseout='this.className=\"button\"' {$button['actionScript']} value = '{$button['text']}' ></td>" ;
89 $smarty->assign('buttons', $html);
90 $smarty->assign('title', $title);
91 $smarty->assign('dropdown_lang', $selected_lang);
93 $editImage = SugarThemeRegistry::current()->getImage( 'edit_inline', '');
94 $smarty->assign('editImage',$editImage);
95 $deleteImage = SugarThemeRegistry::current()->getImage( 'delete_inline', '');
96 $recycleImage = SugarThemeRegistry::current()->getImage('icon_Delete','',48,48 );
97 $smarty->assign('deleteImage',$deleteImage);
98 $smarty->assign('recycleImage',$recycleImage);
101 global $sugar_config;
102 if(isset($sugar_config['other_group_tab_displayed'])){
103 if($sugar_config['other_group_tab_displayed']){
108 $smarty->assign('other_group_tab_displayed', $value);
110 $smarty->assign('other_group_tab_displayed', 'checked');
112 $smarty->assign('tabGroupSelected_lang', $tabGroupSelected_lang);
114 $smarty->assign('available_languages', get_languages());
115 $smarty->display("modules/Studio/TabGroups/EditViewTabs.tpl");