| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.7 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2017 | |
| 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 | {crmRegion name="crm-contribute-pcp-userdashboard-pre"} |
| 27 | {/crmRegion} |
| 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> |
| 40 | <th></th> |
| 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> |
| 49 | <td>{$row.action|replace:'xx':$row.pcpId}</td> |
| 50 | </tr> |
| 51 | {/foreach} |
| 52 | </table> |
| 53 | {/strip} |
| 54 | </div> |
| 55 | {else} |
| 56 | <div class="messages status no-popup"> |
| 57 | <div class="icon inform-icon"></div> |
| 58 | {ts}You do not have any active Personal Campaign pages.{/ts} |
| 59 | </div> |
| 60 | {/if} |
| 61 | |
| 62 | |
| 63 | {if $pcpBlock} |
| 64 | {strip} |
| 65 | {if $pcpInfo} {* Change layout and text if they already have a PCP. *} |
| 66 | <br /> |
| 67 | <div class="float-right" style="width: 65%"> |
| 68 | <div>{ts}Create a Personal Campaign Page for another campaign:{/ts}</div> |
| 69 | {else} |
| 70 | <div style="width: 65%"> |
| 71 | <div class="label">{ts}Become a supporter by creating a Personal Campaign Page:{/ts}</div> |
| 72 | {/if} |
| 73 | <table class="selector"> |
| 74 | <tr class="columnheader"> |
| 75 | <th>{ts}Campaign{/ts}</th> |
| 76 | <th>{ts}Ends{/ts}</th> |
| 77 | <th></th> |
| 78 | </tr> |
| 79 | |
| 80 | {foreach from=$pcpBlock item=row} |
| 81 | <tr class="{cycle values="odd-row,even-row"}"> |
| 82 | <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> |
| 83 | <td>{if $row.end_date}{$row.end_date|truncate:10:''|crmDate}{else}({ts}ongoing{/ts}){/if}</td> |
| 84 | <td>{$row.action|replace:'xx':$row.pageId}</td> |
| 85 | </tr> |
| 86 | {/foreach} |
| 87 | </table> |
| 88 | {/strip} |
| 89 | </div> |
| 90 | {/if} |
| 91 | |
| 92 | </div> |
| 93 | {crmRegion name="crm-contribute-pcp-userdashboard-post"} |
| 94 | {/crmRegion} |