CRM-12865 - Define regions and CSS classes for profile forms
[civicrm-core.git] / templates / CRM / Profile / Page / Listings.tpl
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
27 <div class="crm-profile-name-{$ufGroupName}">
28 {crmRegion name=profile-search-`$ufGroupName`}
29
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}">&raquo; {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"}">
76 {foreach from=$row item=value}
77 <td>{$value}</td>
78 {/foreach}
79 </tr>
80 {/foreach}
81 </table>
82 {/strip}
83 {include file="CRM/common/pager.tpl" location="bottom"}
84 </div>
85 {elseif ! $isReset}
86 {include file="CRM/Contact/Form/Search/EmptyResults.tpl" context="Profile"}
87 {/if}
88
89
90 {else}
91 <div class="messages status no-popup">
92 <div class="icon inform-icon"></div>
93 {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}
94 </div>
95 {/if}
96 </div>
97
98 {/crmRegion}
99 </div>{* crm-profile-name-NAME *}