From 0e52367e4fb500c0471caa701593c9a28d59dac4 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Fri, 14 Sep 2018 11:09:24 +0100 Subject: [PATCH] Show contact name on recurring contribution view and improve consistency with Contribution view --- CRM/Contribute/Page/ContributionRecur.php | 11 +++++++++++ templates/CRM/Contribute/Page/ContributionRecur.tpl | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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}

+ + + + -- 2.25.1
{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}