Commit ead0b0af authored by RoSk0's avatar RoSk0

Issue #1897892: Moved menu alterations to related modules.

parent 4a9b26bc
......@@ -134,6 +134,7 @@ function crm_core_contact_ui_views_api() {
*/
function crm_core_contact_ui_menu_alter(&$items) {
// Transform the field UI tabs into contextual links.
$items['admin/structure/crm-core/contact-types']['type'] = MENU_LOCAL_TASK;
$items['admin/structure/crm-core/contact-types/%crm_core_contact_type/fields']['context'] = MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE;
$items['admin/structure/crm-core/contact-types/%crm_core_contact_type/display']['context'] = MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE;
$dashboard_enabled = variable_get('crm_core_dashboard_enabled', FALSE);
......
......@@ -57,15 +57,6 @@ function crm_core_ui_menu() {
return $items;
}
/**
* Implements hook_menu_alter().
*/
function crm_core_ui_menu_alter(&$items) {
// Transform the field UI tabs into contextual links.
$items['admin/structure/crm-core/activity-types']['type'] = MENU_LOCAL_TASK;
$items['admin/structure/crm-core/contact-types']['type'] = MENU_LOCAL_TASK;
}
/**
* Implements hook_permission().
*/
......@@ -88,7 +79,11 @@ function crm_core_ui_permission() {
function crm_core_ui_theme() {
return array(
'crm_core_ui_ctools_dropbutton' => array(
'variables' => array('ops_count' => NULL, 'links' => array(), 'index' => NULL)
'variables' => array(
'ops_count' => NULL,
'links' => array(),
'index' => NULL
)
)
);
}
......@@ -164,6 +159,7 @@ function crm_core_ui_dashboard() {
if (!empty($menu_item['title'])) {
drupal_set_title($menu_item['title']);
}
return $output;
}
else {
......@@ -205,9 +201,9 @@ function crm_core_ui_ctools_add_dropbutton_files() {
drupal_add_css(drupal_get_path('module', 'crm_core_ui') . '/css/crm_core_ui.admin.css');
}
/**
* Theme function for operation links
*/
/**
* Theme function for operation links
*/
function theme_crm_core_ui_ctools_dropbutton($variables) {
$output = '';
......@@ -218,7 +214,7 @@ function theme_crm_core_ui_ctools_dropbutton($variables) {
if (is_array($links) && count($links)) {
$item_list = array();
for ($i = count($links) - $ops_count; $i < count($links); $i++) {
$item_list['items'][] = $links[$i];
$item_list['items'][] = $links[$i];
}
$class = 'ctools-no-js ctools-dropbutton ctools-button';
......@@ -243,6 +239,7 @@ function theme_crm_core_ui_ctools_dropbutton($variables) {
*/
function crm_core_ui_get_menus() {
$t = get_t();
return array(
'crm-core-menu' => array(
'menu_name' => 'crm-core-menu',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment