diff --git a/include/MVC/View/SugarView.php b/include/MVC/View/SugarView.php index fd5a19e8718..068bcdfb2eb 100755 --- a/include/MVC/View/SugarView.php +++ b/include/MVC/View/SugarView.php @@ -656,6 +656,21 @@ public function displayHeader($retModTabs = false) // Now time to go through each of the tab sets and fix them up. foreach ($groupTabs as $tabIdx => $tabData) { $topTabs = $tabData['modules']; + + // Sort the list of modules alphabetically + if ($current_user->getPreference('sort_modules_by_name')) { + asort($topTabs); + } + + // put the current module at the top of the list + if (!empty($moduleTab)) { + unset($topTabs[$moduleTab]); + $topTabs = array_merge( + array($moduleTab => $tabData['modules'][$moduleTab]), + $topTabs + ); + } + if (!is_array($topTabs)) { $topTabs = array(); } @@ -665,26 +680,6 @@ public function displayHeader($retModTabs = false) if (count($topTabs) > $max_tabs) { $extraTabs = array_splice($topTabs, $max_tabs); } - // Make sure the current module is accessable through one of the top tabs - if (!isset($topTabs[$moduleTab])) { - // Nope, we need to add it. - // First, take it out of the extra menu, if it's there - if (isset($extraTabs[$moduleTab])) { - unset($extraTabs[$moduleTab]); - } - if (count($topTabs) >= $max_tabs - 1) { - // We already have the maximum number of tabs, so we need to shuffle the last one - // from the top to the first one of the extras - $lastElem = array_splice($topTabs, $max_tabs - 1); - $extraTabs = $lastElem + $extraTabs; - } - if (!empty($moduleTab)) { - $topTabs[$moduleTab] = $app_list_strings['moduleList'][$moduleTab]; - if (count($topTabs) >= $max_tabs - 1) { - $extraTabs[$moduleTab] = $app_list_strings['moduleList'][$moduleTab]; - } - } - } // Get a unique list of the top tabs so we can build the popup menus for them foreach ($topTabs as $moduleKey => $module) { diff --git a/include/language/en_us.lang.php b/include/language/en_us.lang.php index 462063c0155..1ea0b648ddb 100755 --- a/include/language/en_us.lang.php +++ b/include/language/en_us.lang.php @@ -88,8 +88,8 @@ 'Prospects' => 'Targets', 'Queues' => 'Queues', 'EmailMarketing' => 'Email Marketing', - 'EmailTemplates' => 'Email Templates', - 'ProspectLists' => 'Target Lists', + 'EmailTemplates' => 'Email - Templates', + 'ProspectLists' => 'Targets - Lists', 'SavedSearch' => 'Saved Searches', 'UpgradeWizard' => 'Upgrade Wizard', 'Trackers' => 'Trackers', @@ -144,7 +144,7 @@ '2' => 'No', ), - //e.g. en fran�ais 'Analyst'=>'Analyste', + //e.g. en français 'Analyst'=>'Analyste', 'account_type_dom' => array( '' => '', 'Analyst' => 'Analyst', @@ -158,7 +158,7 @@ 'Reseller' => 'Reseller', 'Other' => 'Other', ), - //e.g. en espa�ol 'Apparel'=>'Ropa', + //e.g. en español 'Apparel'=>'Ropa', 'industry_dom' => array( '' => '', 'Apparel' => 'Apparel', @@ -2813,7 +2813,7 @@ // knowledge base $app_list_strings['moduleList']['AOK_KnowledgeBase'] = 'Knowledge Base'; -$app_list_strings['moduleList']['AOK_Knowledge_Base_Categories'] = 'KB Categories'; +$app_list_strings['moduleList']['AOK_Knowledge_Base_Categories'] = 'KB - Categories'; $app_list_strings['aok_status_list']['Draft'] = 'Draft'; $app_list_strings['aok_status_list']['Expired'] = 'Expired'; $app_list_strings['aok_status_list']['In_Review'] = 'In Review'; @@ -2975,8 +2975,8 @@ //aos $app_list_strings['moduleList']['AOS_Contracts'] = 'Contracts'; $app_list_strings['moduleList']['AOS_Invoices'] = 'Invoices'; -$app_list_strings['moduleList']['AOS_PDF_Templates'] = 'PDF Templates'; -$app_list_strings['moduleList']['AOS_Product_Categories'] = 'Product Categories'; +$app_list_strings['moduleList']['AOS_PDF_Templates'] = 'PDF - Templates'; +$app_list_strings['moduleList']['AOS_Product_Categories'] = 'Products - Categories'; $app_list_strings['moduleList']['AOS_Products'] = 'Products'; $app_list_strings['moduleList']['AOS_Products_Quotes'] = 'Line Items'; $app_list_strings['moduleList']['AOS_Line_Item_Groups'] = 'Line Item Groups'; @@ -3125,7 +3125,7 @@ $app_list_strings['aow_run_when_list']['In_Scheduler'] = 'Only In The Scheduler'; //gant -$app_list_strings['moduleList']['AM_ProjectTemplates'] = 'Project Templates'; +$app_list_strings['moduleList']['AM_ProjectTemplates'] = 'Projects - Templates'; $app_list_strings['moduleList']['AM_TaskTemplates'] = 'Project Task Templates'; $app_list_strings['relationship_type_list']['FS'] = 'Finish to Start'; $app_list_strings['relationship_type_list']['SS'] = 'Start to Start'; @@ -3144,9 +3144,9 @@ $app_strings['LBL_JJWG_MAPS_ADDRESS'] = 'Address'; $app_list_strings['moduleList']['jjwg_Maps'] = 'Maps'; -$app_list_strings['moduleList']['jjwg_Markers'] = 'Map Markers'; -$app_list_strings['moduleList']['jjwg_Areas'] = 'Map Areas'; -$app_list_strings['moduleList']['jjwg_Address_Cache'] = 'Map Address Cache'; +$app_list_strings['moduleList']['jjwg_Markers'] = 'Maps - Markers'; +$app_list_strings['moduleList']['jjwg_Areas'] = 'Maps - Areas'; +$app_list_strings['moduleList']['jjwg_Address_Cache'] = 'Maps - Address Cache'; $app_list_strings['moduleList']['jjwp_Partners'] = 'JJWP Partners'; diff --git a/modules/Users/Save.php b/modules/Users/Save.php index eb45e97c768..f0f80a88182 100755 --- a/modules/Users/Save.php +++ b/modules/Users/Save.php @@ -199,6 +199,12 @@ $focus->setPreference('navigation_paradigm', 'gm', 0, 'global'); } + if (isset($_POST['sort_modules_by_name'])) { + $focus->setPreference('sort_modules_by_name', $_POST['sort_modules_by_name'], 0, 'global'); + } else { + $focus->setPreference('sort_modules_by_name', '', 0, 'global'); + } + if (isset($_POST['user_subpanel_tabs'])) { $focus->setPreference('subpanel_tabs', $_POST['user_subpanel_tabs'], 0, 'global'); } else { @@ -380,7 +386,7 @@ if ((isset($_POST['old_password']) || $focus->portal_only) && (isset($_POST['new_password']) && !empty($_POST['new_password'])) && (isset($_POST['password_change']) && $_POST['password_change'] == 'true')) { - if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { + if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { if ($focus->error_string) { SugarApplication::appendErrorMessage($focus->error_string); diff --git a/modules/Users/UserViewHelper.php b/modules/Users/UserViewHelper.php index 18dd5af677c..b228cd8a629 100755 --- a/modules/Users/UserViewHelper.php +++ b/modules/Users/UserViewHelper.php @@ -513,6 +513,10 @@ protected function setupAdvancedTabNavSettings() { } $this->ss->assign("USE_GROUP_TABS",($useGroupTabs=='gm')?'checked':''); + if ($this->bean->getPreference('sort_modules_by_name')) { + $this->ss->assign('SORT_MODULES_BY_NAME', ' checked'); + } + $user_subpanel_tabs = $this->bean->getPreference('subpanel_tabs'); if(isset($user_subpanel_tabs)) { $this->ss->assign("SUBPANEL_TABS", $user_subpanel_tabs?'checked':''); diff --git a/modules/Users/language/en_us.lang.php b/modules/Users/language/en_us.lang.php index 771d4395f59..f079ab1433c 100755 --- a/modules/Users/language/en_us.lang.php +++ b/modules/Users/language/en_us.lang.php @@ -289,6 +289,8 @@ 'LBL_STATUS' => 'Status', 'LBL_SUBPANEL_TABS' => 'Subpanel Tabs', 'LBL_SUBPANEL_TABS_DESCRIPTION' => 'In Detail Views, group Subpanels into tabs and display one tab at a time.', + 'LBL_SORT_MODULES' => 'Sort modules alphabetically', + 'LBL_SORT_MODULES_DESCRIPTION' => 'Order modules by name in the navigation drop down.', 'LBL_SUGAR_LOGIN' => 'Is SuiteCRM User', 'LBL_THEME' => 'Themes', 'LBL_TIME_FORMAT_TEXT' => 'Set the display format for time stamps', diff --git a/modules/Users/tpls/EditViewFooter.tpl b/modules/Users/tpls/EditViewFooter.tpl index e8213510521..455a2070288 100755 --- a/modules/Users/tpls/EditViewFooter.tpl +++ b/modules/Users/tpls/EditViewFooter.tpl @@ -505,6 +505,13 @@ + + {$MOD.LBL_SORT_MODULES} + : {sugar_help text=$MOD.LBL_SORT_MODULES_DESCRIPTION } + + + + {$MOD.LBL_SUBPANEL_TABS} : {sugar_help text=$MOD.LBL_SUBPANEL_TABS_DESCRIPTION }