Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
6a488035 TO |
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 | {* Default template custom searches. This template is used automatically if templateFile() function not defined in | |
27 | custom search .php file. If you want a different layout, clone and customize this file and point to new file using | |
28 | templateFile() function.*} | |
29 | <div class="crm-block crm-form-block crm-contact-custom-search-form-block"> | |
30 | <div class="crm-accordion-wrapper crm-custom_search_form-accordion {if $rows}collapsed{/if}"> | |
31 | <div class="crm-accordion-header crm-master-accordion-header"> | |
32 | {ts}Edit Search Criteria{/ts} | |
33 | </div><!-- /.crm-accordion-header --> | |
34 | <div class="crm-accordion-body"> | |
35 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> | |
36 | <table class="form-layout-compressed"> | |
37 | <tr><td class="label">{$form.distance.label}</td><td>{$form.distance.html|crmAddClass:four} {$form.prox_distance_unit.html}</td></tr> | |
38 | <tr><td class="label">FROM...</td><td></td></tr> | |
39 | <tr><td class="label">{$form.street_address.label}</td><td>{$form.street_address.html}</td></tr> | |
40 | <tr><td class="label">{$form.city.label}</td><td>{$form.city.html}</td></tr> | |
41 | <tr><td class="label">{$form.postal_code.label}</td><td>{$form.postal_code.html}</td></tr> | |
42 | <tr><td class="label">{$form.country_id.label}</td><td>{$form.country_id.html}</td></tr> | |
43 | <tr><td class="label" style="white-space: nowrap;">{$form.state_province_id.label}</td><td>{$form.state_province_id.html}</td></tr> | |
44 | <tr><td class="label">AND ...</td><td></td></tr> | |
45 | <tr><td class="label">{$form.group.label}</td><td>{$form.group.html}</td></tr> | |
46 | <tr><td class="label">{$form.tag.label}</td><td>{$form.tag.html}</td></tr> | |
47 | </table> | |
48 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
49 | </div><!-- /.crm-accordion-body --> | |
50 | </div><!-- /.crm-accordion-wrapper --> | |
51 | </div><!-- /.crm-form-block --> | |
52 | ||
53 | {if $rowsEmpty || $rows} | |
54 | <div class="crm-content-block"> | |
55 | {if $rowsEmpty} | |
56 | {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} | |
57 | {/if} | |
58 | ||
59 | {if $summary} | |
60 | {$summary.summary}: {$summary.total} | |
61 | {/if} | |
62 | ||
63 | {if $rows} | |
64 | <div class="crm-results-block"> | |
65 | {* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *} | |
66 | {* This section handles form elements for action task select and submit *} | |
67 | <div class="crm-search-tasks"> | |
68 | {include file="CRM/Contact/Form/Search/ResultTasks.tpl"} | |
69 | </div> | |
70 | {* This section displays the rows along and includes the paging controls *} | |
71 | <div class="crm-search-results"> | |
72 | ||
73 | {include file="CRM/common/pager.tpl" location="top"} | |
74 | ||
75 | {* Include alpha pager if defined. *} | |
76 | {if $atoZ} | |
77 | {include file="CRM/common/pagerAToZ.tpl"} | |
78 | {/if} | |
79 | ||
80 | {strip} | |
16850d34 | 81 | <table class="selector row-highlight" summary="{ts}Search results listings.{/ts}"> |
6a488035 TO |
82 | <thead class="sticky"> |
83 | <th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th> | |
84 | {foreach from=$columnHeaders item=header} | |
85 | <th scope="col"> | |
86 | {if $header.sort} | |
87 | {assign var='key' value=$header.sort} | |
88 | {$sort->_response.$key.link} | |
89 | {else} | |
90 | {$header.name} | |
91 | {/if} | |
92 | </th> | |
93 | {/foreach} | |
94 | <th> </th> | |
95 | </thead> | |
96 | ||
97 | {counter start=0 skip=1 print=false} | |
98 | {foreach from=$rows item=row} | |
99 | <tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}"> | |
100 | {assign var=cbName value=$row.checkbox} | |
101 | <td>{$form.$cbName.html}</td> | |
102 | {foreach from=$columnHeaders item=header} | |
103 | {assign var=fName value=$header.sort} | |
104 | {if $fName eq 'sort_name'} | |
105 | <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a></td> | |
106 | {else} | |
107 | <td>{$row.$fName}</td> | |
108 | {/if} | |
109 | {/foreach} | |
110 | <td>{$row.action}</td> | |
111 | </tr> | |
112 | {/foreach} | |
113 | </table> | |
114 | {/strip} | |
115 | ||
6a488035 TO |
116 | |
117 | {include file="CRM/common/pager.tpl" location="bottom"} | |
118 | ||
119 | </p> | |
120 | {* END Actions/Results section *} | |
121 | </div> | |
122 | </div> | |
123 | {/if} | |
124 | ||
125 | ||
126 | ||
127 | </div> | |
128 | {/if} | |
129 | {literal} | |
130 | <script type="text/javascript"> | |
3cc60a06 | 131 | CRM.$(function($) { |
6a488035 TO |
132 | cj().crmAccordions(); |
133 | }); | |
134 | </script> | |
135 | {/literal} |