2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 {* Template for Full-text search component. *}
11 <div class="crm-block crm-form-block crm-search-form-block">
13 <div class="form-item">
14 <table class="form-layout-compressed">
16 <td class="label">{$form.text.label}</td>
17 <td>{$form.text.html}</td>
18 <td class="label">{ts}in...{/ts}</td>
19 <td>{$form.table.html}</td>
20 <td>{$form.buttons.html} {help id="id-fullText"}</td>
26 <div class="crm-block crm-content-block">
27 {if !$table}{include file="CRM/common/pager.tpl" location="top"}{/if}
28 {include file="CRM/common/jsortable.tpl"}
30 {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
33 {assign var=table value=$form.table.value.0}
34 {assign var=text value=$form.text.value}
35 {if !empty($summary.Contact) }
37 {* Search request has returned 1 or more matching rows. Display results. *}
39 : {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>
40 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
41 {* This section displays the rows along and includes the paging controls *}
42 <table id="contact_listing" class="display" class="selector" summary="{ts}Contact listings.{/ts}">
45 <th class='link'>{ts}Name{/ts}</th>
46 {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
50 {foreach from=$summary.Contact item=row}
51 <tr class="{cycle values="odd-row,even-row"}">
53 href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
54 title="{ts}View Contact Details{/ts}">{$row.sort_name}</a></td>
55 {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
57 href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
62 {if !$table and $summary.addShowAllLink.Contact}
63 <div class="crm-section full-text-view-all-section">
64 <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contact&text=$text"}"
65 title="{ts}View all results for contacts{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for contacts{/ts}</a>
67 {* 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. *}
68 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
69 {* END Actions/Results section *}
73 {if !empty($summary.Activity) }
75 {* Search request has returned 1 or more matching rows. Display results. *}
77 <h3>{ts}Activities{/ts}
78 : {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>
79 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
80 {* This section displays the rows along and includes the paging controls *}
81 <table id="activity_listing" class="display" summary="{ts}Activity listings.{/ts}">
84 <th>{ts}Type{/ts}</th>
85 <th>{ts}Subject{/ts}</th>
86 <th>{ts}Details{/ts}</th>
87 <th class='link'>{ts}Added by{/ts}</th>
88 <th class='link'>{ts}With{/ts}</th>
89 <th class='link'>{ts}Assignee{/ts}</th>
90 {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
94 {foreach from=$summary.Activity item=row}
95 <tr class="{cycle values="odd-row,even-row"}">
96 <td>{$row.activity_type}</td>
97 <td>{$row.subject|mb_truncate:40}</td>
98 <td>{$row.details|escape}</td>
100 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
101 title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
104 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.target_contact_id`&context=fulltext&key=`$qfKey`"}"
105 title="{ts}View Contact Details{/ts}">{$row.target_sort_name}</a>
108 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.assignee_contact_id`&context=fulltext&key=`$qfKey`"}"
109 title="{ts}View Contact Details{/ts}">{$row.assignee_sort_name}</a>
111 {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
114 <a href="{crmURL p='civicrm/case/activity/view'
115 q="reset=1&aid=`$row.activity_id`&cid=`$row.client_id`&caseID=`$row.case_id`&context=fulltext&key=`$qfKey`"}">
117 <a href="{crmURL p='civicrm/contact/view/activity'
118 q="atype=`$row.activity_type_id`&action=view&reset=1&id=`$row.activity_id`&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">
125 {if !$table and $summary.addShowAllLink.Activity}
126 <div class="crm-section full-text-view-all-section">
127 <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Activity&text=$text"}"
128 title="{ts}View all results for activities{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for activities{/ts}</a>
131 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
132 {* END Actions/Results section *}
136 {if !empty($summary.Case) }
137 <div class="section">
138 {* Search request has returned 1 or more matching rows. Display results. *}
140 : {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>
141 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
142 {* This section displays the rows along and includes the paging controls *}
143 <table id="case_listing" class="display" summary="{ts}Case listings.{/ts}">
146 <th class='link'>{ts}Client Name{/ts}</th>
147 <th class="start_date">{ts}Start Date{/ts}</th>
148 <th class="end_date">{ts}End Date{/ts}</th>
149 <th>{ts}Case ID{/ts}</th>
150 {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
152 <th class="hiddenElement"></th>
153 <th class="hiddenElement"></th>
156 {foreach from=$summary.Case item=row}
157 <tr class="{cycle values="odd-row,even-row"}">
159 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
160 title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
162 <td>{$row.case_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
163 <td>{$row.case_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
164 <td>{$row.case_id}</td>
165 {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
166 {if $row.case_is_deleted}
168 <a href="{crmURL p='civicrm/contact/view/case'
169 q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=renew&context=fulltext&key=`$qfKey`"}">{ts}Restore Case{/ts}</a>
173 <a href="{crmURL p='civicrm/contact/view/case'
174 q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}Manage{/ts}</a>
177 <td class="start_date hiddenElement">{$row.case_start_date|crmDate}</td>
178 <td class="end_date hiddenElement">{$row.case_end_date|crmDate}</td>
182 {if !$table and $summary.addShowAllLink.Case}
183 <div class="crm-section full-text-view-all-section">
184 <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Case&text=$text"}"
185 title="{ts}View all results for cases{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for cases{/ts}</a>
188 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
189 {* END Actions/Results section *}
193 {if !empty($summary.Contribution) }
194 <div class="section">
195 {* Search request has returned 1 or more matching rows. Display results. *}
197 <h3>{ts}Contributions{/ts}
198 : {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>
199 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
200 {* This section displays the rows along and includes the paging controls *}
201 <table id="contribute_listing" class="display" summary="{ts}Contribution listings.{/ts}">
204 <th class='link'>{ts}Contributor's Name{/ts}</th>
205 <th class="currency">{ts}Amount{/ts}</th>
206 <th>{ts}Financial Type{/ts}</th>
207 <th>{ts}Source{/ts}</th>
208 <th class="received_date">{ts}Received{/ts}</th>
209 <th>{ts}Status{/ts}</th>
210 {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
212 <th class="hiddenElement"></th>
215 {foreach from=$summary.Contribution item=row}
216 <tr class="{cycle values="odd-row,even-row"}">
218 <a href="{crmURL p='civicrm/contact/view'
219 q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
220 title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
222 <td>{$row.contribution_total_amount|crmMoney}</td>
223 <td>{$row.financial_type}</td>
224 <td>{$row.contribution_source}</td>
225 <td>{$row.contribution_receive_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
226 <td>{$row.contribution_status}</td>
227 {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
229 <a href="{crmURL p='civicrm/contact/view/contribution'
230 q="reset=1&id=`$row.contribution_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
232 <td class="received_date hiddenElement">{$row.contribution_receive_date|crmDate}</td>
236 {if !$table and $summary.addShowAllLink.Contribution}
237 <div class="crm-section full-text-view-all-section">
238 <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contribution&text=$text"}"
239 title="{ts}View all results for contributions{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for contributions{/ts}</a>
242 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
243 {* END Actions/Results section *}
247 {if !empty($summary.Participant) }
248 <div class="section">
249 {* Search request has returned 1 or more matching rows. *}
251 <h3>{ts}Event Participants{/ts}
252 : {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>
253 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
254 {* This section displays the rows along and includes the paging controls *}
255 <table id="participant_listing" class="display" summary="{ts}Participant listings.{/ts}">
258 <th class='link'>{ts}Participant's Name{/ts}</th>
259 <th>{ts}Event{/ts}</th>
260 <th>{ts}Fee Level{/ts}</th>
261 <th class="currency">{ts}Fee Amount{/ts}</th>
262 <th class="register_date">{ts}Register Date{/ts}</th>
263 <th>{ts}Source{/ts}</th>
264 <th>{ts}Status{/ts}</th>
265 <th>{ts}Role{/ts}</th>
266 {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
268 <th class="hiddenElement"></th>
271 {foreach from=$summary.Participant item=row}
272 <tr class="{cycle values="odd-row,even-row"}">
274 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
275 title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
277 <td>{$row.event_title}</td>
278 <td>{$row.participant_fee_level}</td>
279 <td>{$row.participant_fee_amount|crmMoney}</td>
280 <td>{$row.participant_register_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
281 <td>{$row.participant_source}</td>
282 <td>{$row.participant_status}</td>
283 <td>{$row.participant_role}</td>
284 {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
286 <a href="{crmURL p='civicrm/contact/view/participant'
287 q="reset=1&id=`$row.participant_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
289 <td class="register_date hiddenElement">{$row.participant_register_date|crmDate}</td>
293 {if !$table and $summary.addShowAllLink.Participant}
294 <div class="crm-section full-text-view-all-section"><a
295 href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Participant&text=$text"}"
296 title="{ts}View all results for participants{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for participants{/ts}</a>
298 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
299 {* END Actions/Results section *}
303 {if !empty($summary.Membership) }
304 <div class="section">
305 {* Search request has returned 1 or more matching rows. *}
307 <h3>{ts}Memberships{/ts}
308 : {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>
309 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
310 {* This section displays the rows along and includes the paging controls *}
311 <table id="membership_listing" class="display" summary="{ts}Membership listings.{/ts}">
314 <th class='link'>{ts}Member's Name{/ts}</th>
315 <th>{ts}Membership Type{/ts}</th>
316 <th class="currency">{ts}Membership Fee{/ts}</th>
317 <th class="start_date">{ts}Membership Start Date{/ts}</th>
318 <th class="end_date">{ts}Membership End Date{/ts}</th>
319 <th>{ts}Source{/ts}</th>
320 <th>{ts}Status{/ts}</th>
321 {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
323 <th class="hiddenElement"></th>
324 <th class="hiddenElement"></th>
327 {foreach from=$summary.Membership item=row}
328 <tr class="{cycle values="odd-row,even-row"}">
330 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
331 title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
333 <td>{$row.membership_type}</td>
334 <td>{$row.membership_fee|crmMoney}</td>
335 <td>{$row.membership_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
336 <td>{$row.membership_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
337 <td>{$row.membership_source}</td>
338 <td>{$row.membership_status}</td>
339 {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
341 <a href="{crmURL p='civicrm/contact/view/membership'
342 q="reset=1&id=`$row.membership_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
344 <td class="start_date hiddenElement">{$row.membership_start_date|crmDate}</td>
345 <td class="end_date hiddenElement">{$row.membership_end_date|crmDate}</td>
349 {if !$table and $summary.addShowAllLink.Membership}
350 <div class="crm-section full-text-view-all-section">
351 <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Membership&text=$text"}"
352 title="{ts}View all results for memberships{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for memberships{/ts}</a>
355 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
356 {* END Actions/Results section *}
360 {if !empty($summary.File) }
361 <div class="section">
362 {* Search request has returned 1 or more matching rows. *}
366 {if $summary.Count.File <= $limit}{$summary.Count.File}{else}{ts 1=$limit}%1 or more{/ts}{/if}
368 {$summary.Count.File}
370 {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
372 {* This section displays the rows along and includes the paging controls *}
373 <table id="file_listing" class="display" summary="{ts}File listings.{/ts}">
376 <th class='link'>{ts}File Name{/ts}</th>
377 <th>{ts}Type{/ts}</th>
378 <th>{ts}Attached To{/ts}</th>
383 {foreach from=$summary.File item=row}
384 <tr class="{cycle values="odd-row,even-row"}">
385 <td><a href="{$row.file_url}">{$row.file_name}</a></td>
386 <td>{$row.file_mime_type}</td>
387 <td>{crmCrudLink action=VIEW table=$row.file_entity_table id=$row.file_entity_id}</td>
389 <a href="{$row.file_url}">{ts}View{/ts}</a>
395 {if !$table and $summary.addShowAllLink.File}
396 <div class="crm-section full-text-view-all-section">
397 <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=File&text=$text"}"
398 title="{ts}View all results for files{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all results for files{/ts}</a>
400 {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
401 {* END Actions/Results section *}
405 {if !$table}{include file="CRM/common/pager.tpl" location="bottom"}{/if}