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 | {* Links for scheduling/logging meetings and calls and Sending Email *} | |
27 | {if $cdType eq false } | |
28 | {if $contact_id } | |
29 | {assign var = "contactId" value= $contact_id } | |
30 | {/if} | |
31 | ||
32 | {if $as_select} {* on 3.2, the activities can be either a drop down select (on the activity tab) or a list (on the action menu) *} | |
941539e7 | 33 | <select name="other_activity" class="crm-form-select crm-select2 crm-action-menu action-icon-plus"> |
1eae8b7a | 34 | <option value="">{ts}New Activity{/ts}</option> |
6a488035 TO |
35 | {foreach from=$activityTypes key=k item=link} |
36 | <option value="{$urls.$k}">{$link}</option> | |
37 | {/foreach} | |
38 | </select> | |
23223213 CW |
39 | {literal} |
40 | <script type="text/javascript"> | |
3cc60a06 | 41 | CRM.$(function($) { |
982ba75d | 42 | $('[name=other_activity].crm-action-menu').change(function() { |
23223213 CW |
43 | var |
44 | $el = $(this), | |
45 | url = $el.val(); | |
46 | if (url) { | |
982ba75d | 47 | $el.select2('val', ''); |
23223213 | 48 | CRM.loadForm(url).on('crmFormSuccess', function() { |
554b1768 | 49 | CRM.refreshParent($el); |
23223213 CW |
50 | }); |
51 | } | |
52 | }); | |
53 | }); | |
54 | </script> | |
55 | {/literal} | |
6a488035 TO |
56 | {else} |
57 | <ul> | |
a10432db | 58 | <li class="crm-activity-tab"><a href="#" data-tab="activity">{ts}Record Activity:{/ts}</a></li> |
6a488035 | 59 | {foreach from=$activityTypes key=k item=link} |
1fbcba34 | 60 | <li class="crm-activity-type_{$k}"><a href="{$urls.$k}" data-tab="activity">{$link}</a></li> |
6a488035 TO |
61 | {/foreach} |
62 | ||
63 | {* add hook links if any *} | |
64 | {if $hookLinks} | |
65 | {foreach from=$hookLinks item=link} | |
66 | <li> | |
8e4ec1f5 | 67 | <a href="{$link.url}" data-tab="activity"{if !empty($link.title)} title="{$link.title}"{/if}> |
6a488035 TO |
68 | {if $link.img} |
69 | <img src="{$link.img}" alt="{$link.title}" /> | |
70 | {/if} | |
a9b15f31 | 71 | {$link.name} |
6a488035 TO |
72 | </a> |
73 | </li> | |
74 | {/foreach} | |
75 | {/if} | |
76 | ||
77 | </ul> | |
78 | ||
79 | {/if} | |
80 | ||
81 | {/if} |