2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 {* Template for "EventAggregate" custom search component. *}
27 {assign var="showBlock" value="'searchForm'"}
28 {assign var="hideBlock" value="'searchForm_show','searchForm_hide'"}
29 <div class="crm-block crm-form-block crm-search-form-block">
30 <div id="searchForm_show" class="form-item">
31 <a href="#" onclick="cj('#searchForm_show').hide(); cj('#searchForm').show(); return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}open section{/ts}" /></a>
32 <label>{ts}Edit Search Criteria{/ts}</label>
35 <div id="searchForm" class="crm-block crm-form-block crm-contact-custom-search-eventDetails-form-block">
37 <legend><span id="searchForm_hide"><a href="#" onclick="cj('#searchForm').hide(); cj('#searchForm_show').show(); return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}close section{/ts}" /></a></span>{ts}Search Criteria{/ts}</legend>
38 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
39 <table class="form-layout-compressed">
40 {* Loop through all defined search criteria fields (defined in the buildForm() function). *}
41 {foreach from=$elements item=element}
42 <tr class="crm-contact-custom-search-eventDetails-form-block-{$element}">
43 <td class="label">{$form.$element.label}</td>
44 {if $element eq 'start_date'}
45 <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td>
46 {elseif $element eq 'end_date'}
47 <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td>
49 <td>{$form.$element.html}</td>
53 <tr class="crm-contact-custom-search-eventDetails-form-block-event_type">
54 <td class="label">{ts}Event Type{/ts}</td>
56 <div class="listing-box">
57 {foreach from=$form.event_type_id item="event_val"}
58 <div class="{cycle values="odd-row,even-row"}">
63 <div class="spacer"></div>
67 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
72 {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
76 {* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
77 {assign var="showBlock" value="'searchForm_show'"}
78 {assign var="hideBlock" value="'searchForm'"}
81 {* The action task select and submit has been removed from this custom search because we're not dealing with contact records (so it won't work). *}
83 {* This section displays the rows along and includes the paging controls *}
86 {include file="CRM/common/pager.tpl" location="top"}
88 {include file="CRM/common/pagerAToZ.tpl"}
91 <table summary="{ts}Search results listings.{/ts}">
92 <thead class="sticky">
93 {foreach from=$columnHeaders item=header}
96 {assign var='key' value=$header.sort}
97 {$sort->_response.$key.link}
105 {counter start=0 skip=1 print=false}
106 {foreach from=$rows item=row}
107 <tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
109 {foreach from=$columnHeaders item=header}
110 {assign var=fName value=$header.sort}
111 {if $fName eq 'sort_name'}
112 <td>{$row.sort_name}</a></td>
113 {elseif $fName eq 'payment_amount' || $fName eq 'fee' || $fName eq 'net_payment'}
114 <td>{$row.$fName|crmMoney}</td>
115 {elseif $fName eq 'participant_count'}
116 <td>{$row.$fName}</td>
118 <td>{$row.$fName}</td>
125 <tr class="columnheader">
127 <td>Totals </td>
128 <td>{$summary.participant_count}</td>
129 <td>{$summary.payment_amount|crmMoney}</td>
130 <td>{$summary.fee|crmMoney}</td>
131 <td colspan=2>{$summary.net_payment|crmMoney}</td>
137 {include file="CRM/common/pager.tpl" location="bottom"}
141 {* END Actions/Results section *}
144 <script type="text/javascript">
145 var showBlock = new Array({$showBlock});
146 var hideBlock = new Array({$hideBlock});
148 {* hide and display the appropriate blocks *}
149 on_load_init_blocks( showBlock, hideBlock );