Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
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 | {* Template for "Sample" custom search component. *} | |
27 | {assign var="showBlock" value="'searchForm'"} | |
28 | {assign var="hideBlock" value="'searchForm_show','searchForm_hide'"} | |
29 | ||
30 | <div class="crm-form-block crm-search-form-block"> | |
31 | <div id="searchForm"> | |
32 | {include file="CRM/Contact/Form/Search/Custom/MultipleValuesCriteria.tpl"} | |
33 | </div> | |
34 | </div> | |
35 | ||
36 | {if $rowsEmpty} | |
37 | {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} | |
38 | {/if} | |
39 | ||
40 | {if $summary} | |
41 | {$summary.summary}: {$summary.total} | |
42 | {/if} | |
43 | ||
44 | {if $rows} | |
45 | {* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *} | |
46 | {assign var="showBlock" value="'searchForm_show'"} | |
47 | {assign var="hideBlock" value="'searchForm'"} | |
48 | ||
49 | <fieldset> | |
50 | ||
51 | {* This section handles form elements for action task select and submit *} | |
52 | {include file="CRM/Contact/Form/Search/ResultTasks.tpl"} | |
53 | ||
54 | {* This section displays the rows along and includes the paging controls *} | |
55 | <p> | |
56 | ||
57 | {include file="CRM/common/pager.tpl" location="top"} | |
58 | ||
59 | {include file="CRM/common/pagerAToZ.tpl"} | |
60 | ||
61 | {strip} | |
16850d34 | 62 | <table class="selector row-highlight" summary="{ts}Search results listings.{/ts}"> |
6a488035 TO |
63 | <thead class="sticky"> |
64 | <th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th> | |
65 | {foreach from=$columnHeaders item=header} | |
66 | <th scope="col"> | |
67 | {if $header.sort} | |
68 | {assign var='key' value=$header.sort} | |
69 | {$sort->_response.$key.link} | |
70 | {else} | |
71 | {$header.name} | |
72 | {/if} | |
73 | </th> | |
74 | {/foreach} | |
75 | <th> </th> | |
76 | </thead> | |
77 | ||
78 | {counter start=0 skip=1 print=false} | |
79 | {foreach from=$rows item=row} | |
80 | <tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}"> | |
81 | {assign var=cbName value=$row.checkbox} | |
82 | <td>{$form.$cbName.html}</td> | |
83 | {foreach from=$columnHeaders item=header} | |
84 | {assign var=fName value=$header.sort} | |
85 | {if $fName eq 'sort_name'} | |
86 | <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a></td> | |
87 | {else} | |
88 | <td>{$row.$fName}</td> | |
89 | {/if} | |
90 | {/foreach} | |
91 | <td>{$row.action}</td> | |
92 | </tr> | |
93 | {/foreach} | |
94 | </table> | |
95 | {/strip} | |
96 | ||
6a488035 TO |
97 | {include file="CRM/common/pager.tpl" location="bottom"} |
98 | ||
99 | </p> | |
100 | </fieldset> | |
101 | {* END Actions/Results section *} | |
102 | {/if} | |
103 | ||
104 | ||
105 |