{* +--------------------------------------------------------------------+ | CiviCRM version 4.5 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | 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. *}
{if empty($noFieldSet)}

{ts}Activities{/ts}

{/if} {if $rows}
{include file="CRM/common/pager.tpl" location="top"} {strip} {foreach from=$columnHeaders item=header} {/foreach} {counter start=0 skip=1 print=false} {foreach from=$rows item=row} {/foreach}
{if $header.sort} {assign var='key' value=$header.sort} {$sort->_response.$key.link} {else} {$header.name} {/if}
{$row.activity_type} {$row.subject} {if $contactId == $row.source_contact_id} {$row.source_contact_name} {elseif $row.source_contact_id} {$row.source_contact_name} {else} n/a {/if} {if $row.mailingId} {$row.recipients} {elseif $row.recipients} {$row.recipients} {elseif !$row.target_contact_name} n/a {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}; {/if}{$targetName} {assign var="showTarget" value=$showTarget+1} {/if} {/foreach} {if count($row.target_contact_name) > 5} ({ts}more{/ts}){/if} {/if} {if !$row.assignee_contact_name} n/a {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}; {/if}{$assigneeName} {assign var="showAssignee" value=$showAssignee+1} {/if} {/foreach} {if count($row.assignee_contact_name) > 5}({ts}more{/ts}){/if} {/if} {$row.activity_date_time|crmDate} {$row.status} {$row.action|replace:'xx':$row.id}
{/strip} {include file="CRM/common/pager.tpl" location="bottom"} {include file="CRM/Case/Form/ActivityToCase.tpl" contactID=$contactId}
{else}
{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 Activites to display.{/ts}{if $permission EQ 'edit'} {ts}You can use the links above to schedule or record an activity.{/ts}{/if} {/if}
{/if} {if !$noFieldSet} {/if}