Merge pull request #12457 from omarabuhussein/dev/core#253
[civicrm-core.git] / templates / CRM / Contribute / Page / ContributionPage.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
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 {capture assign=newPageURL}{crmURL p='civicrm/admin/contribute/add' q='action=add&reset=1'}{/capture}
27 <div class="help">
28 {ts}CiviContribute allows you to create and maintain any number of Online Contribution Pages. You can create different pages for different programs or campaigns, and you can customize text, amounts, types of information collected from contributors, etc.{/ts} {help id="id-intro"}
29 </div>
30
31 {include file="CRM/Contribute/Form/SearchContribution.tpl"}
32 {if NOT ($action eq 1 or $action eq 2) }
33 <table class="form-layout-compressed">
34 <tr>
35 <td><a href="{$newPageURL}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Contribution Page{/ts}</span></a></td>
36 <td style="vertical-align: top"><a class="button" href="{crmURL p="civicrm/admin/pcp" q="reset=1"}"><span>{ts}Manage Personal Campaign Pages{/ts}</span></a> {help id="id-pcp-intro" file="CRM/PCP/Page/PCP.hlp"}</td>
37 </tr>
38 </table>
39 {/if}
40
41 {if $rows}
42 <div id="configure_contribution_page">
43 {strip}
44
45 {include file="CRM/common/pager.tpl" location="top"}
46 {include file="CRM/common/pagerAToZ.tpl"}
47 {* handle enable/disable actions *}
48 {include file="CRM/common/enableDisableApi.tpl"}
49 {include file="CRM/common/jsortable.tpl"}
50 <table id="options" class="display">
51 <thead>
52 <tr>
53 <th>{ts}Title{/ts}</th>
54 <th>{ts}ID{/ts}</th>
55 <th>{ts}Enabled?{/ts}</th>
56 {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))}
57 <th>{ts}Campaign{/ts}</th>
58 {/if}
59 <th></th>
60 </tr>
61 </thead>
62 {foreach from=$rows item=row}
63 <tr id="contribution_page-{$row.id}" class="crm-entity {if NOT $row.is_active} disabled{/if}">
64 <td><strong>{$row.title}</strong></td>
65 <td>{$row.id}</td>
66 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
67 {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))}
68 <td>{$row.campaign}</td>
69 {/if}
70 <td class="crm-contribution-page-actions right nowrap">
71
72 {if $row.configureActionLinks}
73 <div class="crm-contribution-page-configure-actions">
74 {$row.configureActionLinks|replace:'xx':$row.id}
75 </div>
76 {/if}
77
78 {if $row.contributionLinks}
79 <div class="crm-contribution-online-contribution-actions">
80 {$row.contributionLinks|replace:'xx':$row.id}
81 </div>
82 {/if}
83
84 {if $row.onlineContributionLinks}
85 <div class="crm-contribution-search-contribution-actions">
86 {$row.onlineContributionLinks|replace:'xx':$row.id}
87 </div>
88 {/if}
89
90 <div class="crm-contribution-page-more">
91 {$row.action|replace:'xx':$row.id}
92 </div>
93
94 </td>
95
96 </tr>
97 {/foreach}
98 </table>
99
100 {/strip}
101 </div>
102 {else}
103 {if $isSearch eq 1}
104 <div class="status messages">
105 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
106 {capture assign=browseURL}{crmURL p='civicrm/contribute/manage' q="reset=1"}{/capture}
107 {ts}No available Contribution Pages match your search criteria. Suggestions:{/ts}
108 <div class="spacer"></div>
109 <ul>
110 <li>{ts}Check your spelling.{/ts}</li>
111 <li>{ts}Try a different spelling or use fewer letters.{/ts}</li>
112 <li>{ts}Make sure you have enough privileges in the access control system.{/ts}</li>
113 </ul>
114 {ts 1=$browseURL}Or you can <a href='%1'>browse all available Contribution Pages</a>.{/ts}
115 </div>
116 {else}
117 <div class="messages status no-popup">
118 <div class="icon inform-icon"></div> &nbsp;
119 {ts 1=$newPageURL}No contribution pages have been created yet. Click <a accesskey="N" href='%1'>here</a> to create a new contribution page.{/ts}
120 </div>
121 {/if}
122 {/if}