Styling and minor changes
authormonishdeb <monish.deb@webaccess.co.in>
Fri, 9 May 2014 14:02:47 +0000 (19:32 +0530)
committermonishdeb <monish.deb@webaccess.co.in>
Fri, 9 May 2014 14:02:47 +0000 (19:32 +0530)
CRM/Member/Page/Tab.php
templates/CRM/Member/Form/Membership.tpl
templates/CRM/Member/Form/MembershipView.tpl

index 412850068e140b01cfc1247c2885e55d9bb8c781..2aad0d971cf983622c767b8f78fc7262dba252e7 100644 (file)
@@ -253,6 +253,16 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
       if (CRM_Core_Permission::access('CiviContribute')) {
         $this->assign('accessContribution', TRUE);
         CRM_Member_Page_Tab::associatedContribution($this->_contactId, $this->_id);
+
+        //show associated soft credit when contribution payment is paid by different person in edit mode
+        if ($this->_id && $this->_contactId) {
+          $filter = " AND cc.id IN (SELECT contribution_id FROM civicrm_membership_payment WHERE membership_id = {$this->_id})";
+          $softCreditList = CRM_Contribute_BAO_ContributionSoft::getSoftContributionList($this->_contactId, $filter);
+          if (!empty($softCreditList)) {
+            $this->assign('softCredit', TRUE);
+            $this->assign('softCreditRows', $softCreditList);
+          }
+        }
       }
     }
 
index 3e21138fe3933d537c7a3af3114a0f1780da31e9..3213ac2e61c297f6f8a2512c2fafcc0259927e4b 100644 (file)
       </script>
       {/literal}
       {if $accessContribution and $action eq 2 and $rows.0.contribution_id}
-        <fieldset>
-        {include file="CRM/Contribute/Form/Selector.tpl" context="Search"}
-        </fieldset>
+        <div class="crm-accordion-wrapper">
+          <div class="crm-accordion-header">Related Contributions</div>
+          <div class="crm-accordion-body">{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}</div>
+        </div>
+      {/if}
+      {if $softCredit}
+        <div class="crm-accordion-wrapper">
+          <div class="crm-accordion-header">Related Soft Contributions</div>
+          <div class="crm-accordion-body">{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}</div>
+       </div>
       {/if}
     {/if}
 
index 2e26bb1aaf086d985bfb1563efb0df0e14bd6828..70d0ea0ca2f2924b09e6ef177b3c18e41cbaeb87 100644 (file)
     {include file="CRM/Custom/Page/CustomDataView.tpl"}
 
     {if $accessContribution and $rows.0.contribution_id}
-        {include file="CRM/Contribute/Form/Selector.tpl" context="Search"}
+        <div class="crm-accordion-wrapper">
+              <div class="crm-accordion-header">Related Contributions</div>
+              <div class="crm-accordion-body">{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}</div>
+        </div>
     {/if}
 
     {if $softCredit}
-        {include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}
+        <div class="crm-accordion-wrapper">
+            <div class="crm-accordion-header">Related Soft Contributions</div>
+            <div class="crm-accordion-body">{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}</div>
+        </div>
     {/if}
 
     {if $has_related}