Merge pull request #2564 from jaapjansma/CRM-14276
[civicrm-core.git] / templates / CRM / Contact / Form / Search / ResultTasks.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
6a488035
TO
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{* Form elements for displaying and running action tasks on search results *}
27{capture assign=advSearchURL}
28{if $context EQ 'smog'}{crmURL p='civicrm/group/search/advanced' q="gid=`$group.id`&reset=1&force=1"}
29{elseif $context EQ 'amtg'}{crmURL p='civicrm/contact/search/advanced' q="context=amtg&amtgID=`$group.id`&reset=1&force=1"}
30{else}{crmURL p='civicrm/contact/search/advanced' q="reset=1"}
31{/if}{/capture}
32{capture assign=searchBuilderURL}{crmURL p='civicrm/contact/search/builder' q="reset=1"}{/capture}
33
34 <div id="search-status">
35 <div class="float-right right">
36 {if $action eq 256}
37 <a href="{$advSearchURL}">&raquo; {ts}Advanced Search{/ts}</a><br />
38 {if $context eq 'search'} {* Only show Search Builder link for basic search. *}
39 <a href="{$searchBuilderURL}">&raquo; {ts}Search Builder{/ts}</a><br />
40 {/if}
41 {if $context eq 'smog'}
42 {help id="id-smog-criteria" group_id=$group.id group_title=$group.title ssID=$ssID ssMappingID=$ssMappingID permissionedForGroup=$permissionedForGroup}
43 {elseif $context eq 'amtg'}
44 {help id="id-amtg-criteria" group_title=$group.title}
45 {else}
46 {help id="id-basic-criteria"}
47 {/if}
48 {elseif $action eq 512}
49 <a href="{$searchBuilderURL}">&raquo; {ts}Search Builder{/ts}</a><br />
50 {elseif $action eq 8192}
51 <a href="{$advSearchURL}">&raquo; {ts}Advanced Search{/ts}</a><br />
52 {/if}
53 </div>
54
55 <table class="form-layout-compressed">
56 <tr>
57 <td class="font-size12pt" style="width: 30%;">
58 {if $savedSearch.name}{$savedSearch.name} ({ts}smart group{/ts}) - {/if}
59 {ts count=$pager->_totalItems plural='%count Contacts'}%count Contact{/ts}
60 </td>
61
62 {* Search criteria are passed to tpl in the $qill array *}
63 <td class="nowrap">
64 {if $qill}
65 {include file="CRM/common/displaySearchCriteria.tpl"}
66 {/if}
67 </td>
68 </tr>
69 <tr>
70 <td class="font-size11pt"> {ts}Select Records{/ts}:</td>
71 <td class="nowrap">
72 {$form.radio_ts.ts_all.html} <label for="{$ts_all_id}">{ts count=$pager->_totalItems plural='All %count records'}The found record{/ts}</label> &nbsp; {if $pager->_totalItems > 1} {$form.radio_ts.ts_sel.html} <label for="{$ts_sel_id}">{ts}Selected records only{/ts}</label>{/if}
73 </td>
74 </tr>
75 <tr>
76 <td colspan="2">
62c10c94 77 {* Hide export button in 'Add Members to Group' context. *}
6a488035 78 {if $context NEQ 'amtg'}
6a488035
TO
79 {$form.task.html}
80 {/if}
81 {if $action eq 512}
82 {$form._qf_Advanced_next_action.html}
83 {elseif $action eq 8192}
84 {$form._qf_Builder_next_action.html}&nbsp;&nbsp;
85 {elseif $action eq 16384}
86 {$form._qf_Custom_next_action.html}&nbsp;&nbsp;
87 {else}
88 {$form._qf_Basic_next_action.html}
89 {/if}
90 </td>
91 </tr>
92 </table>
93 </div>
94
95{literal}
96<script type="text/javascript">
3cc60a06 97CRM.$(function($) {
d664f648
CW
98 toggleTaskAction( );
99});
6a488035
TO
100</script>
101{/literal}