Merge pull request #12457 from omarabuhussein/dev/core#253
[civicrm-core.git] / templates / CRM / Contribute / Page / PcpUserDashboard.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-contribute-pcp-userdashboard-pre"}
27{/crmRegion}
6a488035
TO
28<div class="view-content">
29
30{if $pcpInfo}
31<div id="ltype">
32{strip}
33
34<table class="selector">
35 <tr class="columnheader">
36 <th>{ts}Your Page{/ts}</th>
37 <th>{ts}In Support of{/ts}</th>
38 <th>{ts}Campaign Ends{/ts}</th>
39 <th>{ts}Status{/ts}</th>
4ded03d2 40 {if !$userChecksum} <th></th> {/if}
6a488035
TO
41 </tr>
42
43 {foreach from=$pcpInfo item=row}
44 <tr class="{cycle values="odd-row,even-row"} {$row.class}">
45 <td class="bold"><a href="{crmURL p='civicrm/pcp/info' q="reset=1&id=`$row.pcpId`" a=1}" title="{ts}Preview your Personal Campaign Page{/ts}">{$row.pcpTitle}</a></td>
46 <td>{$row.pageTitle}</td>
47 <td>{if $row.end_date}{$row.end_date|truncate:10:''|crmDate}{else}({ts}ongoing{/ts}){/if}</td>
48 <td>{$row.pcpStatus}</td>
4ded03d2
JP
49 {if !$userChecksum}
50 <td>{$row.action|replace:'xx':$row.pcpId}</td>
51 {/if}
6a488035
TO
52 </tr>
53 {/foreach}
54</table>
55{/strip}
56</div>
57{else}
58<div class="messages status no-popup">
59 <div class="icon inform-icon"></div>
60 {ts}You do not have any active Personal Campaign pages.{/ts}
61</div>
62{/if}
63
6a488035
TO
64{if $pcpBlock}
65{strip}
66{if $pcpInfo} {* Change layout and text if they already have a PCP. *}
67 <br />
68 <div class="float-right" style="width: 65%">
69 <div>{ts}Create a Personal Campaign Page for another campaign:{/ts}</div>
70{else}
71 <div style="width: 65%">
72 <div class="label">{ts}Become a supporter by creating a Personal Campaign Page:{/ts}</div>
73{/if}
74<table class="selector">
75 <tr class="columnheader">
76 <th>{ts}Campaign{/ts}</th>
77 <th>{ts}Ends{/ts}</th>
78 <th></th>
79 </tr>
80
81 {foreach from=$pcpBlock item=row}
82 <tr class="{cycle values="odd-row,even-row"}">
2a15a371 83 <td>{if $row.component eq 'contribute'}<a href="{crmURL p='civicrm/contribute/transact' q="id=`$row.pageId`&reset=1"}" title="{ts}View campaign page{/ts}">{else}<a href="{crmURL p='civicrm/event/register' q="id=`$row.pageId`&reset=1"}" title="{ts}View campaign page{/ts}">{/if}{$row.pageTitle}</a></td>
6a488035
TO
84 <td>{if $row.end_date}{$row.end_date|truncate:10:''|crmDate}{else}({ts}ongoing{/ts}){/if}</td>
85 <td>{$row.action|replace:'xx':$row.pageId}</td>
86 </tr>
87 {/foreach}
88</table>
89{/strip}
90</div>
91{/if}
92
93</div>
6b3ac136
C
94{crmRegion name="crm-contribute-pcp-userdashboard-post"}
95{/crmRegion}