e5a3dfaae11f1b467affb45ca6006fdf83d77ac0
[civicrm-core.git] / templates / CRM / Pledge / Page / UserDashboard.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
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 *}
26 {if $context eq 'user'}
27 <div class="view-content">
28 {if $pledge_rows}
29 {strip}
30 <table class="selector">
31 <tr class="columnheader">
32 {foreach from=$pledge_columnHeaders item=header}
33 <th>{$header.name}</th>
34 {/foreach}
35 </tr>
36 {counter start=0 skip=1 print=false}
37 {foreach from=$pledge_rows item=row}
38 <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} ">
39 <td class="crm-pledge-pledge_amount">{$row.pledge_amount|crmMoney:$row.pledge_currency}</td>
40 <td class="crm-pledge-pledge_total_paid">{$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
41 <td class="crm-pledge-pledge_amount">{$row.pledge_amount-$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
42 <td class="crm-pledge-pledge_contribution_type">{$row.pledge_financial_type}</td>
43 <td class="crm-pledge-pledge_create_date">{$row.pledge_create_date|truncate:10:''|crmDate}</td>
44 <td class="crm-pledge-pledge_next_pay_date">{$row.pledge_next_pay_date|truncate:10:''|crmDate}</td>
45 <td class="crm-pledge-pledge_next_pay_amount">{$row.pledge_next_pay_amount|crmMoney:$row.pledge_currency}</td>
46 <td class="crm-pledge-pledge_status crm-pledge-pledge_status_{$row.pledge_status}">{$row.pledge_status}</td>
47 <td>
48 {if $row.pledge_contribution_page_id and ($row.pledge_status_name neq 'Completed') and ( $row.contact_id eq $loggedUserID ) }
49 <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/>
50 {/if}
51 <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>
52 </td>
53 </tr>
54 {/foreach}
55 </table>
56 {/strip}
57 {crmScript file='js/crm.expandRow.js'}
58 {else}
59 <div class="messages status no-popup">
60 <div class="icon inform-icon"></div>
61 {ts}There are no Pledges for your record.{/ts}
62 </div>
63 {/if}
64 {*pledge row if*}
65
66 {*Display honor block*}
67 {if $pledgeHonor && $pledgeHonorRows}
68 {strip}
69 <div class="help">
70 <p>{ts}Pledges made in your honor.{/ts}</p>
71 </div>
72 <table class="selector">
73 <tr class="columnheader">
74 <th>{ts}Pledger{/ts}</th>
75 <th>{ts}Amount{/ts}</th>
76 <th>{ts}Type{/ts}</th>
77 <th>{ts}Financial Type{/ts}</th>
78 <th>{ts}Create date{/ts}</th>
79 <th>{ts}Acknowledgment Sent{/ts}</th>
80 <th>{ts}Acknowledgment Date{/ts}</th>
81 <th>{ts}Status{/ts}</th>
82 <th></th>
83 </tr>
84 {foreach from=$pledgeHonorRows item=row}
85 <tr id='rowid{$row.honorId}' class="{cycle values="odd-row,even-row"}">
86 <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>
87 <td class="crm-pledge-amount">{$row.amount|crmMoney:$row.pledge_currency}</td>
88 <td class="crm-pledge-honor-type">{$row.honor_type}</td>
89 <td class="crm-pledge-type">{$row.type}</td>
90 <td class="crm-pledge-create_date">{$row.create_date|truncate:10:''|crmDate}</td>
91 <td align="center">{if $row.acknowledge_date}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
92 <td class="crm-pledge-acknowledge_date">{$row.acknowledge_date|truncate:10:''|crmDate}</td>
93 <td class="crm-pledge-status">{$row.status}</td>
94 </tr>
95 {/foreach}
96 </table>
97 {/strip}
98 {/if}
99 </div>
100 {* main if close*}
101 {/if}