| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 5 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2018 | |
| 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 | {* CiviContribute DashBoard (launch page) *} |
| 27 | {if $buildTabularView} |
| 28 | <table class="report"> |
| 29 | <tr class="columnheader-dark"> |
| 30 | <th scope="col">{ts}Period{/ts}</th> |
| 31 | <th scope="col">{ts}Total Amount{/ts}</th> |
| 32 | <th scope="col" title="Contribution Count"><strong>#</strong></th><th></th></tr> |
| 33 | <tr> |
| 34 | <td><strong>{ts}Current Month-To-Date{/ts}</strong></td> |
| 35 | <td class="label">{if NOT $monthToDate.Valid.amount}{ts}(n/a){/ts}{else}{$monthToDate.Valid.amount}{/if}</td> |
| 36 | <td class="label">{$monthToDate.Valid.count}</td> |
| 37 | <td><a href="{$monthToDate.Valid.url}">{ts}view details{/ts}...</a></td> |
| 38 | </tr> |
| 39 | <tr> |
| 40 | <td><strong>{ts}Current Fiscal Year-To-Date{/ts}</strong></td> |
| 41 | <td class="label">{if NOT $yearToDate.Valid.amount}{ts}(n/a){/ts}{else}{$yearToDate.Valid.amount}{/if}</td> |
| 42 | <td class="label">{$yearToDate.Valid.count}</td> |
| 43 | <td><a href="{$yearToDate.Valid.url}">{ts}view details{/ts}...</a></td> |
| 44 | </tr> |
| 45 | <tr> |
| 46 | <td><strong>{ts}Cumulative{/ts}</strong><br />{ts}(since inception){/ts}</td> |
| 47 | <td class="label">{if NOT $startToDate.Valid.amount}{ts}(n/a){/ts}{else}{$startToDate.Valid.amount}{/if}</td> |
| 48 | <td class="label">{$startToDate.Valid.count}</td> |
| 49 | <td><a href="{$startToDate.Valid.url}">{ts}view details{/ts}...</a></td> |
| 50 | </tr> |
| 51 | </table> |
| 52 | {elseif $buildChart} |
| 53 | {include file = "CRM/Contribute/Form/ContributionCharts.tpl"} |
| 54 | {else} |
| 55 | <h3>{ts}Contribution Summary{/ts} {help id="id-contribute-intro"}</h3> |
| 56 | <div id="mainTabContainer" class="ui-tabs ui-widget ui-widget-content ui-corner-all"> |
| 57 | <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
| 58 | <li id="chart_view" class="crm-tab-button ui-state-active ui-corner-top ui-corner-bottom ui-tabs-selected" > |
| 59 | <a href="#chart_layout"><span> </span> {ts}Chart Layout{/ts} </a> </li> |
| 60 | <li id ="table_view" class="crm-tab-button ui-corner-top ui-corner-bottom ui-state-default" > |
| 61 | <a href="#table_layout"><span> </span> {ts}Table Layout{/ts} </a> |
| 62 | </li> |
| 63 | {if $isAdmin} |
| 64 | {capture assign=newPageURL}{crmURL p="civicrm/admin/contribute/add" q="action=add&reset=1"}{/capture} |
| 65 | {capture assign=configPagesURL}{crmURL p="civicrm/admin/contribute" q="reset=1"}{/capture} |
| 66 | |
| 67 | <div class="float-right"> |
| 68 | <table class="form-layout-compressed"> |
| 69 | <tr> |
| 70 | <td> |
| 71 | <a href="{$configPagesURL}" class="button no-popup"><span>{ts}Manage Contribution Pages{/ts}</span></a> |
| 72 | </td> |
| 73 | <td> |
| 74 | <a href="{$newPageURL}" class="button no-popup"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Contribution Page{/ts}</span></a> |
| 75 | </td> |
| 76 | </tr> |
| 77 | </table> |
| 78 | </div> |
| 79 | {/if} |
| 80 | </ul> |
| 81 | <div id="chartData"></div> |
| 82 | </div> |
| 83 | <div class="spacer"></div> |
| 84 | |
| 85 | {if $pager->_totalItems} |
| 86 | <h3>{ts}Recent Contributions{/ts}</h3> |
| 87 | <div> |
| 88 | {include file="CRM/Contribute/Form/Selector.tpl" context="dashboard"} |
| 89 | </div> |
| 90 | {/if} |
| 91 | {/if} |