Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
2a73d3b0 | 5 | | Copyright CiviCRM LLC (c) 2004-2017 | |
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 | *} | |
6a488035 TO |
26 | <div class="crm-activity-selector-{$context}"> |
27 | <div class="crm-accordion-wrapper crm-search_filters-accordion"> | |
28 | <div class="crm-accordion-header"> | |
29 | {ts}Filter by Activity Type{/ts}</a> | |
30 | </div><!-- /.crm-accordion-header --> | |
31 | <div class="crm-accordion-body"> | |
7d12de7f | 32 | <div class="no-border form-layout-compressed activity-search-options"> |
6a488035 TO |
33 | <div class="crm-contact-form-block-activity_type_filter_id crm-inline-edit-field"> |
34 | {$form.activity_type_filter_id.label} {$form.activity_type_filter_id.html|crmAddClass:big} | |
35 | </div> | |
36 | <div class="crm-contact-form-block-activity_type_exclude_filter_id crm-inline-edit-field"> | |
37 | {$form.activity_type_exclude_filter_id.label} {$form.activity_type_exclude_filter_id.html|crmAddClass:big} | |
38 | </div> | |
39 | </div> | |
40 | </div><!-- /.crm-accordion-body --> | |
41 | </div><!-- /.crm-accordion-wrapper --> | |
11438af7 | 42 | <table class="contact-activity-selector-{$context} crm-ajax-table"> |
6a488035 TO |
43 | <thead> |
44 | <tr> | |
7d12de7f | 45 | <th data-data="activity_type" class="crm-contact-activity-activity_type">{ts}Type{/ts}</th> |
bff3913a | 46 | <th data-data="subject" cell-class="crmf-subject crm-editable" class="crm-contact-activity_subject">{ts}Subject{/ts}</th> |
7d12de7f JL |
47 | <th data-data="source_contact_name" class="crm-contact-activity-source_contact">{ts}Added By{/ts}</th> |
48 | <th data-data="target_contact_name" data-orderable="false" class="crm-contact-activity-target_contact">{ts}With{/ts}</th> | |
49 | <th data-data="assignee_contact_name" data-orderable="false" class="crm-contact-activity-assignee_contact">{ts}Assigned{/ts}</th> | |
50 | <th data-data="activity_date_time" class="crm-contact-activity-activity_date">{ts}Date{/ts}</th> | |
51 | <th data-data="status_id" cell-class="crmf-status_id crm-editable" cell-data-type="select" cell-data-refresh="true" class="crm-contact-activity-activity_status">{ts}Status{/ts}</th> | |
52 | <th data-data="links" data-orderable="false" class="crm-contact-activity-links"> </th> | |
6a488035 TO |
53 | </tr> |
54 | </thead> | |
55 | </table> | |
6a488035 | 56 | |
7d12de7f JL |
57 | {literal} |
58 | <script type="text/javascript"> | |
59 | (function($) { | |
4b55377e JL |
60 | var context = {/literal}"{$context}"{literal}; |
61 | CRM.$('table.contact-activity-selector-' + context).data({ | |
7d12de7f JL |
62 | "ajax": { |
63 | "url": {/literal}'{crmURL p="civicrm/ajax/contactactivity" h=0 q="snippet=4&context=$context&cid=$contactId"}'{literal}, | |
64 | "data": function (d) { | |
23289ddd | 65 | d.activity_type_id = $('.crm-activity-selector-' + context + ' select#activity_type_filter_id').val(), |
66 | d.activity_type_exclude_id = $('.crm-activity-selector-' + context + ' select#activity_type_exclude_filter_id').val() | |
7d12de7f JL |
67 | } |
68 | } | |
2c68626a | 69 | }); |
7d12de7f JL |
70 | $(function($) { |
71 | $('.activity-search-options :input').change(function(){ | |
23289ddd | 72 | CRM.$('table.contact-activity-selector-' + context).DataTable().draw(); |
7d12de7f JL |
73 | }); |
74 | }); | |
75 | })(CRM.$); | |
76 | </script> | |
77 | {/literal} | |
b62580ac CW |
78 | <style type="text/css"> |
79 | {crmAPI var='statuses' entity='OptionValue' action='get' return="color,value" option_limit=0 option_group_id="activity_status"} | |
80 | {foreach from=$statuses.values item=status} | |
81 | {if !empty($status.color)} | |
82 | table.contact-activity-selector-{$context} tr.status-id-{$status.value} {ldelim} | |
83 | border-left: 3px solid {$status.color}; | |
84 | {rdelim} | |
85 | {/if} | |
86 | {/foreach} | |
87 | </style> | |
7d12de7f JL |
88 | </div> |
89 | {include file="CRM/Case/Form/ActivityToCase.tpl" contactID=$contactId} |