Commit | Line | Data |
---|---|---|
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-contribute-userdashboard-pre"} |
27 | {/crmRegion} | |
6a488035 TO |
28 | <div class="view-content"> |
29 | {if $contribute_rows} | |
30 | {strip} | |
09f7a07d GC |
31 | <table class="selector"> |
32 | <tr class="columnheader"> | |
33 | <th>{ts}Total Amount{/ts}</th> | |
34 | <th>{ts}Financial Type{/ts}</th> | |
35 | <th>{ts}Received date{/ts}</th> | |
36 | <th>{ts}Receipt Sent{/ts}</th> | |
37 | <th>{ts}Status{/ts}</th> | |
03b412ae | 38 | {if $invoicing && $invoices} |
58466af1 | 39 | <th></th> |
40 | {/if} | |
41 | {if $invoicing && $defaultInvoicePage} | |
42 | <th></th> | |
09f7a07d GC |
43 | {/if} |
44 | </tr> | |
45 | ||
46 | {foreach from=$contribute_rows item=row} | |
47 | <tr id='rowid{$row.contribution_id}' | |
48 | class="{cycle values="odd-row,even-row"}{if $row.cancel_date} disabled{/if}"> | |
49 | <td>{$row.total_amount|crmMoney:$row.currency} {if $row.amount_level } - {$row.amount_level} {/if} | |
50 | {if $row.contribution_recur_id} | |
51 | <br/> | |
52 | {ts}(Recurring Contribution){/ts} | |
a664e7b3 | 53 | {/if} |
5920ead3 | 54 | </td> |
09f7a07d GC |
55 | <td>{$row.financial_type}</td> |
56 | <td>{$row.receive_date|truncate:10:''|crmDate}</td> | |
57 | <td>{$row.receipt_date|truncate:10:''|crmDate}</td> | |
58 | <td>{$row.contribution_status}</td> | |
59 | {if $invoicing && $invoices} | |
9ece4458 GC |
60 | <td> |
61 | {assign var='id' value=$row.contribution_id} | |
62 | {assign var='contact_id' value=$row.contact_id} | |
63 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id"} | |
64 | {if call_user_func(array('CRM_Core_Permission','check'), 'view my invoices') OR call_user_func(array('CRM_Core_Permission','check'), 'access CiviContribute')} | |
58466af1 | 65 | <a class="button no-popup nowrap" |
9ece4458 | 66 | href="{crmURL p='civicrm/contribute/invoice' q=$urlParams}"> |
d2f7ffaa | 67 | <i class="crm-i fa-print"></i> |
7a7cebe3 | 68 | {if $row.contribution_status_name != 'Refunded' && $row.contribution_status_name != 'Cancelled' } |
9ece4458 GC |
69 | <span>{ts}Print Invoice{/ts}</span> |
70 | {else} | |
71 | <span>{ts}Print Invoice and Credit Note{/ts}</span> | |
09f7a07d | 72 | {/if} |
9ece4458 | 73 | </a> |
09f7a07d | 74 | {/if} |
9ece4458 | 75 | </td> |
09f7a07d | 76 | {/if} |
7a7cebe3 | 77 | {if $defaultInvoicePage && $row.contribution_status_name == 'Pending' } |
58466af1 | 78 | <td> |
e8401861 JP |
79 | {assign var='checksum_url' value=""} |
80 | {if $userChecksum} | |
81 | {assign var='checksum_url' value="&cid=$contactId&cs=$userChecksum"} | |
82 | {/if} | |
58466af1 | 83 | {assign var='id' value=$row.contribution_id} |
e8401861 | 84 | {capture assign=payNowLink}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$defaultInvoicePage`&ccid=`$id`$checksum_url"}{/capture} |
58466af1 | 85 | <a class="button" href="{$payNowLink}"><span class='nowrap'>{ts}Pay Now{/ts}</span></a> |
86 | </td> | |
87 | {/if} | |
09f7a07d GC |
88 | </tr> |
89 | {/foreach} | |
90 | </table> | |
6a488035 TO |
91 | {/strip} |
92 | {if $contributionSummary.total.count gt 12} | |
93 | {ts}Contact us for information about contributions prior to those listed above.{/ts} | |
94 | {/if} | |
95 | {else} | |
96 | <div class="messages status no-popup"> | |
09f7a07d GC |
97 | <div class="icon inform-icon"></div> |
98 | {ts}There are no contributions on record for you.{/ts} | |
6a488035 TO |
99 | </div> |
100 | {/if} | |
101 | ||
102 | ||
103 | {if $honor} | |
104 | {if $honorRows} | |
105 | {strip} | |
f6eedce7 | 106 | <div class="help"> |
09f7a07d GC |
107 | {ts}Contributions made in your honor{/ts}: |
108 | </div> | |
109 | <table class="selector"> | |
110 | <tr class="columnheader"> | |
111 | <th>{ts}Contributor{/ts}</th> | |
112 | <th>{ts}Amount{/ts}</th> | |
113 | <th>{ts}Type{/ts}</th> | |
114 | <th>{ts}Financial Type{/ts}</th> | |
115 | <th>{ts}Received date{/ts}</th> | |
116 | <th>{ts}Receipt Sent{/ts}</th> | |
117 | <th>{ts}Status{/ts}</th> | |
6a488035 | 118 | </tr> |
09f7a07d GC |
119 | {foreach from=$honorRows item=row} |
120 | <tr id='rowid{$row.honorId}' class="{cycle values="odd-row,even-row"}"> | |
121 | <td><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$row.honorId`"}" | |
122 | id="view_contact">{$row.display_name}</a></td> | |
123 | <td>{$row.amount}</td> | |
124 | <td>{$row.honor_type}</td> | |
125 | <td>{$row.type}</td> | |
126 | <td>{$row.receive_date|truncate:10:''|crmDate}</td> | |
127 | <td>{$row.receipt_date|truncate:10:''|crmDate}</td> | |
128 | <td>{$row.contribution_status}</td> | |
129 | </tr> | |
130 | {/foreach} | |
131 | </table> | |
6a488035 TO |
132 | {/strip} |
133 | {/if} | |
134 | {/if} | |
135 | ||
136 | {if $recur} | |
137 | {if $recurRows} | |
138 | {strip} | |
09f7a07d GC |
139 | <div><label>{ts}Recurring Contribution(s){/ts}</label></div> |
140 | <table class="selector"> | |
141 | <tr class="columnheader"> | |
142 | <th>{ts}Terms:{/ts}</th> | |
143 | <th>{ts}Status{/ts}</th> | |
144 | <th>{ts}Installments{/ts}</th> | |
145 | <th>{ts}Created{/ts}</th> | |
146 | <th></th> | |
6a488035 | 147 | </tr> |
09f7a07d GC |
148 | {foreach from=$recurRows item=row key=id} |
149 | <tr class="{cycle values="odd-row,even-row"}"> | |
150 | <td><label>{$recurRows.$id.amount|crmMoney}</label> | |
151 | every {$recurRows.$id.frequency_interval} {$recurRows.$id.frequency_unit} | |
152 | for {$recurRows.$id.installments} installments | |
153 | </td> | |
154 | <td>{$recurRows.$id.recur_status}</td> | |
155 | <td>{if $recurRows.$id.completed}<a href="{$recurRows.$id.link}">{$recurRows.$id.completed} | |
156 | /{$recurRows.$id.installments}</a> | |
157 | {else}0/{$recurRows.$id.installments} {/if}</td> | |
158 | <td>{$recurRows.$id.create_date|crmDate}</td> | |
159 | <td>{$recurRows.$id.action|replace:'xx':$recurRows.id}</td> | |
160 | </tr> | |
161 | {/foreach} | |
162 | </table> | |
6a488035 TO |
163 | {/strip} |
164 | {/if} | |
165 | {/if} | |
166 | </div> | |
6b3ac136 | 167 | {crmRegion name="crm-contribute-userdashboard-post"} |
e03655af | 168 | {/crmRegion} |