Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21511 Add recurring contribution link to membership and contribution detail #11365

Merged

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Dec 4, 2017

Overview

Follow-on from CRM-21504. Add link to recurring contribution from membership detail and contribution detail.

Before

Not easy to see/access recurring contribution from membership detail/contribution detail.

After

(Note: screenshots are from a shoreditch theme so do not look perfect!)

Added "Recurring Contribution" line:
localhost_8000_civicrm_contact_view_membership_action view reset 1 cid 203 id 42 context membership selectedchild member

"Recurring contribution" is now a link:
localhost_8000_civicrm_contact_view_contribution


@mattwire
Copy link
Contributor Author

@monishdeb Do you have 5 minutes to review this one?

// Add recurring contribution
if (!empty($values['contribution_recur_id'])) {
$this->assign('recurContribution', $values['contribution_recur_id']);
}
Copy link
Member

@monishdeb monishdeb Jan 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwire I think you don't need to assign it to separate smarty variable, as below at L406 the $values array assigned to smarty. So in templates/CRM/Member/Form/MembershipView.tpl

 +     {if $contribution_recur_id}
 +          <tr>
 +            <td class="label">{ts}Recurring Contribution{/ts}</td>
 +            <td>
 +              <a class="crm-hover-button" href='{crmURL p="civicrm/contact/view/contributionrecur" q="reset=1&id=`$recurContribution`&cid=`$contactId`&context=contribution"}'>View Recurring Contribution</a>
 +            </td>
 +          </tr>
 +        {/if}

should work. What do you think?

@mattwire mattwire force-pushed the CRM-21511_recur_on_membership_detail branch from ba512ec to 4627f70 Compare January 17, 2018 11:51
@mattwire
Copy link
Contributor Author

@monishdeb Thanks, I've made the changes as you suggested and that works.

@colemanw colemanw merged commit 6b36e39 into civicrm:master Jan 18, 2018
@colemanw
Copy link
Member

Code looks good to me. It's a minimal change and @monishdeb also reiewed, so merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants