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 | *} | |
46312a4d TO |
26 | |
27 | <div class="crm-profile-name-{$ufGroupName}"> | |
28 | {crmRegion name=profile-search-`$ufGroupName`} | |
29 | ||
6a488035 TO |
30 | {* make sure there are some fields in the selector *} |
31 | {if ! empty( $columnHeaders ) || $isReset } | |
32 | ||
33 | {if $search} | |
34 | <div class="crm-block crm-form-block"> | |
35 | {include file="$searchTPL"} | |
36 | </div> | |
37 | {/if} | |
38 | <div class="crm-block crm-content-block"> | |
39 | {* show profile listings criteria ($qill) *} | |
40 | {if $rows} | |
41 | ||
42 | {if $qill} | |
43 | <div class="crm-search-tasks"> | |
44 | <div id="search-status"> | |
45 | {ts}Displaying contacts where:{/ts} | |
46 | {include file="CRM/common/displaySearchCriteria.tpl"} | |
47 | {if $mapURL}<a href="{$mapURL}">» {ts}Map these contacts{/ts}</a>{/if} | |
48 | </div> | |
49 | </div> | |
50 | {/if} | |
51 | ||
52 | ||
53 | <div class="crm-search-results"> | |
54 | {include file="CRM/common/pager.tpl" location="top"} | |
55 | {* Search criteria are passed to tpl in the $qill array *} | |
56 | ||
57 | ||
58 | {strip} | |
59 | <table> | |
60 | <tr class="columnheader"> | |
61 | {foreach from=$columnHeaders item=header} | |
62 | <th scope="col"> | |
63 | {if $header.sort} | |
64 | {assign var='key' value=$header.sort} | |
65 | {$sort->_response.$key.link} | |
66 | {else} | |
67 | {$header.name} | |
68 | {/if} | |
69 | </th> | |
70 | {/foreach} | |
71 | </tr> | |
72 | ||
73 | {counter start=0 skip=1 print=false} | |
74 | {foreach from=$rows item=row name=listings} | |
75 | <tr id="row-{$smarty.foreach.listings.iteration}" class="{cycle values="odd-row,even-row"}"> | |
ae94c3e3 RN |
76 | {foreach from=$row key=index item=value} |
77 | {if $columnHeaders.$index.field_name} | |
78 | <td class="crm-{$columnHeaders.$index.field_name}">{$value}</td> | |
79 | {else} | |
80 | <td>{$value}</td> | |
81 | {/if} | |
6a488035 TO |
82 | {/foreach} |
83 | </tr> | |
84 | {/foreach} | |
85 | </table> | |
86 | {/strip} | |
87 | {include file="CRM/common/pager.tpl" location="bottom"} | |
88 | </div> | |
89 | {elseif ! $isReset} | |
90 | {include file="CRM/Contact/Form/Search/EmptyResults.tpl" context="Profile"} | |
91 | {/if} | |
92 | ||
93 | ||
94 | {else} | |
95 | <div class="messages status no-popup"> | |
96 | <div class="icon inform-icon"></div> | |
97 | {ts}No fields in this Profile have been configured to display as a result column in the search results table. Ask the site administrator to check the Profile setup.{/ts} | |
98 | </div> | |
99 | {/if} | |
46312a4d TO |
100 | </div> |
101 | ||
102 | {/crmRegion} | |
103 | </div>{* crm-profile-name-NAME *} |