From: Matthew Wire (MJW Consulting) Date: Fri, 14 Sep 2018 10:09:24 +0000 (+0100) Subject: Show contact name on recurring contribution view and improve consistency with Contrib... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0e52367e4fb500c0471caa701593c9a28d59dac4;p=civicrm-core.git Show contact name on recurring contribution view and improve consistency with Contribution view --- diff --git a/CRM/Contribute/Page/ContributionRecur.php b/CRM/Contribute/Page/ContributionRecur.php index dea041f3b6..fa9b0daae2 100644 --- a/CRM/Contribute/Page/ContributionRecur.php +++ b/CRM/Contribute/Page/ContributionRecur.php @@ -83,6 +83,17 @@ class CRM_Contribute_Page_ContributionRecur extends CRM_Core_Page { CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $contributionRecur['id']); $this->assign('recur', $contributionRecur); + + $displayName = CRM_Contact_BAO_Contact::displayName($contributionRecur['contact_id']); + $this->assign('displayName', $displayName); + + // Check if this is default domain contact CRM-10482 + if (CRM_Contact_BAO_Contact::checkDomainContact($contributionRecur['contact_id'])) { + $displayName .= ' (' . ts('default organization') . ')'; + } + + // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container + CRM_Utils_System::setTitle(ts('View Recurring Contribution from') . ' ' . $displayName); } public function preProcess() { diff --git a/templates/CRM/Contribute/Page/ContributionRecur.tpl b/templates/CRM/Contribute/Page/ContributionRecur.tpl index 6f8371aee9..e838277b1c 100644 --- a/templates/CRM/Contribute/Page/ContributionRecur.tpl +++ b/templates/CRM/Contribute/Page/ContributionRecur.tpl @@ -33,9 +33,12 @@ {ts}This is a TEST transaction{/ts} {/if} -

{ts}View Recurring Payment{/ts}

+ + + +
{ts}From{/ts}{$displayName}
{ts}Amount{/ts}{$recur.amount|crmMoney:$recur.currency}{if $is_test} ({ts}test{/ts}){/if}
{ts}Frequency{/ts}every {$recur.frequency_interval} {$recur.frequency_unit}
{ts}Installments{/ts}{$recur.installments}