First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,129 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{* Displays Activities. *}
<div>
{if empty($noFieldSet)}
<h3 class="crm-table-title">{ts}Activities{/ts}</h3>
{/if}
{if $rows}
<form title="activity_pager" action="{crmURL}" method="post">
{include file="CRM/common/pager.tpl" location="top"}
{strip}
<table class="selector row-highlight">
<tr class="columnheader">
{foreach from=$columnHeaders item=header}
<th scope="col">
{if $header.sort}
{assign var='key' value=$header.sort}
{$sort->_response.$key.link}
{else}
{$header.name}
{/if}
</th>
{/foreach}
</tr>
{counter start=0 skip=1 print=false}
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"} {$row.class} crm-activity crm-activity_status-{$row.activity_status_id} crm-activity-type_{$row.activity_type_id}" id="crm-activity_{$row.activity_id}">
<td class="crm-activity-type crm-activity-type_{$row.activity_type_id}">{$row.activity_type}</td>
<td class="crm-activity-subject">{$row.subject}</td>
<td class="crm-activity-source_contact_name">
{if $contactId == $row.source_contact_id}
{$row.source_contact_name}
{elseif $row.source_contact_id}
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.source_contact_id`"}" title="{ts}View contact{/ts}">{$row.source_contact_name}</a>
{else}
<em>n/a</em>
{/if}
</td>
<td class="crm-activity-target_contact_name">
{if $row.mailingId}
<a href="{$row.mailingId}" title="{ts}View Mailing Report{/ts}">{$row.recipients}</a>
{elseif $row.recipients}
{$row.recipients}
{elseif !$row.target_contact_name}
<em>n/a</em>
{elseif $row.target_contact_name}
{assign var="showTarget" value=0}
{foreach from=$row.target_contact_name item=targetName key=targetID}
{if $showTarget < 5}
{if $showTarget};&nbsp;{/if}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$targetID`"}" title="{ts}View contact{/ts}">{$targetName}</a>
{assign var="showTarget" value=$showTarget+1}
{/if}
{/foreach}
{if count($row.target_contact_name) > 5} ({ts}more{/ts}){/if}
{/if}
</td>
<td class="crm-activity-assignee_contact_name">
{if !$row.assignee_contact_name}
<em>n/a</em>
{elseif $row.assignee_contact_name}
{assign var="showAssignee" value=0}
{foreach from=$row.assignee_contact_name item=assigneeName key=assigneeID}
{if $showAssignee < 5}
{if $showAssignee};&nbsp;{/if}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$assigneeID`"}" title="{ts}View contact{/ts}">{$assigneeName}</a>
{assign var="showAssignee" value=$showAssignee+1}
{/if}
{/foreach}
{if count($row.assignee_contact_name) > 5}({ts}more{/ts}){/if}
{/if}
</td>
<td class="crm-activity-date_time">{$row.activity_date_time|crmDate}</td>
<td class="crm-activity-status crm-activity-status_{$row.status_id}">{$row.status}</td>
<td>{$row.action|replace:'xx':$row.id}</td>
</tr>
{/foreach}
</table>
{/strip}
{include file="CRM/common/pager.tpl" location="bottom"}
{include file="CRM/Case/Form/ActivityToCase.tpl" contactID=$contactId}
</form>
{else}
<div class="messages status no-popup">
{if isset($caseview) and $caseview}
{ts}There are no Activities attached to this case record.{/ts}{if $permission EQ 'edit'} {ts}You can go to the Activities tab to create or attach activity records.{/ts}{/if}
{elseif $context eq 'home'}
{ts}There are no Activities to display.{/ts}
{else}
{ts}There are no Activities to display.{/ts}{if $permission EQ 'edit'} {ts}You can use the links above to schedule or record an activity.{/ts}{/if}
{/if}
</div>
{/if}
{if !$noFieldSet}
{/if}
</div>

View file

@ -0,0 +1,100 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
<div class="crm-activity-selector-{$context}">
<div class="crm-accordion-wrapper crm-search_filters-accordion">
<div class="crm-accordion-header">
{ts}Filter by Activity{/ts}</a>
</div><!-- /.crm-accordion-header -->
<div class="crm-accordion-body">
<table class="no-border form-layout-compressed activity-search-options">
<tr>
<td class="crm-contact-form-block-activity_type_filter_id crm-inline-edit-field">
{$form.activity_type_filter_id.label}<br /> {$form.activity_type_filter_id.html|crmAddClass:medium}
</td>
<td class="crm-contact-form-block-activity_type_exclude_filter_id crm-inline-edit-field">
{$form.activity_type_exclude_filter_id.label}<br /> {$form.activity_type_exclude_filter_id.html|crmAddClass:medium}
</td>
{include file="CRM/Core/DateRange.tpl" fieldName="activity_date" from='_low' to='_high' label='Date'}
<td class="crm-contact-form-block-activity_status_filter_id crm-inline-edit-field">
{ts}Status{/ts}<br /> {$form.status_id.html|crmAddClass:medium}
</td>
</tr>
</table>
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
<table class="contact-activity-selector-{$context} crm-ajax-table">
<thead>
<tr>
<th data-data="activity_type" class="crm-contact-activity-activity_type">{ts}Type{/ts}</th>
<th data-data="subject" cell-class="crmf-subject crm-editable" class="crm-contact-activity_subject">{ts}Subject{/ts}</th>
<th data-data="source_contact_name" class="crm-contact-activity-source_contact">{ts}Added By{/ts}</th>
<th data-data="target_contact_name" data-orderable="false" class="crm-contact-activity-target_contact">{ts}With{/ts}</th>
<th data-data="assignee_contact_name" data-orderable="false" class="crm-contact-activity-assignee_contact">{ts}Assigned{/ts}</th>
<th data-data="activity_date_time" class="crm-contact-activity-activity_date">{ts}Date{/ts}</th>
<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>
<th data-data="links" data-orderable="false" class="crm-contact-activity-links">&nbsp;</th>
</tr>
</thead>
</table>
{literal}
<script type="text/javascript">
(function($) {
var context = {/literal}"{$context}"{literal};
CRM.$('table.contact-activity-selector-' + context).data({
"ajax": {
"url": {/literal}'{crmURL p="civicrm/ajax/contactactivity" h=0 q="snippet=4&context=$context&cid=$contactId"}'{literal},
"data": function (d) {
var status_id = $('.crm-activity-selector-' + context + ' select#status_id').val() || [];
d.activity_type_id = $('.crm-activity-selector-' + context + ' select#activity_type_filter_id').val(),
d.activity_type_exclude_id = $('.crm-activity-selector-' + context + ' select#activity_type_exclude_filter_id').val(),
d.activity_date_relative = $('select#activity_date_relative').val(),
d.activity_date_low = $('#activity_date_low').val(),
d.activity_date_high = $('#activity_date_high').val(),
d.activity_status_id = status_id.join(',')
}
}
});
$(function($) {
$('.activity-search-options :input').change(function(){
CRM.$('table.contact-activity-selector-' + context).DataTable().draw();
});
});
})(CRM.$);
</script>
{/literal}
<style type="text/css">
{crmAPI var='statuses' entity='OptionValue' action='get' return="color,value" option_limit=0 option_group_id="activity_status"}
{foreach from=$statuses.values item=status}
{if !empty($status.color)}
table.contact-activity-selector-{$context} tr.status-id-{$status.value} {ldelim}
border-left: 3px solid {$status.color};
{rdelim}
{/if}
{/foreach}
</style>
</div>
{include file="CRM/Case/Form/ActivityToCase.tpl" contactID=$contactId}