Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
3 | | CiviCRM version 4.3 | | |
4 | +--------------------------------------------------------------------+ | |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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 | <div class="crm-block crm-form-block crm-contact-custom-search-form-block"> | |
27 | <div class="crm-accordion-wrapper crm-custom_search_form-accordion {if $rows}collapsed{/if}"> | |
28 | <div class="crm-accordion-header crm-master-accordion-header"> | |
29 | {ts}Edit Search Criteria{/ts} | |
30 | </div><!-- /.crm-accordion-header --> | |
31 | <div class="crm-accordion-body"> | |
32 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> | |
33 | <table class="form-layout-compressed"> | |
34 | {* Loop through all defined search criteria fields (defined in the buildForm() function). *} | |
35 | {foreach from=$elements item=element} | |
36 | <tr class="crm-contact-custom-search-form-row-{$element}"> | |
37 | <td class="label">{$form.$element.label}</td> | |
38 | {if $element eq 'start_date'} | |
39 | <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td> | |
40 | {elseif $element eq 'end_date'} | |
41 | <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td> | |
42 | {else} | |
43 | <td>{$form.$element.html}</td> | |
44 | {/if} | |
45 | </tr> | |
46 | {/foreach} | |
47 | <tr class="crm-contact-custom-search-contributionDetails-form-block-financial_type"> | |
48 | <td class="label">{ts}Financial Type{/ts}</td> | |
49 | <td> | |
50 | <div class="listing-box"> | |
51 | {foreach from=$form.financial_type_id item="financial_type_val"} | |
52 | <div class="{cycle values="odd-row,even-row"}"> | |
53 | {$financial_type_val.html} | |
54 | </div> | |
55 | {/foreach} | |
56 | </div> | |
57 | <div class="spacer"></div> | |
58 | </td> | |
59 | </tr> | |
60 | </table> | |
61 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
62 | </div><!-- /.crm-accordion-body --> | |
63 | </div><!-- /.crm-accordion-wrapper --> | |
64 | </div><!-- /.crm-form-block --> | |
65 | ||
66 | {if $rowsEmpty || $rows} | |
67 | <div class="crm-content-block"> | |
68 | {if $rowsEmpty} | |
69 | {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} | |
70 | {/if} | |
71 | ||
72 | {if $summary} | |
73 | {$summary.summary}: {$summary.total} | |
74 | {/if} | |
75 | ||
76 | {if $rows} | |
b2603e29 | 77 | <div class="crm-results-block"> |
6a488035 TO |
78 | {* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *} |
79 | {* This section handles form elements for action task select and submit *} | |
80 | <div class="crm-search-tasks"> | |
81 | {include file="CRM/Contact/Form/Search/ResultTasks.tpl"} | |
b2603e29 | 82 | </div> |
6a488035 | 83 | {* This section displays the rows along and includes the paging controls *} |
b2603e29 | 84 | <div class="crm-search-results"> |
6a488035 TO |
85 | |
86 | {include file="CRM/common/pager.tpl" location="top"} | |
87 | ||
88 | {* Include alpha pager if defined. *} | |
89 | {if $atoZ} | |
90 | {include file="CRM/common/pagerAToZ.tpl"} | |
91 | {/if} | |
92 | ||
93 | {strip} | |
94 | <table class="selector" summary="{ts}Search results listings.{/ts}"> | |
95 | <thead class="sticky"> | |
96 | <tr> | |
97 | <th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th> | |
98 | {foreach from=$columnHeaders item=header} | |
99 | <th scope="col"> | |
100 | {if $header.sort} | |
101 | {assign var='key' value=$header.sort} | |
102 | {$sort->_response.$key.link} | |
103 | {else} | |
104 | {$header.name} | |
105 | {/if} | |
106 | </th> | |
107 | {/foreach} | |
108 | <th> </th> | |
109 | </tr> | |
110 | </thead> | |
111 | ||
112 | {counter start=0 skip=1 print=false} | |
113 | {foreach from=$rows item=row} | |
114 | <tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}"> | |
115 | {assign var=cbName value=$row.checkbox} | |
116 | <td>{$form.$cbName.html}</td> | |
117 | {foreach from=$columnHeaders item=header} | |
118 | {assign var=fName value=$header.sort} | |
119 | {if $fName eq 'sort_name'} | |
120 | <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a></td> | |
121 | {else} | |
122 | <td>{$row.$fName}</td> | |
123 | {/if} | |
124 | {/foreach} | |
125 | <td>{$row.action}</td> | |
126 | </tr> | |
127 | {/foreach} | |
128 | </table> | |
129 | {/strip} | |
130 | ||
131 | <script type="text/javascript"> | |
132 | {* this function is called to change the color of selected row(s) *} | |
133 | var fname = "{$form.formName}"; | |
134 | on_load_init_checkboxes(fname); | |
135 | </script> | |
136 | ||
137 | {include file="CRM/common/pager.tpl" location="bottom"} | |
138 | ||
139 | </p> | |
140 | {* END Actions/Results section *} | |
141 | </div> | |
142 | </div> | |
143 | {/if} | |
144 | ||
145 | ||
146 | ||
147 | </div> | |
148 | {/if} | |
149 | {literal} | |
150 | <script type="text/javascript"> | |
151 | cj(function() { | |
152 | cj().crmAccordions(); | |
153 | }); | |
154 | </script> | |
155 | {/literal} |