Skip to content

Commit

Permalink
Clean up contribution tab templates and add processor to recurring co…
Browse files Browse the repository at this point in the history
…ntribution list
  • Loading branch information
mattwire committed Feb 20, 2018
1 parent 9596897 commit e5b17ac
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
8 changes: 5 additions & 3 deletions templates/CRM/Contribute/Form/Selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
{include file="CRM/common/pager.tpl" location="top"}

{strip}
<div class="description">
{ts}Click arrow to view payment details.{/ts}
</div>
<div class="crm-contact-contribute-contributions">
<table class="selector row-highlight">
<thead class="sticky">
<tr>
Expand All @@ -45,9 +49,6 @@
</tr>
</thead>

<p class="description">
{ts}Click arrow to view payment details.{/ts}
</p>
{counter start=0 skip=1 print=false}
{foreach from=$rows item=row}
<tr id="rowid{$row.contribution_id}" class="{cycle values="odd-row,even-row"} {if $row.cancel_date} cancelled{/if} crm-contribution_{$row.contribution_id}">
Expand Down Expand Up @@ -107,6 +108,7 @@
{/foreach}

</table>
</div>
{/strip}

{include file="CRM/common/pager.tpl" location="bottom"}
Expand Down
4 changes: 3 additions & 1 deletion templates/CRM/Contribute/Page/ContributionRecur.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
<th scope="col">{ts}Start Date{/ts}</th>
<th scope="col">{ts}Installments{/ts}</th>
<th scope="col">{ts}Status{/ts}</th>
<th scope="col">&nbsp;</th>
<th scope="col">{ts}Processor{/ts}</th>
<th scope="col">&nbsp;</th>
</tr>

{foreach from=$recurRows item=row}
Expand All @@ -83,6 +84,7 @@
<td>{$row.start_date|crmDate}</td>
<td>{$row.installments}</td>
<td>{$row.contribution_status}</td>
<td>{$row.payment_processor}</td>
<td>
{$row.action|replace:'xx':$row.recurId}
</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Contribute/Page/ContributionTotals.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
+--------------------------------------------------------------------+
*}
{*Table displays contribution totals for a contact or search result-set *}
{if $annual.count OR $contributionSummary}
{if $annual.count OR $contributionSummary.total.count OR $contributionSummary.cancel.count OR $contributionSummary.soft_credit.count}
<table class="form-layout-compressed">

{if $annual.count}
Expand Down
21 changes: 9 additions & 12 deletions templates/CRM/Contribute/Page/Tab.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{elseif $action eq 4}
{include file="CRM/Contribute/Form/ContributionView.tpl"}
{else}
<div class="view-content">
<div class="contact-summary-contribute-tab view-content">
<div class="help">
{if $permission EQ 'edit'}
{capture assign=newContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=contribution"}{/capture}
Expand All @@ -52,13 +52,12 @@
{/if}
<br /><br />
</div>
<div class='clear'> </div>
<div class='clear'></div>
{/if}


{if $rows}
{include file="CRM/Contribute/Page/ContributionTotals.tpl" mode="view"}
<p> </p>
<div class='clear'></div>
{include file="CRM/Contribute/Form/Selector.tpl"}
{else}
<div class="messages status no-popup">
Expand All @@ -68,19 +67,17 @@
{/if}

{if $recur}
<div class="solid-border-top">
<br /><label>{ts 1=$displayName}Recurring Contributions{/ts}</label>
</div>
<div class="crm-block crm-contact-contribute-recur">
<h3>{ts}Recurring Contributions{/ts}</h3>
{include file="CRM/Contribute/Page/ContributionRecur.tpl"}
</div>
{/if}

{if $softCredit}
<div class="solid-border-top">
<br />
<div class="label">{ts}Soft credits{/ts} {help id="id-soft_credit"}</div>
<div class="spacer"></div>
</div>
<div class="crm-block crm-contact-contribute-softcredit">
<h3>{ts}Soft credits{/ts} {help id="id-soft_credit"}</h3>
{include file="CRM/Contribute/Page/ContributionSoft.tpl"}
</div>
{/if}
</div>
{/if}

0 comments on commit e5b17ac

Please sign in to comment.