2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition 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=getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CONFIGURE_GROUP_TABS']), false);
55 $selectedAppLanguages = return_application_language($tabGroupSelected_lang);
56 require_once('include/GroupedTabs/GroupedTabStructure.php');
57 $availableModules = $tg->getAvailableModules($tabGroupSelected_lang);
58 $smarty->assign('availableModuleList',$availableModules);
59 $modList = array_keys($availableModules);
60 $modList = array_combine($modList, $modList); // Bug #48693 We need full list of modules here instead of displayed modules
61 $groupedTabsClass = new GroupedTabStructure();
62 $groupedTabStructure = $groupedTabsClass->get_tab_structure($modList, '', true,true);
63 foreach($groupedTabStructure as $mainTab => $subModules){
64 $groupedTabStructure[$mainTab]['label'] = $mainTab;
65 $groupedTabStructure[$mainTab]['labelValue'] = $selectedAppLanguages[$mainTab];
68 $smarty->assign('tabs', $groupedTabStructure);
70 $selectedLanguageModStrings = return_module_language($tabGroupSelected_lang , 'Studio');
71 $smarty->assign('TGMOD', $selectedLanguageModStrings);
72 $smarty->assign('MOD', $GLOBALS['mod_strings']);
73 $smarty->assign('otherLabel', 'LBL_TABGROUP_OTHER');
74 $selected_lang = (!empty($_REQUEST['dropdown_lang'])?$_REQUEST['dropdown_lang']:$_SESSION['authenticated_user_language']);
75 if(empty($selected_lang)){
76 $selected_lang = $GLOBALS['sugar_config']['default_language'];
79 $smarty->assign('dropdown_languages', get_languages());
82 $imageSave = SugarThemeRegistry::current()->getImage( 'studio_save', '',null,null,'.gif',$mod_strings['LBL_SAVE']);
85 $buttons [] = array ( 'text' => $GLOBALS['mod_strings']['LBL_BTN_SAVEPUBLISH'],'actionScript'=>"onclick='studiotabs.generateForm(\"edittabs\");document.edittabs.submit()'" ) ;
87 foreach ( $buttons as $button )
89 $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>" ;
91 $smarty->assign('buttons', $html);
92 $smarty->assign('title', $title);
93 $smarty->assign('dropdown_lang', $selected_lang);
95 $editImage = SugarThemeRegistry::current()->getImage( 'edit_inline', '',null,null,'.gif',$mod_strings['LBL_EDIT']);
96 $smarty->assign('editImage',$editImage);
97 $deleteImage = SugarThemeRegistry::current()->getImage( 'delete_inline', '',null,null,'.gif',$mod_strings['LBL_MB_DELETE']);
98 $recycleImage = SugarThemeRegistry::current()->getImage('icon_Delete','',48,48,'.gif',$mod_strings['LBL_MB_DELETE'] );
99 $smarty->assign('deleteImage',$deleteImage);
100 $smarty->assign('recycleImage',$recycleImage);
103 global $sugar_config;
104 if(isset($sugar_config['other_group_tab_displayed'])){
105 if($sugar_config['other_group_tab_displayed']){
110 $smarty->assign('other_group_tab_displayed', $value);
112 $smarty->assign('other_group_tab_displayed', 'checked');
114 $smarty->assign('tabGroupSelected_lang', $tabGroupSelected_lang);
116 $smarty->assign('available_languages', get_languages());
117 $smarty->display("modules/Studio/TabGroups/EditViewTabs.tpl");