commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / templates / CRM / Activity / Form / ActivityLinks.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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) *}
33 <select name="other_activity" class="crm-form-select crm-select2 crm-action-menu action-icon-plus">
34 <option value="">{ts}New Activity{/ts}</option>
35 {foreach from=$activityTypes key=k item=link}
36 <option value="{$urls.$k}">{$link}</option>
37 {/foreach}
38 </select>
39 {literal}
40 <script type="text/javascript">
41 CRM.$(function($) {
42 $('[name=other_activity].crm-action-menu').change(function() {
43 var
44 $el = $(this),
45 url = $el.val();
46 if (url) {
47 $el.select2('val', '');
48 CRM.loadForm(url).on('crmFormSuccess', function() {
49 CRM.refreshParent($el);
50 });
51 }
52 });
53 });
54 </script>
55 {/literal}
56 {else}
57 <ul>
58 <li class="crm-activity-tab"><a href="#" data-tab="activity">{ts}Record Activity:{/ts}</a></li>
59 {foreach from=$activityTypes key=k item=link}
60 <li class="crm-activity-type_{$k}"><a href="{$urls.$k}" data-tab="activity">{$link}</a></li>
61 {/foreach}
62
63 {* add hook links if any *}
64 {if $hookLinks}
65 {foreach from=$hookLinks item=link}
66 <li>
67 <a href="{$link.url}" data-tab="activity"{if !empty($link.title)} title="{$link.title}"{/if}>
68 {if $link.img}
69 <img src="{$link.img}" alt="{$link.title}" />&nbsp;
70 {/if}
71 {$link.name}
72 </a>
73 </li>
74 {/foreach}
75 {/if}
76
77 </ul>
78
79 {/if}
80
81 {/if}