CRM-12595 fix formatting in templates files (B)
[civicrm-core.git] / templates / CRM / Contact / Form / Search / Custom / FullText.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 {* Template for Full-text search component. *}
27 <div class="crm-block crm-form-block crm-search-form-block">
28 <div id="searchForm">
29 <div class="form-item">
30 <table class="form-layout-compressed">
31 <tr>
32 <td class="label">{$form.text.label}</td><td>{$form.text.html}</td>
33 <td class="label">{ts}in...{/ts}</td><td>{$form.table.html}</td>
34 <td>{$form.buttons.html} {help id="id-fullText"}</td>
35 </tr>
36 </table>
37 </div>
38 </div>
39 </div>
40 <div class="crm-block crm-content-block">
41 {include file="CRM/common/pager.tpl" location="top"}
42 {include file="CRM/common/jsortable.tpl"}
43 {if $rowsEmpty}
44 {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
45 {/if}
46
47 {assign var=table value=$form.table.value.0}
48 {assign var=text value=$form.text.value}
49 {if !empty($summary.Contact) }
50 <div class="section">
51 {* Search request has returned 1 or more matching rows. Display results. *}
52 <h3>{ts}Contacts{/ts}: {if !$table}{if $summary.Count.Contact <= $limit}{$summary.Count.Contact}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contact}{/if}</h3>
53 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
54 {* This section displays the rows along and includes the paging controls *}
55 {strip}
56 <table id="contact_listing" class="display" class="selector" summary="{ts}Contact listings.{/ts}">
57 <thead>
58 <tr>
59 <th class='link'>{ts}Name{/ts}</th>
60 <th></th>
61 </tr>
62 </thead>
63 {foreach from=$summary.Contact item=row}
64 <tr class="{cycle values="odd-row,even-row"}">
65 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.sort_name}</a></td>
66 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a></td>
67 </tr>
68 {/foreach}
69 </table>
70 {/strip}
71 {if !$table and $summary.addShowAllLink.Contact}<div class="crm-section full-text-view-all-section"><a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contact&text=$text"}" title="{ts}View all results for contacts{/ts}">&raquo;&nbsp;{ts}View all results for contacts{/ts}</a></div>{/if}
72 {* note we using location="below" because we don't want to use rows per page for now. And therefore don't put location="bottom" for now. *}
73 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
74 {* END Actions/Results section *}
75 </div>
76 {/if}
77
78 {if !empty($summary.Activity) }
79 <div class="section">
80 {* Search request has returned 1 or more matching rows. Display results. *}
81
82 <h3>{ts}Activities{/ts}: {if !$table}{if $summary.Count.Activity <= $limit}{$summary.Count.Activity}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Activity}{/if}</h3>
83 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
84 {* This section displays the rows along and includes the paging controls *}
85 {strip}
86 <table id="activity_listing" class="display" summary="{ts}Activity listings.{/ts}">
87 <thead>
88 <tr>
89 <th>{ts}Type{/ts}</th>
90 <th>{ts}Subject{/ts}</th>
91 <th>{ts}Details{/ts}</th>
92 <th class='link'>{ts}Added By{/ts}</th>
93 <th class='link'>{ts}With{/ts}</th>
94 <th class='link'>{ts}Assignee{/ts}</th>
95 <th></th>
96 </tr>
97 </thead>
98 {foreach from=$summary.Activity item=row}
99 <tr class="{cycle values="odd-row,even-row"}">
100 <td>{$row.activity_type}</td>
101 <td>{$row.subject|mb_truncate:40}</td>
102 <td>{$row.details|escape}</td>
103 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.sort_name}</a></td>
104 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.target_contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.target_sort_name}</a></td>
105 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.assignee_contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.assignee_sort_name}</a></td>
106 <td>
107 {if $row.case_id }
108 <a href="{crmURL p='civicrm/case/activity/view' q="reset=1&aid=`$row.activity_id`&cid=`$row.client_id`&caseID=`$row.case_id`&context=fulltext&key=`$qfKey`"}">
109 {else}
110 <a href="{crmURL p='civicrm/contact/view/activity' q="atype=`$row.activity_type_id`&action=view&reset=1&id=`$row.activity_id`&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">
111 {/if}
112 {ts}View{/ts}</a>
113 </td>
114 </tr>
115 {/foreach}
116 </table>
117 {/strip}
118 {if !$table and $summary.addShowAllLink.Activity}<div class="crm-section full-text-view-all-section"><a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Activity&text=$text"}" title="{ts}View all results for activities{/ts}">&raquo;&nbsp;{ts}View all results for activities{/ts}</a></div>{/if}
119 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
120 {* END Actions/Results section *}
121 </div>
122 {/if}
123
124 {if !empty($summary.Case) }
125 <div class="section">
126
127 {* Search request has returned 1 or more matching rows. Display results. *}
128
129 <h3>{ts}Cases{/ts}: {if !$table}{if $summary.Count.Case <= $limit}{$summary.Count.Case}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Case}{/if}</h3>
130 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
131 {* This section displays the rows along and includes the paging controls *}
132 {strip}
133 <table id="case_listing" class="display" summary="{ts}Case listings.{/ts}">
134 <thead>
135 <tr>
136 <th class='link'>{ts}Client Name{/ts}</th>
137 <th class="start_date">{ts}Start Date{/ts}</th>
138 <th class="end_date">{ts}End Date{/ts}</th>
139 <th>{ts}Case ID{/ts}</th>
140 <th></th>
141 <th class="hiddenElement"></th>
142 <th class="hiddenElement"></th>
143 </tr>
144 </thead>
145 {foreach from=$summary.Case item=row}
146 <tr class="{cycle values="odd-row,even-row"}">
147 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.sort_name}</a></td>
148 <td>{$row.case_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
149 <td>{$row.case_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
150 <td>{$row.case_id}</td>
151 {if $row.case_is_deleted}
152 <td><a href="{crmURL p='civicrm/contact/view/case' q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=renew&context=fulltext&key=`$qfKey`"}">{ts}Restore Case{/ts}</a></td>
153 {else}
154 <td><a href="{crmURL p='civicrm/contact/view/case' q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}Manage{/ts}</a></td>
155 {/if}
156 <td class="start_date hiddenElement">{$row.case_start_date|crmDate}</td>
157 <td class="end_date hiddenElement">{$row.case_end_date|crmDate}</td>
158 </tr>
159 {/foreach}
160 </table>
161 {/strip}
162 {if !$table and $summary.addShowAllLink.Case}<div class="crm-section full-text-view-all-section"><a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Case&text=$text"}" title="{ts}View all results for cases{/ts}">&raquo;&nbsp;{ts}View all results for cases{/ts}</a></div>{/if}
163 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
164 {* END Actions/Results section *}
165 </div>
166 {/if}
167
168 {if !empty($summary.Contribution) }
169 <div class="section">
170 {* Search request has returned 1 or more matching rows. Display results. *}
171
172 <h3>{ts}Contributions{/ts}: {if !$table}{if $summary.Count.Contribution <= $limit}{$summary.Count.Contribution}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contribution}{/if}</h3>
173 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
174 {* This section displays the rows along and includes the paging controls *}
175 {strip}
176 <table id="contribute_listing" class="display" summary="{ts}Contribution listings.{/ts}">
177 <thead>
178 <tr>
179 <th class='link'>{ts}Contributor's Name{/ts}</th>
180 <th class="currency">{ts}Amount{/ts}</th>
181
182 <th>{ts}Financial Type{/ts}</th>
183 <th>{ts}Source{/ts}</th>
184 <th class="received_date">{ts}Received{/ts}</th>
185 <th>{ts}Status{/ts}</th>
186 <th></th>
187 <th class="hiddenElement"></th>
188 </tr>
189 </thead>
190 {foreach from=$summary.Contribution item=row}
191 <tr class="{cycle values="odd-row,even-row"}">
192 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.sort_name}</a></td>
193 <td>{$row.contribution_total_amount|crmMoney}</td>
194 <td>{$row.financial_type}</td>
195 <td>{$row.contribution_source}</td>
196 <td>{$row.contribution_receive_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
197 <td>{$row.contribution_status}</td>
198 <td><a href="{crmURL p='civicrm/contact/view/contribution' q="reset=1&id=`$row.contribution_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a></td>
199 <td class="received_date hiddenElement">{$row.contribution_receive_date|crmDate}</td>
200 </tr>
201 {/foreach}
202 </table>
203 {/strip}
204 {if !$table and $summary.addShowAllLink.Contribution}<div class="crm-section full-text-view-all-section"><a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contribution&text=$text"}" title="{ts}View all results for contributions{/ts}">&raquo;&nbsp;{ts}View all results for contributions{/ts}</a></div>{/if}
205 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
206 {* END Actions/Results section *}
207 </div>
208 {/if}
209
210 {if !empty($summary.Participant) }
211 <div class="section">
212 {* Search request has returned 1 or more matching rows. *}
213
214 <h3>{ts}Event Participants{/ts}: {if !$table}{if $summary.Count.Participant <= $limit}{$summary.Count.Participant}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Participant}{/if}</h3>
215 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
216 {* This section displays the rows along and includes the paging controls *}
217 {strip}
218 <table id="participant_listing" class="display" summary="{ts}Participant listings.{/ts}">
219 <thead>
220 <tr>
221 <th class='link'>{ts}Participant's Name{/ts}</th>
222 <th>{ts}Event{/ts}</th>
223 <th>{ts}Fee Level{/ts}</th>
224 <th class="currency">{ts}Fee Amount{/ts}</th>
225 <th class="register_date">{ts}Register Date{/ts}</th>
226 <th>{ts}Source{/ts}</th>
227 <th>{ts}Status{/ts}</th>
228 <th>{ts}Role{/ts}</th>
229 <th></th>
230 <th class="hiddenElement"></th>
231 </tr>
232 </thead>
233 {foreach from=$summary.Participant item=row}
234 <tr class="{cycle values="odd-row,even-row"}">
235 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.sort_name}</a></td>
236 <td>{$row.event_title}</td>
237 <td>{$row.participant_fee_level}</td>
238 <td>{$row.participant_fee_amount|crmMoney}</td>
239 <td>{$row.participant_register_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
240 <td>{$row.participant_source}</td>
241 <td>{$row.participant_status}</td>
242 <td>{$row.participant_role}</td>
243 <td><a href="{crmURL p='civicrm/contact/view/participant' q="reset=1&id=`$row.participant_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a></td>
244 <td class="register_date hiddenElement">{$row.participant_register_date|crmDate}</td>
245 </tr>
246 {/foreach}
247 </table>
248 {/strip}
249 {if !$table and $summary.addShowAllLink.Participant}<div class="crm-section full-text-view-all-section"><a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Participant&text=$text"}" title="{ts}View all results for participants{/ts}">&raquo;&nbsp;{ts}View all results for participants{/ts}</a></div>{/if}
250 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
251 {* END Actions/Results section *}
252 </div>
253 {/if}
254
255 {if !empty($summary.Membership) }
256 <div class="section">
257 {* Search request has returned 1 or more matching rows. *}
258
259 <h3>{ts}Memberships{/ts}: {if !$table}{if $summary.Count.Membership <= $limit}{$summary.Count.Membership}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Membership}{/if}</h3>
260 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
261 {* This section displays the rows along and includes the paging controls *}
262 {strip}
263 <table id="membership_listing" class="display" summary="{ts}Membership listings.{/ts}">
264 <thead>
265 <tr>
266 <th class='link'>{ts}Member's Name{/ts}</th>
267 <th>{ts}Membership Type{/ts}</th>
268 <th class="currency">{ts}Membership Fee{/ts}</th>
269 <th class="start_date">{ts}Membership Start Date{/ts}</th>
270 <th class="end_date">{ts}Membership End Date{/ts}</th>
271 <th>{ts}Source{/ts}</th>
272 <th>{ts}Status{/ts}</th>
273 <th></th>
274 <th class="hiddenElement"></th>
275 <th class="hiddenElement"></th>
276 </tr>
277 </thead>
278 {foreach from=$summary.Membership item=row}
279 <tr class="{cycle values="odd-row,even-row"}">
280 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" title="{ts}View contact details{/ts}">{$row.sort_name}</a></td>
281 <td>{$row.membership_type}</td>
282 <td>{$row.membership_fee|crmMoney}</td>
283 <td>{$row.membership_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
284 <td>{$row.membership_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
285 <td>{$row.membership_source}</td>
286 <td>{$row.membership_status}</td>
287 <td><a href="{crmURL p='civicrm/contact/view/membership' q="reset=1&id=`$row.membership_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a></td>
288 <td class="start_date hiddenElement">{$row.membership_start_date|crmDate}</td>
289 <td class="end_date hiddenElement">{$row.membership_end_date|crmDate}</td>
290 </tr>
291 {/foreach}
292 </table>
293 {/strip}
294 {if !$table and $summary.addShowAllLink.Membership}<div class="crm-section full-text-view-all-section"><a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Membership&text=$text"}" title="{ts}View all results for memberships{/ts}">&raquo;&nbsp;{ts}View all results for memberships{/ts}</a></div>{/if}
295 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
296 {* END Actions/Results section *}
297 </div>
298 {/if}
299 {include file="CRM/common/pager.tpl" location="bottom"}
300 </div>