Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {* Template for Full-text search component. *} | |
11 | <div class="crm-block crm-form-block crm-search-form-block"> | |
70ec7bcc | 12 | <div id="searchForm"> |
6a488035 | 13 | <div class="form-item"> |
70ec7bcc | 14 | <table class="form-layout-compressed"> |
6a488035 | 15 | <tr> |
9255b88d SL |
16 | <td> |
17 | <label>{$form.text.label}</label> | |
18 | {$form.text.html} | |
19 | </td> | |
20 | <td> | |
21 | <label>{ts}in...{/ts}</label> | |
22 | {$form.table.html} | |
23 | </td> | |
70ec7bcc | 24 | <td>{$form.buttons.html} {help id="id-fullText"}</td> |
6a488035 | 25 | </tr> |
70ec7bcc | 26 | </table> |
6a488035 | 27 | </div> |
70ec7bcc | 28 | </div> |
6a488035 TO |
29 | </div> |
30 | <div class="crm-block crm-content-block"> | |
82de5f35 | 31 | {if !$table}{include file="CRM/common/pager.tpl" location="top"}{/if} |
6a488035 TO |
32 | {include file="CRM/common/jsortable.tpl"} |
33 | {if $rowsEmpty} | |
70ec7bcc | 34 | {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} |
6a488035 TO |
35 | {/if} |
36 | ||
ef79e4f5 | 37 | {* @TODO: This is confusing - the variable `table` is already set and used above, and now we set it again to something that is technically different but has the same value, except on a blank form where it doesn't exist, but effectively then is the same value that it already has which is ''. So do we need this line even? *} |
38 | {if (isset($form.table.value.0))}{assign var=table value=$form.table.value.0}{/if} | |
6a488035 TO |
39 | {assign var=text value=$form.text.value} |
40 | {if !empty($summary.Contact) } | |
70ec7bcc | 41 | <div class="section"> |
6a488035 | 42 | {* Search request has returned 1 or more matching rows. Display results. *} |
70ec7bcc | 43 | <h3>{ts}Contacts{/ts} |
44 | : {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> | |
45 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
46 | {* This section displays the rows along and includes the paging controls *} | |
70ec7bcc | 47 | <table id="contact_listing" class="display" class="selector" summary="{ts}Contact listings.{/ts}"> |
48 | <thead> | |
49 | <tr> | |
50 | <th class='link'>{ts}Name{/ts}</th> | |
cac9c01d | 51 | {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if} |
70ec7bcc | 52 | <th></th> |
53 | </tr> | |
54 | </thead> | |
55 | {foreach from=$summary.Contact item=row} | |
56 | <tr class="{cycle values="odd-row,even-row"}"> | |
57 | <td><a | |
58 | href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 59 | title="{ts}View Contact Details{/ts}">{$row.sort_name}</a></td> |
cac9c01d | 60 | {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if} |
70ec7bcc | 61 | <td><a |
62 | href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a> | |
63 | </td> | |
64 | </tr> | |
65 | {/foreach} | |
66 | </table> | |
70ec7bcc | 67 | {if !$table and $summary.addShowAllLink.Contact} |
68 | <div class="crm-section full-text-view-all-section"> | |
69 | <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contact&text=$text"}" | |
dd7e23f2 | 70 | 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> |
70ec7bcc | 71 | </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} | |
6a488035 | 74 | {* END Actions/Results section *} |
70ec7bcc | 75 | </div> |
6a488035 TO |
76 | {/if} |
77 | ||
78 | {if !empty($summary.Activity) } | |
70ec7bcc | 79 | <div class="section"> |
6a488035 TO |
80 | {* Search request has returned 1 or more matching rows. Display results. *} |
81 | ||
70ec7bcc | 82 | <h3>{ts}Activities{/ts} |
83 | : {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> | |
84 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
85 | {* This section displays the rows along and includes the paging controls *} | |
70ec7bcc | 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> | |
ff3f9641 | 92 | <th class='link'>{ts}Added by{/ts}</th> |
70ec7bcc | 93 | <th class='link'>{ts}With{/ts}</th> |
94 | <th class='link'>{ts}Assignee{/ts}</th> | |
cac9c01d | 95 | {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if} |
70ec7bcc | 96 | <th></th> |
97 | </tr> | |
98 | </thead> | |
99 | {foreach from=$summary.Activity item=row} | |
100 | <tr class="{cycle values="odd-row,even-row"}"> | |
101 | <td>{$row.activity_type}</td> | |
102 | <td>{$row.subject|mb_truncate:40}</td> | |
103 | <td>{$row.details|escape}</td> | |
104 | <td> | |
105 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 106 | title="{ts}View Contact Details{/ts}">{$row.sort_name}</a> |
70ec7bcc | 107 | </td> |
108 | <td> | |
109 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.target_contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 110 | title="{ts}View Contact Details{/ts}">{$row.target_sort_name}</a> |
70ec7bcc | 111 | </td> |
112 | <td> | |
113 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.assignee_contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 114 | title="{ts}View Contact Details{/ts}">{$row.assignee_sort_name}</a> |
70ec7bcc | 115 | </td> |
cac9c01d | 116 | {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if} |
70ec7bcc | 117 | <td> |
118 | {if $row.case_id } | |
119 | <a href="{crmURL p='civicrm/case/activity/view' | |
120 | q="reset=1&aid=`$row.activity_id`&cid=`$row.client_id`&caseID=`$row.case_id`&context=fulltext&key=`$qfKey`"}"> | |
121 | {else} | |
122 | <a href="{crmURL p='civicrm/contact/view/activity' | |
123 | q="atype=`$row.activity_type_id`&action=view&reset=1&id=`$row.activity_id`&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"> | |
124 | {/if} | |
125 | {ts}View{/ts}</a> | |
126 | </td> | |
127 | </tr> | |
128 | {/foreach} | |
129 | </table> | |
70ec7bcc | 130 | {if !$table and $summary.addShowAllLink.Activity} |
131 | <div class="crm-section full-text-view-all-section"> | |
132 | <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Activity&text=$text"}" | |
dd7e23f2 | 133 | 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> |
70ec7bcc | 134 | </div> |
135 | {/if} | |
136 | {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} | |
6a488035 | 137 | {* END Actions/Results section *} |
70ec7bcc | 138 | </div> |
6a488035 TO |
139 | {/if} |
140 | ||
141 | {if !empty($summary.Case) } | |
70ec7bcc | 142 | <div class="section"> |
6a488035 | 143 | {* Search request has returned 1 or more matching rows. Display results. *} |
70ec7bcc | 144 | <h3>{ts}Cases{/ts} |
145 | : {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> | |
146 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
147 | {* This section displays the rows along and includes the paging controls *} | |
70ec7bcc | 148 | <table id="case_listing" class="display" summary="{ts}Case listings.{/ts}"> |
149 | <thead> | |
150 | <tr> | |
151 | <th class='link'>{ts}Client Name{/ts}</th> | |
152 | <th class="start_date">{ts}Start Date{/ts}</th> | |
153 | <th class="end_date">{ts}End Date{/ts}</th> | |
154 | <th>{ts}Case ID{/ts}</th> | |
cac9c01d | 155 | {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if} |
70ec7bcc | 156 | <th></th> |
157 | <th class="hiddenElement"></th> | |
158 | <th class="hiddenElement"></th> | |
159 | </tr> | |
160 | </thead> | |
161 | {foreach from=$summary.Case item=row} | |
162 | <tr class="{cycle values="odd-row,even-row"}"> | |
163 | <td> | |
164 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 165 | title="{ts}View Contact Details{/ts}">{$row.sort_name}</a> |
70ec7bcc | 166 | </td> |
167 | <td>{$row.case_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td> | |
168 | <td>{$row.case_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td> | |
169 | <td>{$row.case_id}</td> | |
cac9c01d | 170 | {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if} |
70ec7bcc | 171 | {if $row.case_is_deleted} |
172 | <td> | |
173 | <a href="{crmURL p='civicrm/contact/view/case' | |
174 | q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=renew&context=fulltext&key=`$qfKey`"}">{ts}Restore Case{/ts}</a> | |
175 | </td> | |
176 | {else} | |
177 | <td> | |
178 | <a href="{crmURL p='civicrm/contact/view/case' | |
179 | q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}Manage{/ts}</a> | |
180 | </td> | |
181 | {/if} | |
182 | <td class="start_date hiddenElement">{$row.case_start_date|crmDate}</td> | |
183 | <td class="end_date hiddenElement">{$row.case_end_date|crmDate}</td> | |
184 | </tr> | |
185 | {/foreach} | |
186 | </table> | |
70ec7bcc | 187 | {if !$table and $summary.addShowAllLink.Case} |
188 | <div class="crm-section full-text-view-all-section"> | |
189 | <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Case&text=$text"}" | |
dd7e23f2 | 190 | 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> |
70ec7bcc | 191 | </div> |
192 | {/if} | |
193 | {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} | |
6a488035 | 194 | {* END Actions/Results section *} |
70ec7bcc | 195 | </div> |
6a488035 TO |
196 | {/if} |
197 | ||
198 | {if !empty($summary.Contribution) } | |
70ec7bcc | 199 | <div class="section"> |
6a488035 TO |
200 | {* Search request has returned 1 or more matching rows. Display results. *} |
201 | ||
70ec7bcc | 202 | <h3>{ts}Contributions{/ts} |
203 | : {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> | |
204 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
205 | {* This section displays the rows along and includes the paging controls *} | |
70ec7bcc | 206 | <table id="contribute_listing" class="display" summary="{ts}Contribution listings.{/ts}"> |
207 | <thead> | |
208 | <tr> | |
209 | <th class='link'>{ts}Contributor's Name{/ts}</th> | |
210 | <th class="currency">{ts}Amount{/ts}</th> | |
211 | <th>{ts}Financial Type{/ts}</th> | |
212 | <th>{ts}Source{/ts}</th> | |
213 | <th class="received_date">{ts}Received{/ts}</th> | |
214 | <th>{ts}Status{/ts}</th> | |
cac9c01d | 215 | {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if} |
70ec7bcc | 216 | <th></th> |
217 | <th class="hiddenElement"></th> | |
218 | </tr> | |
219 | </thead> | |
220 | {foreach from=$summary.Contribution item=row} | |
221 | <tr class="{cycle values="odd-row,even-row"}"> | |
222 | <td> | |
223 | <a href="{crmURL p='civicrm/contact/view' | |
224 | q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 225 | title="{ts}View Contact Details{/ts}">{$row.sort_name}</a> |
70ec7bcc | 226 | </td> |
227 | <td>{$row.contribution_total_amount|crmMoney}</td> | |
228 | <td>{$row.financial_type}</td> | |
229 | <td>{$row.contribution_source}</td> | |
230 | <td>{$row.contribution_receive_date|crmDate:"%b %d, %Y %l:%M %P"}</td> | |
231 | <td>{$row.contribution_status}</td> | |
cac9c01d | 232 | {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if} |
70ec7bcc | 233 | <td> |
234 | <a href="{crmURL p='civicrm/contact/view/contribution' | |
235 | q="reset=1&id=`$row.contribution_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a> | |
236 | </td> | |
237 | <td class="received_date hiddenElement">{$row.contribution_receive_date|crmDate}</td> | |
238 | </tr> | |
239 | {/foreach} | |
240 | </table> | |
70ec7bcc | 241 | {if !$table and $summary.addShowAllLink.Contribution} |
242 | <div class="crm-section full-text-view-all-section"> | |
243 | <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contribution&text=$text"}" | |
dd7e23f2 | 244 | 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> |
70ec7bcc | 245 | </div> |
246 | {/if} | |
247 | {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} | |
6a488035 | 248 | {* END Actions/Results section *} |
70ec7bcc | 249 | </div> |
6a488035 TO |
250 | {/if} |
251 | ||
252 | {if !empty($summary.Participant) } | |
70ec7bcc | 253 | <div class="section"> |
6a488035 TO |
254 | {* Search request has returned 1 or more matching rows. *} |
255 | ||
70ec7bcc | 256 | <h3>{ts}Event Participants{/ts} |
257 | : {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> | |
258 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
259 | {* This section displays the rows along and includes the paging controls *} | |
70ec7bcc | 260 | <table id="participant_listing" class="display" summary="{ts}Participant listings.{/ts}"> |
261 | <thead> | |
262 | <tr> | |
263 | <th class='link'>{ts}Participant's Name{/ts}</th> | |
264 | <th>{ts}Event{/ts}</th> | |
265 | <th>{ts}Fee Level{/ts}</th> | |
266 | <th class="currency">{ts}Fee Amount{/ts}</th> | |
267 | <th class="register_date">{ts}Register Date{/ts}</th> | |
268 | <th>{ts}Source{/ts}</th> | |
269 | <th>{ts}Status{/ts}</th> | |
270 | <th>{ts}Role{/ts}</th> | |
cac9c01d | 271 | {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if} |
70ec7bcc | 272 | <th></th> |
273 | <th class="hiddenElement"></th> | |
274 | </tr> | |
275 | </thead> | |
276 | {foreach from=$summary.Participant item=row} | |
277 | <tr class="{cycle values="odd-row,even-row"}"> | |
278 | <td> | |
279 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 280 | title="{ts}View Contact Details{/ts}">{$row.sort_name}</a> |
70ec7bcc | 281 | </td> |
282 | <td>{$row.event_title}</td> | |
283 | <td>{$row.participant_fee_level}</td> | |
284 | <td>{$row.participant_fee_amount|crmMoney}</td> | |
285 | <td>{$row.participant_register_date|crmDate:"%b %d, %Y %l:%M %P"}</td> | |
286 | <td>{$row.participant_source}</td> | |
287 | <td>{$row.participant_status}</td> | |
288 | <td>{$row.participant_role}</td> | |
cac9c01d | 289 | {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if} |
70ec7bcc | 290 | <td> |
291 | <a href="{crmURL p='civicrm/contact/view/participant' | |
292 | q="reset=1&id=`$row.participant_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a> | |
293 | </td> | |
294 | <td class="register_date hiddenElement">{$row.participant_register_date|crmDate}</td> | |
295 | </tr> | |
296 | {/foreach} | |
297 | </table> | |
70ec7bcc | 298 | {if !$table and $summary.addShowAllLink.Participant} |
299 | <div class="crm-section full-text-view-all-section"><a | |
300 | href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Participant&text=$text"}" | |
dd7e23f2 | 301 | 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> |
70ec7bcc | 302 | </div>{/if} |
303 | {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} | |
6a488035 | 304 | {* END Actions/Results section *} |
70ec7bcc | 305 | </div> |
6a488035 TO |
306 | {/if} |
307 | ||
308 | {if !empty($summary.Membership) } | |
70ec7bcc | 309 | <div class="section"> |
6a488035 TO |
310 | {* Search request has returned 1 or more matching rows. *} |
311 | ||
70ec7bcc | 312 | <h3>{ts}Memberships{/ts} |
313 | : {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> | |
314 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
315 | {* This section displays the rows along and includes the paging controls *} | |
70ec7bcc | 316 | <table id="membership_listing" class="display" summary="{ts}Membership listings.{/ts}"> |
317 | <thead> | |
318 | <tr> | |
319 | <th class='link'>{ts}Member's Name{/ts}</th> | |
320 | <th>{ts}Membership Type{/ts}</th> | |
321 | <th class="currency">{ts}Membership Fee{/ts}</th> | |
322 | <th class="start_date">{ts}Membership Start Date{/ts}</th> | |
323 | <th class="end_date">{ts}Membership End Date{/ts}</th> | |
324 | <th>{ts}Source{/ts}</th> | |
325 | <th>{ts}Status{/ts}</th> | |
cac9c01d | 326 | {if $allowFileSearch}<th>{ts}File{/ts}</th>{/if} |
70ec7bcc | 327 | <th></th> |
328 | <th class="hiddenElement"></th> | |
329 | <th class="hiddenElement"></th> | |
330 | </tr> | |
331 | </thead> | |
332 | {foreach from=$summary.Membership item=row} | |
333 | <tr class="{cycle values="odd-row,even-row"}"> | |
334 | <td> | |
335 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}" | |
aee9e297 | 336 | title="{ts}View Contact Details{/ts}">{$row.sort_name}</a> |
70ec7bcc | 337 | </td> |
338 | <td>{$row.membership_type}</td> | |
339 | <td>{$row.membership_fee|crmMoney}</td> | |
340 | <td>{$row.membership_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td> | |
341 | <td>{$row.membership_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td> | |
342 | <td>{$row.membership_source}</td> | |
343 | <td>{$row.membership_status}</td> | |
cac9c01d | 344 | {if $allowFileSearch}<td>{$row.fileHtml}</td>{/if} |
70ec7bcc | 345 | <td> |
346 | <a href="{crmURL p='civicrm/contact/view/membership' | |
347 | q="reset=1&id=`$row.membership_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a> | |
348 | </td> | |
349 | <td class="start_date hiddenElement">{$row.membership_start_date|crmDate}</td> | |
350 | <td class="end_date hiddenElement">{$row.membership_end_date|crmDate}</td> | |
351 | </tr> | |
352 | {/foreach} | |
353 | </table> | |
70ec7bcc | 354 | {if !$table and $summary.addShowAllLink.Membership} |
355 | <div class="crm-section full-text-view-all-section"> | |
356 | <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Membership&text=$text"}" | |
dd7e23f2 | 357 | 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> |
70ec7bcc | 358 | </div> |
359 | {/if} | |
360 | {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} | |
6a488035 | 361 | {* END Actions/Results section *} |
70ec7bcc | 362 | </div> |
6a488035 | 363 | {/if} |
2f5c26f8 TO |
364 | |
365 | {if !empty($summary.File) } | |
366 | <div class="section"> | |
367 | {* Search request has returned 1 or more matching rows. *} | |
368 | ||
369 | <h3>{ts}Files{/ts}: | |
370 | {if !$table} | |
371 | {if $summary.Count.File <= $limit}{$summary.Count.File}{else}{ts 1=$limit}%1 or more{/ts}{/if} | |
372 | {else} | |
373 | {$summary.Count.File} | |
374 | {/if}</h3> | |
375 | {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} | |
376 | ||
377 | {* This section displays the rows along and includes the paging controls *} | |
378 | <table id="file_listing" class="display" summary="{ts}File listings.{/ts}"> | |
379 | <thead> | |
380 | <tr> | |
381 | <th class='link'>{ts}File Name{/ts}</th> | |
382 | <th>{ts}Type{/ts}</th> | |
383 | <th>{ts}Attached To{/ts}</th> | |
384 | <th></th> | |
385 | </tr> | |
386 | </thead> | |
387 | <tbody> | |
388 | {foreach from=$summary.File item=row} | |
389 | <tr class="{cycle values="odd-row,even-row"}"> | |
390 | <td><a href="{$row.file_url}">{$row.file_name}</a></td> | |
391 | <td>{$row.file_mime_type}</td> | |
392 | <td>{crmCrudLink action=VIEW table=$row.file_entity_table id=$row.file_entity_id}</td> | |
393 | <td> | |
394 | <a href="{$row.file_url}">{ts}View{/ts}</a> | |
395 | </td> | |
396 | </tr> | |
397 | {/foreach} | |
398 | </tbody> | |
399 | </table> | |
400 | {if !$table and $summary.addShowAllLink.File} | |
401 | <div class="crm-section full-text-view-all-section"> | |
402 | <a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=File&text=$text"}" | |
dd7e23f2 | 403 | 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> |
2f5c26f8 TO |
404 | </div>{/if} |
405 | {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} | |
406 | {* END Actions/Results section *} | |
407 | </div> | |
408 | {/if} | |
409 | ||
82de5f35 | 410 | {if !$table}{include file="CRM/common/pager.tpl" location="bottom"}{/if} |
6a488035 | 411 | </div> |