Merge pull request #5536 from totten/4.5-httpclient
[civicrm-core.git] / templates / CRM / Contact / Form / Search / Custom / ContribSYBNT.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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 class="crm-contact-custom-search-contribSYBNT-form-block-min_amount_1">
38 <td><label>{ts}Amount One: Min/Max{/ts}</label></td>
39 <td>{$form.min_amount_1.html}</td>
40 <td>{$form.max_amount_1.html}</td>
41 <td>&nbsp;</td>
42 </tr>
43 <tr class="crm-contact-custom-search-contribSYBNT-form-block-inclusion_date_one">
44 <td><label>Inclusion Date One: Start/End</label></td>
45 <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date_1}</td>
46 <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date_1}</td>
47 <td>{$form.is_first_amount.html}&nbsp;{ts}First time donor only?{/ts}</td>
48 </tr>
49 <tr class="crm-contact-custom-search-contribSYBNT-form-block-min_amount_2">
50 <td><label>{ts}Amount Two: Min/Max{/ts}</label></td>
51 <td>{$form.min_amount_2.html}</td>
52 <td>{$form.max_amount_2.html}</td>
53 <td>&nbsp;</td>
54 </tr>
55 <tr class="crm-contact-custom-search-contribSYBNT-form-block-inclusion_date_two">
56 <td><label>Inclusion Date Two: Start/End</label></td>
57 <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date_2}</td>
58 <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date_2}</td>
59 <td>&nbsp;</td>
60 </tr>
61 <tr class="crm-contact-custom-search-contribSYBNT-form-block-exclude_min_amount">
62 <td><label>Exclusion Amount: Min/Max</label></td>
63 <td>{$form.exclude_min_amount.html}</td>
64 <td>{$form.exclude_max_amount.html}</td>
65 <td>&nbsp;</td>
66 </tr>
67 <tr class="crm-contact-custom-search-contribSYBNT-form-block-exclusion_date">
68 <td><label>Exclusion Date: Start/End</label></td>
69 <td>{include file="CRM/common/jcalendar.tpl" elementName=exclude_start_date}</td>
70 <td>{include file="CRM/common/jcalendar.tpl" elementName=exclude_end_date}</td>
71 <td>&nbsp;</td>
72 </tr>
73 </table>
74 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
75 </div><!-- /.crm-accordion-body -->
76 </div><!-- /.crm-accordion-wrapper -->
77 </div><!-- /.crm-form-block -->
78
79 {if $rowsEmpty || $rows}
80 <div class="crm-content-block">
81 {if $rowsEmpty}
82 {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
83 {/if}
84
85 {if $summary}
86 {$summary.summary}: {$summary.total}
87 {/if}
88
89 {if $rows}
90 <div class="crm-results-block">
91 {* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
92 {* This section handles form elements for action task select and submit *}
93 <div class="crm-search-tasks">
94 {include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
95 </div>
96 {* This section displays the rows along and includes the paging controls *}
97 <div class="crm-search-results">
98
99 {include file="CRM/common/pager.tpl" location="top"}
100
101 {* Include alpha pager if defined. *}
102 {if $atoZ}
103 {include file="CRM/common/pagerAToZ.tpl"}
104 {/if}
105
106 {strip}
107 <table class="selector row-highlight" summary="{ts}Search results listings.{/ts}">
108 <thead class="sticky">
109 <th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
110 {foreach from=$columnHeaders item=header}
111 <th scope="col">
112 {if $header.sort}
113 {assign var='key' value=$header.sort}
114 {$sort->_response.$key.link}
115 {else}
116 {$header.name}
117 {/if}
118 </th>
119 {/foreach}
120 <th>&nbsp;</th>
121 </thead>
122
123 {counter start=0 skip=1 print=false}
124 {foreach from=$rows item=row}
125 <tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
126 {assign var=cbName value=$row.checkbox}
127 <td>{$form.$cbName.html}</td>
128 {foreach from=$columnHeaders item=header}
129 {assign var=fName value=$header.sort}
130 {if $fName eq 'sort_name'}
131 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`"}">{$row.sort_name}</a></td>
132 {else}
133 <td>{$row.$fName}</td>
134 {/if}
135 {/foreach}
136 <td>{$row.action}</td>
137 </tr>
138 {/foreach}
139 </table>
140 {/strip}
141
142 {include file="CRM/common/pager.tpl" location="bottom"}
143
144 </p>
145 {* END Actions/Results section *}
146 </div>
147 </div>
148 {/if}
149
150 </div>
151 {/if}