Commit f365767e authored by RoSk0's avatar RoSk0

#12589: Added "Add activity" and "Add relationship" to main contact screen.

parent b4d20a69
......@@ -10,7 +10,7 @@
*/
function crm_core_activity_ui_menu() {
$activity_paths = array(
'no_contact' => 'crm-core/activity/add',
'no_contact' => 'crm-core/contact/activity-add',
'contact' => 'crm-core/contact/%crm_core_contact/activity/add',
);
foreach ($activity_paths as $key => $path) {
......@@ -22,10 +22,8 @@ function crm_core_activity_ui_menu() {
'access arguments' => array('create_view', 'crm_core_activity'),
'type' => MENU_LOCAL_ACTION,
'file' => 'crm_core_activity_ui.pages.inc',
'weight' => 5,
);
if ($key == 'no_contact') {
$items[$path]['weight'] = 100;
}
foreach (crm_core_activity_types() as $type => $info) {
$items[$path . '/' . $type] = array(
......
......@@ -72,7 +72,7 @@ function crm_core_contact_ui_menu() {
'access arguments' => array('create_view', 'crm_core_contact'),
'type' => MENU_LOCAL_ACTION,
'context' => MENU_CONTEXT_PAGE,
'weight' => 10,
'weight' => 0,
'file' => 'crm_core_contact_ui.pages.inc',
);
foreach (crm_core_contact_types() as $type => $contact_type) {
......@@ -129,8 +129,6 @@ function crm_core_contact_ui_views_api() {
);
}
/**
* Implements hook_menu_alter().
*/
......@@ -144,7 +142,6 @@ function crm_core_contact_ui_menu_alter(&$items) {
}
}
/**
* Implements hook_admin_paths().
*/
......@@ -157,7 +154,6 @@ function crm_core_contact_ui_admin_paths() {
return $paths;
}
/**
* Implements hook_theme().
*/
......@@ -190,6 +186,7 @@ function crm_core_contact_ui_view($contact) {
l(t('Contacts'), 'crm-core/contact'),
);
drupal_set_breadcrumb($breadcrumb);
return crm_core_contact_view($contact);
}
......
<?php
/**
* Implements hook_menu()
* Implements hook_menu().
*/
function crm_core_relationship_ui_menu() {
$items = array();
......@@ -9,7 +10,7 @@ function crm_core_relationship_ui_menu() {
* CRM Contact Relationships
*/
$relation_paths = array(
'no_contact' => 'crm-core/relationship/add',
'no_contact' => 'crm-core/contact/relationship-add',
'contact' => 'crm-core/contact/%crm_core_contact/relationships/add',
);
foreach ($relation_paths as $key => $path) {
......@@ -21,6 +22,7 @@ function crm_core_relationship_ui_menu() {
'access callback' => TRUE,
'type' => MENU_LOCAL_ACTION,
'file' => 'crm_core_relationship_ui.pages.inc',
'weight' => 10,
);
foreach (crm_core_relationship_get_relationships() as $type => $info) {
......
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