Merge pull request #11772 from michaelmcandrew/CRM-21821-respect-nav-item-weight
[civicrm-core.git] / templates / CRM / Pledge / Page / UserDashboard.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
8c9251b3 5 | Copyright CiviCRM LLC (c) 2004-2018 |
6a488035
TO
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25*}
6b3ac136
C
26{crmRegion name="crm-pledge-userdashboard-pre"}
27{/crmRegion}
6a488035
TO
28{if $context eq 'user'}
29<div class="view-content">
30{if $pledge_rows}
31{strip}
32<table class="selector">
33 <tr class="columnheader">
34 {foreach from=$pledge_columnHeaders item=header}
35 <th>{$header.name}</th>
36 {/foreach}
37 </tr>
38 {counter start=0 skip=1 print=false}
39 {foreach from=$pledge_rows item=row}
40 <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} ">
41 <td class="crm-pledge-pledge_amount">{$row.pledge_amount|crmMoney:$row.pledge_currency}</td>
42 <td class="crm-pledge-pledge_total_paid">{$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
43 <td class="crm-pledge-pledge_amount">{$row.pledge_amount-$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
6d3864ef 44 <td class="crm-pledge-pledge_contribution_type">{$row.pledge_financial_type}</td>
6a488035
TO
45 <td class="crm-pledge-pledge_create_date">{$row.pledge_create_date|truncate:10:''|crmDate}</td>
46 <td class="crm-pledge-pledge_next_pay_date">{$row.pledge_next_pay_date|truncate:10:''|crmDate}</td>
47 <td class="crm-pledge-pledge_next_pay_amount">{$row.pledge_next_pay_amount|crmMoney:$row.pledge_currency}</td>
48 <td class="crm-pledge-pledge_status crm-pledge-pledge_status_{$row.pledge_status}">{$row.pledge_status}</td>
02bc4449
CW
49 <td>
50 {if $row.pledge_contribution_page_id and ($row.pledge_status_name neq 'Completed') and ( $row.contact_id eq $loggedUserID ) }
51 <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/>
52 {/if}
d17f7fea 53 <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>
6a488035
TO
54 </td>
55 </tr>
6a488035
TO
56 {/foreach}
57</table>
58{/strip}
02bc4449 59{crmScript file='js/crm.expandRow.js'}
6a488035
TO
60{else}
61<div class="messages status no-popup">
62 <div class="icon inform-icon"></div>
63 {ts}There are no Pledges for your record.{/ts}
64 </div>
65{/if}
66{*pledge row if*}
67
68{*Display honor block*}
69{if $pledgeHonor && $pledgeHonorRows}
70{strip}
f6eedce7 71<div class="help">
6a488035
TO
72 <p>{ts}Pledges made in your honor.{/ts}</p>
73</div>
74 <table class="selector">
75 <tr class="columnheader">
76 <th>{ts}Pledger{/ts}</th>
77 <th>{ts}Amount{/ts}</th>
8381af80 78 <th>{ts}Type{/ts}</th>
79 <th>{ts}Financial Type{/ts}</th>
6a488035
TO
80 <th>{ts}Create date{/ts}</th>
81 <th>{ts}Acknowledgment Sent{/ts}</th>
82 <th>{ts}Acknowledgment Date{/ts}</th>
83 <th>{ts}Status{/ts}</th>
84 <th></th>
85 </tr>
86 {foreach from=$pledgeHonorRows item=row}
87 <tr id='rowid{$row.honorId}' class="{cycle values="odd-row,even-row"}">
88 <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>
89 <td class="crm-pledge-amount">{$row.amount|crmMoney:$row.pledge_currency}</td>
8381af80 90 <td class="crm-pledge-honor-type">{$row.honor_type}</td>
6a488035
TO
91 <td class="crm-pledge-type">{$row.type}</td>
92 <td class="crm-pledge-create_date">{$row.create_date|truncate:10:''|crmDate}</td>
93 <td align="center">{if $row.acknowledge_date}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
94 <td class="crm-pledge-acknowledge_date">{$row.acknowledge_date|truncate:10:''|crmDate}</td>
95 <td class="crm-pledge-status">{$row.status}</td>
96 </tr>
97 {/foreach}
98</table>
99{/strip}
100{/if}
101</div>
102{* main if close*}
103{/if}
6b3ac136
C
104{crmRegion name="crm-pledge-userdashboard-post"}
105{/crmRegion}