Commit | Line | Data |
---|---|---|
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 | {* $context indicates where we are searching, values = "search,advanced,smog,amtg" *} | |
27 | {* smog = 'show members of group'; amtg = 'add members to group' *} | |
28 | {if $context EQ 'smog'} | |
29 | {* Provide link to modify smart group search criteria if we are viewing a smart group (ssID = saved search ID) *} | |
30 | {if !empty($ssID)} | |
31 | {if $ssMappingID} | |
32 | {capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/builder" q="reset=1&force=1&ssID=`$ssID`"}{/capture} | |
33 | {elseif $savedSearch.search_custom_id} | |
34 | {capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/custom" q="reset=1&force=1&ssID=`$ssID`"}{/capture} | |
35 | {else} | |
36 | {capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/advanced" q="reset=1&force=1&ssID=`$ssID`"}{/capture} | |
37 | {/if} | |
38 | <div class="crm-submit-buttons"> | |
39 | <a href="{$editSmartGroupURL}" class="button"><span><div class="icon edit-icon"></div> {ts 1=$group.title}Edit Smart Group Search Criteria for %1{/ts}</span></a> | |
40 | {help id="id-edit-smartGroup"} | |
41 | </div> | |
42 | {/if} | |
43 | ||
44 | {if $permissionedForGroup} | |
45 | {capture assign=addMembersURL}{crmURL q="context=amtg&amtgID=`$group.id`&reset=1"}{/capture} | |
46 | <div class="crm-submit-buttons"> | |
47 | <a href="{$addMembersURL}" class="button"><span><div class="icon add-icon"></div> {ts 1=$group.title}Add Contacts to %1{/ts}</span></a> | |
48 | {if $ssID}{help id="id-add-to-smartGroup"}{/if} | |
49 | </div> | |
50 | {/if} | |
51 | {/if} |