Merge pull request #17313 from civicrm/5.26
[civicrm-core.git] / templates / CRM / Pledge / Page / UserDashboard.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
6b3ac136
C
10{crmRegion name="crm-pledge-userdashboard-pre"}
11{/crmRegion}
6a488035
TO
12{if $context eq 'user'}
13<div class="view-content">
14{if $pledge_rows}
15{strip}
16<table class="selector">
17 <tr class="columnheader">
18 {foreach from=$pledge_columnHeaders item=header}
19 <th>{$header.name}</th>
20 {/foreach}
21 </tr>
22 {counter start=0 skip=1 print=false}
23 {foreach from=$pledge_rows item=row}
24 <tr id='rowid{$row.pledge_id}' class="{cycle values="odd-row,even-row"} {if $row.pledge_status_name eq 'Overdue' } disabled{/if} crm-pledge crm-pledge_{$row.pledge_id} ">
25 <td class="crm-pledge-pledge_amount">{$row.pledge_amount|crmMoney:$row.pledge_currency}</td>
26 <td class="crm-pledge-pledge_total_paid">{$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
27 <td class="crm-pledge-pledge_amount">{$row.pledge_amount-$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
6d3864ef 28 <td class="crm-pledge-pledge_contribution_type">{$row.pledge_financial_type}</td>
6a488035
TO
29 <td class="crm-pledge-pledge_create_date">{$row.pledge_create_date|truncate:10:''|crmDate}</td>
30 <td class="crm-pledge-pledge_next_pay_date">{$row.pledge_next_pay_date|truncate:10:''|crmDate}</td>
31 <td class="crm-pledge-pledge_next_pay_amount">{$row.pledge_next_pay_amount|crmMoney:$row.pledge_currency}</td>
32 <td class="crm-pledge-pledge_status crm-pledge-pledge_status_{$row.pledge_status}">{$row.pledge_status}</td>
4ded03d2
JP
33 {if !$userChecksum}
34 <td>
35 {if $row.pledge_contribution_page_id and ($row.pledge_status_name neq 'Completed') and ( $row.contact_id eq $loggedUserID ) }
36 <a href="{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$row.pledge_contribution_page_id`&pledgeId=`$row.pledge_id`"}">{ts}Make Payment{/ts}</a><br/>
37 {/if}
38 <a class="crm-expand-row" title="{ts}view payments{/ts}" href="{crmURL p='civicrm/pledge/payment' q="action=browse&context=`$context`&pledgeId=`$row.pledge_id`&cid=`$row.contact_id`"}">{ts}Payments{/ts}</a>
39 </td>
40 {/if}
6a488035 41 </tr>
6a488035
TO
42 {/foreach}
43</table>
44{/strip}
02bc4449 45{crmScript file='js/crm.expandRow.js'}
6a488035
TO
46{else}
47<div class="messages status no-popup">
48 <div class="icon inform-icon"></div>
49 {ts}There are no Pledges for your record.{/ts}
50 </div>
51{/if}
52{*pledge row if*}
53
54{*Display honor block*}
55{if $pledgeHonor && $pledgeHonorRows}
56{strip}
f6eedce7 57<div class="help">
6a488035
TO
58 <p>{ts}Pledges made in your honor.{/ts}</p>
59</div>
60 <table class="selector">
61 <tr class="columnheader">
62 <th>{ts}Pledger{/ts}</th>
63 <th>{ts}Amount{/ts}</th>
8381af80 64 <th>{ts}Type{/ts}</th>
65 <th>{ts}Financial Type{/ts}</th>
6a488035
TO
66 <th>{ts}Create date{/ts}</th>
67 <th>{ts}Acknowledgment Sent{/ts}</th>
68 <th>{ts}Acknowledgment Date{/ts}</th>
69 <th>{ts}Status{/ts}</th>
70 <th></th>
71 </tr>
72 {foreach from=$pledgeHonorRows item=row}
73 <tr id='rowid{$row.honorId}' class="{cycle values="odd-row,even-row"}">
74 <td class="crm-pledge-display_name"><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$row.honorId`"}" id="view_contact">{$row.display_name}</a></td>
75 <td class="crm-pledge-amount">{$row.amount|crmMoney:$row.pledge_currency}</td>
8381af80 76 <td class="crm-pledge-honor-type">{$row.honor_type}</td>
6a488035
TO
77 <td class="crm-pledge-type">{$row.type}</td>
78 <td class="crm-pledge-create_date">{$row.create_date|truncate:10:''|crmDate}</td>
79 <td align="center">{if $row.acknowledge_date}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
80 <td class="crm-pledge-acknowledge_date">{$row.acknowledge_date|truncate:10:''|crmDate}</td>
81 <td class="crm-pledge-status">{$row.status}</td>
82 </tr>
83 {/foreach}
84</table>
85{/strip}
86{/if}
87</div>
88{* main if close*}
89{/if}
6b3ac136 90{crmRegion name="crm-pledge-userdashboard-post"}
1188c7a8 91{/crmRegion}