From: Pradeep Nayak Date: Wed, 18 Feb 2015 22:37:29 +0000 (+0530) Subject: --CRM-15989, Added code to show (deceased) for Contact taged as deceased X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7d3ddae6cacbc132226422dd8dba4909c7a37696;p=civicrm-core.git --CRM-15989, Added code to show (deceased) for Contact taged as deceased --- diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 86247c0dc4..69ccda51da 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -196,7 +196,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { if ($this->_contactId) { $defaults = array(); $params = array('id' => $this->_contactId); - $returnProperities = array('id', 'contact_type', 'contact_sub_type', 'modified_date'); + $returnProperities = array('id', 'contact_type', 'contact_sub_type', 'modified_date', 'is_deceased'); CRM_Core_DAO::commonRetrieve('CRM_Contact_DAO_Contact', $params, $defaults, $returnProperities); if (empty($defaults['id'])) { @@ -213,6 +213,10 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { } $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId); + if ($defaults['is_deceased']) { + $displayName .= ' (deceased)'; + } + $displayName = ts('Edit %1', array(1 => $displayName)); // Check if this is default domain contact CRM-10482 diff --git a/CRM/Contact/Page/View.php b/CRM/Contact/Page/View.php index 433601177b..26f97bd21f 100644 --- a/CRM/Contact/Page/View.php +++ b/CRM/Contact/Page/View.php @@ -322,6 +322,7 @@ class CRM_Contact_Page_View extends CRM_Core_Page { $contactDetails[$contactId] = array( 'displayName' => $displayName, 'contactImage' => $contactImage, + 'isDeceased' => (bool) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'is_deceased'), ); } else { @@ -331,6 +332,10 @@ class CRM_Contact_Page_View extends CRM_Core_Page { // set page title $title = "{$contactImage} {$displayName}"; + if ($contactDetails[$contactId]['isDeceased']) { + $title .= ' (deceased)'; + } + if ($isDeleted) { $title = "{$title}"; } diff --git a/templates/CRM/Contact/Page/Inline/Demographics.tpl b/templates/CRM/Contact/Page/Inline/Demographics.tpl index e76ac87f5b..fa2b12c977 100644 --- a/templates/CRM/Contact/Page/Inline/Demographics.tpl +++ b/templates/CRM/Contact/Page/Inline/Demographics.tpl @@ -23,7 +23,7 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -
+
{if $permission EQ 'edit'}