Merge pull request #15137 from andrewpthompson/joomla4-header-css
[civicrm-core.git] / templates / CRM / Pledge / Page / UserDashboard.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
6b83d5bd 5 | Copyright CiviCRM LLC (c) 2004-2019 |
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>
4ded03d2
JP
49 {if !$userChecksum}
50 <td>
51 {if $row.pledge_contribution_page_id and ($row.pledge_status_name neq 'Completed') and ( $row.contact_id eq $loggedUserID ) }
52 <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/>
53 {/if}
54 <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>
55 </td>
56 {/if}
6a488035 57 </tr>
6a488035
TO
58 {/foreach}
59</table>
60{/strip}
02bc4449 61{crmScript file='js/crm.expandRow.js'}
6a488035
TO
62{else}
63<div class="messages status no-popup">
64 <div class="icon inform-icon"></div>
65 {ts}There are no Pledges for your record.{/ts}
66 </div>
67{/if}
68{*pledge row if*}
69
70{*Display honor block*}
71{if $pledgeHonor && $pledgeHonorRows}
72{strip}
f6eedce7 73<div class="help">
6a488035
TO
74 <p>{ts}Pledges made in your honor.{/ts}</p>
75</div>
76 <table class="selector">
77 <tr class="columnheader">
78 <th>{ts}Pledger{/ts}</th>
79 <th>{ts}Amount{/ts}</th>
8381af80 80 <th>{ts}Type{/ts}</th>
81 <th>{ts}Financial Type{/ts}</th>
6a488035
TO
82 <th>{ts}Create date{/ts}</th>
83 <th>{ts}Acknowledgment Sent{/ts}</th>
84 <th>{ts}Acknowledgment Date{/ts}</th>
85 <th>{ts}Status{/ts}</th>
86 <th></th>
87 </tr>
88 {foreach from=$pledgeHonorRows item=row}
89 <tr id='rowid{$row.honorId}' class="{cycle values="odd-row,even-row"}">
90 <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>
91 <td class="crm-pledge-amount">{$row.amount|crmMoney:$row.pledge_currency}</td>
8381af80 92 <td class="crm-pledge-honor-type">{$row.honor_type}</td>
6a488035
TO
93 <td class="crm-pledge-type">{$row.type}</td>
94 <td class="crm-pledge-create_date">{$row.create_date|truncate:10:''|crmDate}</td>
95 <td align="center">{if $row.acknowledge_date}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
96 <td class="crm-pledge-acknowledge_date">{$row.acknowledge_date|truncate:10:''|crmDate}</td>
97 <td class="crm-pledge-status">{$row.status}</td>
98 </tr>
99 {/foreach}
100</table>
101{/strip}
102{/if}
103</div>
104{* main if close*}
105{/if}
6b3ac136
C
106{crmRegion name="crm-pledge-userdashboard-post"}
107{/crmRegion}