First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for actions button.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_Actions extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('actionsMenuList', CRM_Contact_BAO_Contact::contextMenu($contactId));
|
||||
CRM_Contact_Page_View::addUrls($this, $contactId);
|
||||
|
||||
// also create the form element for the activity links box
|
||||
$controller = new CRM_Core_Controller_Simple('CRM_Activity_Form_ActivityLinks',
|
||||
ts('Activity Links'),
|
||||
NULL
|
||||
);
|
||||
$controller->setEmbedded(TRUE);
|
||||
$controller->run();
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
117
sites/all/modules/civicrm/CRM/Contact/Page/Inline/Address.php
Normal file
117
sites/all/modules/civicrm/CRM/Contact/Page/Inline/Address.php
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details of address.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_Address extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
$locBlockNo = CRM_Utils_Request::retrieve('locno', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
$addressId = CRM_Utils_Request::retrieve('aid', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, NULL, $_REQUEST);
|
||||
|
||||
$address = array();
|
||||
if ($addressId > 0) {
|
||||
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('labelColumn' => 'display_name'));
|
||||
|
||||
$entityBlock = array('id' => $addressId);
|
||||
$address = CRM_Core_BAO_Address::getValues($entityBlock, FALSE, 'id');
|
||||
if (!empty($address)) {
|
||||
foreach ($address as $key => & $value) {
|
||||
$value['location_type'] = $locationTypes[$value['location_type_id']];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we just need current address block
|
||||
$currentAddressBlock['address'][$locBlockNo] = array_pop($address);
|
||||
|
||||
if (!empty($currentAddressBlock['address'][$locBlockNo])) {
|
||||
// get contact name of shared contact names
|
||||
$sharedAddresses = array();
|
||||
$shareAddressContactNames = CRM_Contact_BAO_Contact_Utils::getAddressShareContactNames($currentAddressBlock['address']);
|
||||
foreach ($currentAddressBlock['address'] as $key => $addressValue) {
|
||||
if (!empty($addressValue['master_id']) &&
|
||||
!$shareAddressContactNames[$addressValue['master_id']]['is_deleted']
|
||||
) {
|
||||
$sharedAddresses[$key]['shared_address_display'] = array(
|
||||
'address' => $addressValue['display'],
|
||||
'name' => $shareAddressContactNames[$addressValue['master_id']]['name'],
|
||||
);
|
||||
}
|
||||
}
|
||||
$idValue = $currentAddressBlock['address'][$locBlockNo]['id'];
|
||||
if (!empty($currentAddressBlock['address'][$locBlockNo]['master_id'])) {
|
||||
$idValue = $currentAddressBlock['address'][$locBlockNo]['master_id'];
|
||||
}
|
||||
|
||||
// add custom data of type address
|
||||
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Address', NULL, $idValue);
|
||||
|
||||
// we setting the prefix to dnc_ below so that we don't overwrite smarty's grouptree var.
|
||||
$currentAddressBlock['address'][$locBlockNo]['custom'] = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, "dnc_");
|
||||
$this->assign("dnc_viewCustomData", NULL);
|
||||
|
||||
$this->assign('add', $currentAddressBlock['address'][$locBlockNo]);
|
||||
$this->assign('sharedAddresses', $sharedAddresses);
|
||||
}
|
||||
$contact = new CRM_Contact_BAO_Contact();
|
||||
$contact->id = $contactId;
|
||||
$contact->find(TRUE);
|
||||
$privacy = array();
|
||||
foreach (CRM_Contact_BAO_Contact::$_commPrefs as $name) {
|
||||
if (isset($contact->$name)) {
|
||||
$privacy[$name] = $contact->$name;
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('locationIndex', $locBlockNo);
|
||||
$this->assign('addressId', $addressId);
|
||||
$this->assign('privacy', $privacy);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details of communication preferences.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_CommunicationPreferences extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$params = array('id' => $contactId);
|
||||
|
||||
$defaults = array();
|
||||
CRM_Contact_BAO_Contact::getValues($params, $defaults);
|
||||
$defaults['privacy_values'] = CRM_Core_SelectValues::privacy();
|
||||
|
||||
$communicationStyle = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'communication_style_id');
|
||||
if (!empty($communicationStyle)) {
|
||||
if (!empty($defaults['communication_style_id'])) {
|
||||
$defaults['communication_style_display'] = $communicationStyle[CRM_Utils_Array::value('communication_style_id', $defaults)];
|
||||
}
|
||||
else {
|
||||
// Make sure the field is displayed as long as it is active, even if it is unset for this contact.
|
||||
$defaults['communication_style_display'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign($defaults);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Page to display contact information on top of summary.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_ContactInfo extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$params = array('id' => $contactId);
|
||||
|
||||
$defaults = array();
|
||||
CRM_Contact_BAO_Contact::getValues($params, $defaults);
|
||||
|
||||
//get the current employer name
|
||||
if (CRM_Utils_Array::value('contact_type', $defaults) == 'Individual') {
|
||||
if (!empty($defaults['employer_id']) && !empty($defaults['organization_name'])) {
|
||||
$defaults['current_employer'] = $defaults['organization_name'];
|
||||
$defaults['current_employer_id'] = $defaults['employer_id'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign($defaults);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Page to display contact name on top of the summary.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_ContactName extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$isDeleted = (bool) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'is_deleted');
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
|
||||
$title = CRM_Contact_Page_View::setTitle($contactId, $isDeleted);
|
||||
$this->assign('title', $title);
|
||||
|
||||
// Check if this is default domain contact CRM-10482
|
||||
$this->assign('domainContact', CRM_Contact_BAO_Contact::checkDomainContact($contactId));
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* This page displays custom data during inline edit.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_CustomData extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
$cgId = CRM_Utils_Request::retrieve('groupID', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
$customRecId = CRM_Utils_Request::retrieve('customRecId', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1, $_REQUEST);
|
||||
$cgcount = CRM_Utils_Request::retrieve('cgcount', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1, $_REQUEST);
|
||||
|
||||
//custom groups Inline
|
||||
$entityType = CRM_Contact_BAO_Contact::getContactType($contactId);
|
||||
$entitySubType = CRM_Contact_BAO_Contact::getContactSubType($contactId);
|
||||
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, NULL, $contactId,
|
||||
$cgId, $entitySubType
|
||||
);
|
||||
$details = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $contactId);
|
||||
//get the fields of single custom group record
|
||||
if ($customRecId == 1) {
|
||||
$fields = reset($details[$cgId]);
|
||||
}
|
||||
else {
|
||||
$fields = CRM_Utils_Array::value($customRecId, $details[$cgId]);
|
||||
}
|
||||
$this->assign('cgcount', $cgcount);
|
||||
$this->assign('customRecId', $customRecId);
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('customGroupId', $cgId);
|
||||
$this->assign_by_ref('cd_edit', $fields);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details of demographics.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_Demographics extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$params = array('id' => $contactId);
|
||||
|
||||
$defaults = array();
|
||||
CRM_Contact_BAO_Contact::getValues($params, $defaults);
|
||||
|
||||
if (!empty($defaults['gender_id'])) {
|
||||
$gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
|
||||
$defaults['gender_display'] = $gender[CRM_Utils_Array::value('gender_id', $defaults)];
|
||||
}
|
||||
$this->assignFieldMetadataToTemplate('Contact');
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign($defaults);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
79
sites/all/modules/civicrm/CRM/Contact/Page/Inline/Email.php
Normal file
79
sites/all/modules/civicrm/CRM/Contact/Page/Inline/Email.php
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details of Email.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_Email extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('labelColumn' => 'display_name'));
|
||||
|
||||
$entityBlock = array('contact_id' => $contactId);
|
||||
$emails = CRM_Core_BAO_Email::getValues($entityBlock);
|
||||
if (!empty($emails)) {
|
||||
foreach ($emails as &$value) {
|
||||
$value['location_type'] = $locationTypes[$value['location_type_id']];
|
||||
}
|
||||
}
|
||||
|
||||
$contact = new CRM_Contact_BAO_Contact();
|
||||
$contact->id = $contactId;
|
||||
$contact->find(TRUE);
|
||||
$privacy = array();
|
||||
foreach (CRM_Contact_BAO_Contact::$_commPrefs as $name) {
|
||||
if (isset($contact->$name)) {
|
||||
$privacy[$name] = $contact->$name;
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('email', $emails);
|
||||
$this->assign('privacy', $privacy);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
70
sites/all/modules/civicrm/CRM/Contact/Page/Inline/IM.php
Normal file
70
sites/all/modules/civicrm/CRM/Contact/Page/Inline/IM.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details for IM.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_IM extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('labelColumn' => 'display_name'));
|
||||
$IMProviders = CRM_Core_PseudoConstant::get('CRM_Core_DAO_IM', 'provider_id');
|
||||
|
||||
$entityBlock = array('contact_id' => $contactId);
|
||||
$ims = CRM_Core_BAO_IM::getValues($entityBlock);
|
||||
if (!empty($ims)) {
|
||||
foreach ($ims as $key => & $value) {
|
||||
$value['location_type'] = $locationTypes[$value['location_type_id']];
|
||||
$value['provider'] = $IMProviders[$value['provider_id']];
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('im', $ims);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
68
sites/all/modules/civicrm/CRM/Contact/Page/Inline/OpenID.php
Normal file
68
sites/all/modules/civicrm/CRM/Contact/Page/Inline/OpenID.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details for OpenID.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_OpenID extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('labelColumn' => 'display_name'));
|
||||
|
||||
$entityBlock = array('contact_id' => $contactId);
|
||||
$openids = CRM_Core_BAO_OpenID::getValues($entityBlock);
|
||||
if (!empty($openids)) {
|
||||
foreach ($openids as $key => & $value) {
|
||||
$value['location_type'] = $locationTypes[$value['location_type_id']];
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('openid', $openids);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
81
sites/all/modules/civicrm/CRM/Contact/Page/Inline/Phone.php
Normal file
81
sites/all/modules/civicrm/CRM/Contact/Page/Inline/Phone.php
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details of Phone.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_Phone extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('labelColumn' => 'display_name'));
|
||||
$phoneTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
|
||||
|
||||
$entityBlock = array('contact_id' => $contactId);
|
||||
$phones = CRM_Core_BAO_Phone::getValues($entityBlock);
|
||||
if (!empty($phones)) {
|
||||
foreach ($phones as $key => & $value) {
|
||||
$value['location_type'] = $locationTypes[$value['location_type_id']];
|
||||
$value['phone_type'] = $phoneTypes[$value['phone_type_id']];
|
||||
}
|
||||
}
|
||||
|
||||
$contact = new CRM_Contact_BAO_Contact();
|
||||
$contact->id = $contactId;
|
||||
$contact->find(TRUE);
|
||||
$privacy = array();
|
||||
foreach (CRM_Contact_BAO_Contact::$_commPrefs as $name) {
|
||||
if (isset($contact->$name)) {
|
||||
$privacy[$name] = $contact->$name;
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('phone', $phones);
|
||||
$this->assign('privacy', $privacy);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC (c) 2004-2017
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dummy page for details of website.
|
||||
*/
|
||||
class CRM_Contact_Page_Inline_Website extends CRM_Core_Page {
|
||||
|
||||
/**
|
||||
* Run the page.
|
||||
*
|
||||
* This method is called after the page is created.
|
||||
*/
|
||||
public function run() {
|
||||
// get the emails for this contact
|
||||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
|
||||
|
||||
$websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
|
||||
|
||||
$params = array('contact_id' => $contactId);
|
||||
$websites = CRM_Core_BAO_Website::getValues($params, CRM_Core_DAO::$_nullArray);
|
||||
if (!empty($websites)) {
|
||||
foreach ($websites as $key => & $value) {
|
||||
$value['website_type'] = $websiteTypes[$value['website_type_id']];
|
||||
}
|
||||
}
|
||||
|
||||
$this->assign('contactId', $contactId);
|
||||
$this->assign('website', $websites);
|
||||
|
||||
// check logged in user permission
|
||||
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
|
||||
|
||||
// finally call parent
|
||||
parent::run();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue