First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
182
sites/all/modules/civicrm/templates/CRM/Case/Audit/Audit.tpl
Normal file
182
sites/all/modules/civicrm/templates/CRM/Case/Audit/Audit.tpl
Normal file
|
@ -0,0 +1,182 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{*
|
||||
Notes:
|
||||
- Any id's should be prefixed with civicase-audit to avoid name collisions.
|
||||
- The idea behind the regex_replace is that for a css selector on a field, we can make it simple by saying the convention is to use the field label, but convert to lower case and strip out all except a-z and 0-9.
|
||||
There's the potential for collisions (two different labels having the same shortened version), but it would be odd for the user to configure fields that way, and at most affects styling as opposed to crashing or something.
|
||||
- Note the whole output gets contained within a <form> with name="Report".
|
||||
*}
|
||||
<script src="{$config->resourceBase}js/Audit/audit.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{$config->resourceBase}css/Audit/style.css" />
|
||||
<input type="hidden" name="currentSelection" value="1" />
|
||||
|
||||
<table class = "form-layout">
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<input type="button" accesskey="P" value="Print Report" name="case_report" onClick="printReport({$caseId}, this );"/>
|
||||
<input type="button" accesskey="B" value="Back to Case" name="back" onClick="printReport({$caseId}, this );"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="civicase-audit">
|
||||
<table><tr><td class="leftpane">
|
||||
<table class="report">
|
||||
<tr class="columnheader-dark">
|
||||
<th> </th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
</tr>
|
||||
{foreach from=$activities item=activity name=activityloop}
|
||||
<tr class="activity{if $smarty.foreach.activityloop.first} selected{/if}" id="civicase-audit-activity-{$smarty.foreach.activityloop.iteration}">
|
||||
<td class="indicator">
|
||||
{if $activity.completed}
|
||||
<img src="{$config->resourceBase}i/spacer.gif" width="20" height="20">
|
||||
{else}
|
||||
<a href="#" onclick="selectActivity({$smarty.foreach.activityloop.iteration}); return false;">
|
||||
<img src="{$config->resourceBase}i/contribute/incomplete.gif" width="20" height="20" alt="{ts}Incomplete{/ts}" title="{ts}Incomplete{/ts}">
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="selectActivity({$smarty.foreach.activityloop.iteration}); return false;">
|
||||
{foreach from=$activity.leftpane item=field name=fieldloop}
|
||||
<span class="civicase-audit-{$field.label|lower|regex_replace:'/[^a-z0-9]+/':''} {$field.datatype}">
|
||||
{if $field.datatype == 'File'}<a href="{$field.value|escape}">{/if}
|
||||
{if $field.datatype == 'Date'}
|
||||
{if $field.includeTime}
|
||||
{$field.value|escape|replace:'T':' '|crmDate}
|
||||
{else}
|
||||
{$field.value|escape|truncate:10:'':true|crmDate}
|
||||
{/if}
|
||||
{else}
|
||||
{$field.value|escape}
|
||||
{/if}
|
||||
{if $field.datatype == 'File'}</a>{/if}
|
||||
</span><br>
|
||||
{/foreach}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</td>
|
||||
<td class="separator"> </td>
|
||||
<td class="rightpane">
|
||||
<div class="rightpaneheader">
|
||||
{foreach from=$activities item=activity name=activityloop}
|
||||
<div class="activityheader" id="civicase-audit-header-{$smarty.foreach.activityloop.iteration}">
|
||||
<div class="auditmenu">
|
||||
<span class="editlink"><a target="editauditwin" href="{$activity.editurl}">{ts}Edit{/ts}</a></span>
|
||||
</div>
|
||||
{foreach from=$activity.rightpaneheader item=field name=fieldloop}
|
||||
<div class="civicase-audit-{$field.label|lower|regex_replace:'/[^a-z0-9]+/':''}">
|
||||
<label>{$field.label|escape}</label>
|
||||
<span class="{$field.datatype}">{if $field.datatype == 'File'}<a href="{$field.value|escape}">{/if}
|
||||
{if $field.datatype == 'Date'}
|
||||
{if $field.includeTime}
|
||||
{$field.value|escape|replace:'T':' '|crmDate}
|
||||
{else}
|
||||
{$field.value|escape|truncate:10:'':true|crmDate}
|
||||
{/if}
|
||||
{else}
|
||||
{$field.value|escape}
|
||||
{/if}
|
||||
{if $field.datatype == 'File'}</a>{/if}
|
||||
</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="rightpanebody">
|
||||
{foreach from=$activities item=activity name=activityloop}
|
||||
<div class="activitybody" id="civicase-audit-body-{$smarty.foreach.activityloop.iteration}">
|
||||
{foreach from=$activity.rightpanebody item=field name=fieldloop}
|
||||
<div class="civicase-audit-{$field.label|lower|regex_replace:'/[^a-z0-9]+/':''}">
|
||||
<label>{$field.label|escape}</label>
|
||||
<span class="{$field.datatype}">{if $field.datatype == 'File'}<a href="{$field.value|escape}">{/if}
|
||||
{if $field.datatype == 'Date'}
|
||||
{if $field.includeTime}
|
||||
{$field.value|escape|replace:'T':' '|crmDate}
|
||||
{else}
|
||||
{$field.value|escape|truncate:10:'':true|crmDate}
|
||||
{/if}
|
||||
{elseif $field.label eq 'Details'}
|
||||
{$field.value}
|
||||
{else}
|
||||
{$field.value|escape}
|
||||
{/if}
|
||||
{if $field.datatype == 'File'}</a>{/if}
|
||||
</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<input type="button" accesskey="P" value="Print Report" name="case_report" onclick="printReport({$caseId}, this );"/>
|
||||
<input type="button" accesskey="B" value="Back to Case" name="back" onClick="printReport({$caseId}, this );"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
function printReport( id, button ) {
|
||||
|
||||
if ( button.name == 'case_report' ) {
|
||||
var dataUrl = {/literal}"{crmURL p='civicrm/case/report/print' h=0 q='caseID='}"{literal}+id;
|
||||
dataUrl = dataUrl + '&cid={/literal}{$clientID}{literal}'+'&asn={/literal}{$activitySetName}{literal}';
|
||||
var redact = '{/literal}{$_isRedact}{literal}'
|
||||
|
||||
var isRedact = 1;
|
||||
if ( redact == 'false' ) {
|
||||
isRedact = 0;
|
||||
}
|
||||
|
||||
var includeActivities = '{/literal}{$includeActivities}{literal}';
|
||||
var all = 0;
|
||||
if( includeActivities == 'All' ) {
|
||||
all = 1;
|
||||
}
|
||||
|
||||
dataUrl = dataUrl + '&redact='+isRedact + '&all='+ all;
|
||||
|
||||
} else {
|
||||
|
||||
var dataUrl = {/literal}"{crmURL p='civicrm/contact/view/case' h=0 q='reset=1&action=view&id='}"{literal}+id;
|
||||
dataUrl = dataUrl + '&cid={/literal}{$clientID}{literal}'+'&selectedChild=case';
|
||||
}
|
||||
|
||||
window.location.href = dataUrl;
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
168
sites/all/modules/civicrm/templates/CRM/Case/Audit/Report.tpl
Normal file
168
sites/all/modules/civicrm/templates/CRM/Case/Audit/Report.tpl
Normal file
|
@ -0,0 +1,168 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
|
||||
<head>
|
||||
<title>{$pageTitle}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<base href="{crmURL p="" a=1}" /><!--[if IE]></base><![endif]-->
|
||||
<style type="text/css" media="screen, print">@import url({$config->userFrameworkResourceURL}css/print.css);</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="crm-container" class="crm-container">
|
||||
<h1>{$pageTitle}</h1>
|
||||
<div id="report-date">{$reportDate}</div>
|
||||
<h2>{ts}Case Summary{/ts}</h2>
|
||||
<table class="report-layout">
|
||||
<tr>
|
||||
<th class="reports-header">{ts}Client{/ts}</th>
|
||||
<th class="reports-header">{ts}Case Type{/ts}</th>
|
||||
<th class="reports-header">{ts}Status{/ts}</th>
|
||||
<th class="reports-header">{ts}Start Date{/ts}</th>
|
||||
<th class="reports-header">{ts}Case ID{/ts}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="crm-case-report-clientName">{$case.clientName}</td>
|
||||
<td class="crm-case-report-caseType">{$case.caseType}</td>
|
||||
<td class="crm-case-report-status">{$case.status}</td>
|
||||
<td class="crm-case-report-start_date">{$case.start_date}</td>
|
||||
<td class="crm-case-report-{$caseId}">{$caseId}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>{ts}Case Roles{/ts}</h2>
|
||||
<table class ="report-layout">
|
||||
<tr>
|
||||
<th class="reports-header">{ts}Case Role{/ts}</th>
|
||||
<th class="reports-header">{ts}Name{/ts}</th>
|
||||
<th class="reports-header">{ts}Phone{/ts}</th>
|
||||
<th class="reports-header">{ts}Email{/ts}</th>
|
||||
</tr>
|
||||
|
||||
{foreach from=$caseRelationships item=row key=relId}
|
||||
<tr>
|
||||
<td class="crm-case-report-caserelationships-relation">{$row.relation}</td>
|
||||
<td class="crm-case-report-caserelationships-name">{$row.name}</td>
|
||||
<td class="crm-case-report-caserelationships-phone">{$row.phone}</td>
|
||||
<td class="crm-case-report-caserelationships-email">{$row.email}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{foreach from=$caseRoles item=relName key=relTypeID}
|
||||
{if $relTypeID neq 'client'}
|
||||
<tr>
|
||||
<td>{$relName}</td>
|
||||
<td>{ts}(not assigned){/ts}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr>
|
||||
<td class="crm-case-report-caseroles-role">{$relName.role}</td>
|
||||
<td class="crm-case-report-caseroles-sort_name">{$relName.sort_name}</td>
|
||||
<td class="crm-case-report-caseroles-phone">{$relName.phone}</td>
|
||||
<td class="crm-case-report-caseroles-email">{$relName.email}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
<br />
|
||||
|
||||
{if $otherRelationships}
|
||||
<table class ="report-layout">
|
||||
<tr>
|
||||
<th class="reports-header">{ts}Client Relationship{/ts}</th>
|
||||
<th class="reports-header">{ts}Name{/ts}</th>
|
||||
<th class="reports-header">{ts}Phone{/ts}</th>
|
||||
<th class="reports-header">{ts}Email{/ts}</th>
|
||||
</tr>
|
||||
{foreach from=$otherRelationships item=row key=relId}
|
||||
<tr>
|
||||
<td class="crm-case-report-otherrelationships-relation">{$row.relation}</td>
|
||||
<td class="crm-case-report-otherrelationships-name">{$row.name}</td>
|
||||
<td class="crm-case-report-otherrelationships-phone">{$row.phone}</td>
|
||||
<td class="crm-case-report-otherrelationships-email">{$row.email}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<br />
|
||||
{/if}
|
||||
|
||||
{if $globalRelationships}
|
||||
<table class ="report-layout">
|
||||
<tr>
|
||||
<th class="reports-header">{$globalGroupInfo.title}</th>
|
||||
<th class="reports-header">{ts}Phone{/ts}</th>
|
||||
<th class="reports-header">{ts}Email{/ts}</th>
|
||||
</tr>
|
||||
{foreach from=$globalRelationships item=row key=relId}
|
||||
<tr>
|
||||
<td class="crm-case-report-globalrelationships-sort_name">{$row.sort_name}</td>
|
||||
<td class="crm-case-report-globalrelationships-phone">{$row.phone}</td>
|
||||
<td class="crm-case-report-globalrelationships-email">{$row.email}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
{if $caseCustomFields}
|
||||
{foreach from=$caseCustomFields item=group}
|
||||
<h2>{$group.title}</h2>
|
||||
<table class ="report-layout">
|
||||
{foreach from=$group.values item=row}
|
||||
<tr>
|
||||
<th class="label">{$row.label}</td>
|
||||
<td class="crm-case-report-custom-field">{$row.value}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<h2>{ts}Case Activities{/ts}</h2>
|
||||
{foreach from=$activities item=activity key=key}
|
||||
<table class ="report-layout">
|
||||
{foreach from=$activity item=field name=fieldloop}
|
||||
<tr class="crm-case-report-activity-{$field.label}">
|
||||
<th scope="row" class="label">{$field.label|escape}</th>
|
||||
{if $field.label eq 'Activity Type' or $field.label eq 'Status'}
|
||||
<td class="bold">{$field.value|escape}</td>
|
||||
{elseif $field.label eq 'Details' or $field.label eq 'Subject'}
|
||||
<td>{$field.value}</td>
|
||||
{else}
|
||||
<td>{$field.value|escape}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<br />
|
||||
{/foreach}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
314
sites/all/modules/civicrm/templates/CRM/Case/Form/Activity.tpl
Normal file
314
sites/all/modules/civicrm/templates/CRM/Case/Form/Activity.tpl
Normal file
|
@ -0,0 +1,314 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{* this template is used for adding/editing activities for a case. *}
|
||||
<div class="crm-block crm-form-block crm-case-activity-form-block">
|
||||
|
||||
{if $action neq 8 and $action neq 32768 }
|
||||
{* Include form buttons on top for new and edit modes. *}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
|
||||
{* added onload javascript for source contact*}
|
||||
{include file="CRM/Activity/Form/ActivityJs.tpl" tokenContext="case_activity"}
|
||||
|
||||
{/if}
|
||||
|
||||
{if $action eq 8 or $action eq 32768 }
|
||||
<div class="messages status no-popup">
|
||||
<i class="crm-i fa-info-circle"></i>
|
||||
{if $action eq 8}
|
||||
{ts 1=$activityTypeName}Click Delete to move this "%1" activity to the Trash.{/ts}
|
||||
{else}
|
||||
{ts 1=$activityTypeName}Click Restore to retrieve this "%1" activity from the Trash.{/ts}
|
||||
{/if}
|
||||
</div><br />
|
||||
{else}
|
||||
<table class="form-layout">
|
||||
{if $activityTypeDescription }
|
||||
<tr>
|
||||
<div class="help">{$activityTypeDescription}</div>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Block for change status, case type and start date. *}
|
||||
{if $activityTypeFile EQ 'ChangeCaseStatus'
|
||||
|| $activityTypeFile EQ 'ChangeCaseType'
|
||||
|| $activityTypeFile EQ 'LinkCases'
|
||||
|| $activityTypeFile EQ 'ChangeCaseStartDate'}
|
||||
{include file="CRM/Case/Form/Activity/$activityTypeFile.tpl"}
|
||||
<tr class="crm-case-activity-form-block-details">
|
||||
<td class="label">{ts}Details{/ts}</td>
|
||||
<td class="view-value">
|
||||
{$form.details.html}
|
||||
</td>
|
||||
</tr>
|
||||
{* Added Activity Details accordion tab *}
|
||||
<tr class="crm-case-activity-form-block-activity-details">
|
||||
<td colspan="2">
|
||||
<div id="activity-details" class="crm-accordion-wrapper collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Activity Details{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
{else}
|
||||
<tr class="crm-case-activity-form-block-activity-details">
|
||||
<td colspan="2">
|
||||
{/if}
|
||||
{* End block for change status, case type and start date. *}
|
||||
<table class="form-layout-compressed">
|
||||
<tbody>
|
||||
<tr id="with-clients" class="crm-case-activity-form-block-client_name">
|
||||
<td class="label font-size12pt">{ts}Client{/ts}</td>
|
||||
<td class="view-value">
|
||||
<span class="font-size12pt">
|
||||
{foreach from=$client_names item=client name=clients key=id}
|
||||
{foreach from=$client_names.$id item=client1}
|
||||
{$client1.display_name}
|
||||
{/foreach}
|
||||
{if not $smarty.foreach.clients.last}; {/if}
|
||||
{/foreach}
|
||||
</span>
|
||||
|
||||
{if $action eq 1 or $action eq 2}
|
||||
<br />
|
||||
<a href="#" class="crm-with-contact">» {ts}With other contact(s){/ts}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $action eq 1 or $action eq 2}
|
||||
<tr class="crm-case-activity-form-block-target_contact_id hiddenElement" id="with-contacts-widget">
|
||||
<td class="label font-size10pt">{ts}With Contact{/ts}</td>
|
||||
<td class="view-value">
|
||||
{$form.target_contact_id.html}
|
||||
<br/>
|
||||
<a href="#" class="crm-with-contact">
|
||||
» {if not $multiClient}{ts}With client{/ts}{else}{ts}With client(s){/ts}{/if}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr class="crm-case-activity-form-block-activityTypeName">
|
||||
<td class="label">{ts}Activity Type{/ts}</td>
|
||||
<td class="view-value bold">{$activityTypeName|escape}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activity-form-block-source_contact_id">
|
||||
<td class="label">{$form.source_contact_id.label}</td>
|
||||
<td class="view-value">{$form.source_contact_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activity-form-block-assignee_contact_id">
|
||||
<td class="label">
|
||||
{$form.assignee_contact_id.label}
|
||||
{edit}{help id="assignee_contact_id" title=$form.assignee_contact_id.label file="CRM/Activity/Form/Activity"}{/edit}
|
||||
</td>
|
||||
<td>{$form.assignee_contact_id.html}
|
||||
{if $activityAssigneeNotification}
|
||||
<br />
|
||||
<span class="description"><i class="crm-i fa-paper-plane"></i> {ts}A copy of this activity will be emailed to each Assignee.{/ts}</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{* Include special processing fields if any are defined for this activity type (e.g. Change Case Status / Change Case Type). *}
|
||||
|
||||
{if $activityTypeFile neq 'ChangeCaseStartDate'}
|
||||
<tr class="crm-case-activity-form-block-subject">
|
||||
<td class="label">{$form.subject.label}</td><td class="view-value">{$form.subject.html|crmAddClass:huge}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="crm-case-activity-form-block-medium_id">
|
||||
<td class="label">{$form.medium_id.label}</td>
|
||||
<td class="view-value">{$form.medium_id.html} {$form.location.label} {$form.location.html|crmAddClass:huge}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activity-form-block-activity_date_time">
|
||||
<td class="label">{$form.activity_date_time.label}</td>
|
||||
{if $action eq 2 && $activityTypeFile eq 'OpenCase'}
|
||||
<td class="view-value">{$current_activity_date_time|crmDate}
|
||||
<div class="description">Use a <a href="{$changeStartURL}">Change Start Date</a> activity to change the date</div>
|
||||
{* avoid errors about missing field *}
|
||||
<div style="display: none;">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</div>
|
||||
</td>
|
||||
{else}
|
||||
<td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{if $action eq 2 && $activityTypeFile eq 'OpenCase'}
|
||||
<tr class="crm-case-activity-form-block-details">
|
||||
<td class="label">{ts}Notes{/ts}</td>
|
||||
<td class="view-value">
|
||||
{$form.details.html}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td colspan="2"><div id="customData"></div></td>
|
||||
</tr>
|
||||
{if NOT $activityTypeFile}
|
||||
<tr class="crm-case-activity-form-block-details">
|
||||
<td class="label">{$form.details.label}</td>
|
||||
<td class="view-value">
|
||||
{$form.details.html}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="crm-case-activity-form-block-duration">
|
||||
<td class="label">{$form.duration.label}</td>
|
||||
<td class="view-value">
|
||||
{$form.duration.html}
|
||||
<span class="description">{ts}minutes{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if $activityTypeFile EQ 'ChangeCaseStatus'
|
||||
|| $activityTypeFile EQ 'ChangeCaseType'
|
||||
|| $activityTypeFile EQ 'ChangeCaseStartDate'}
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{* End of Activity Details accordion tab *}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activity-form-block-attachment">
|
||||
<td colspan="2">{include file="CRM/Form/attachment.tpl"}</td>
|
||||
</tr>
|
||||
{if $searchRows} {* We have got case role rows to display for "Send Copy To" feature *}
|
||||
<tr class="crm-case-activity-form-block-send_copy">
|
||||
<td colspan="2">
|
||||
<div id="sendcopy" class="crm-accordion-wrapper collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Send a Copy{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div id="sendcopy-body" class="crm-accordion-body">
|
||||
|
||||
<div class="description">{ts}Email a complete copy of this activity record to other people involved with the case. Click the top left box to select all.{/ts}</div>
|
||||
{strip}
|
||||
<table class="row-highlight">
|
||||
<tr class="columnheader">
|
||||
<th>{$form.toggleSelect.html} </th>
|
||||
<th>{ts}Case Role{/ts}</th>
|
||||
<th>{ts}Name{/ts}</th>
|
||||
<th>{ts}Email{/ts}</th>
|
||||
{if $countId gt 1}<th>{ts}Target Contact{/ts}</th>{/if}
|
||||
</tr>
|
||||
{foreach from=$searchRows item=row key=id}
|
||||
{foreach from=$searchRows.$id item=row1 key=id1}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td class="crm-case-activity-form-block-contact_{$id1}">{$form.contact_check[$id1].html}</td>
|
||||
<td class="crm-case-activity-form-block-role">{$row1.role}</td>
|
||||
<td class="crm-case-activity-form-block-display_name">{$row1.display_name}</td>
|
||||
<td class="crm-case-activity-form-block-email">{$row1.email}</td>
|
||||
{if $countId gt 1}<td class="crm-case-activity-form-block-display_name">{$row1.managerOf}</td>{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="crm-case-activity-form-block-schedule_followup">
|
||||
<td colspan="2">
|
||||
{include file="CRM/Activity/Form/FollowUp.tpl" type="case-"}
|
||||
</td>
|
||||
</tr>
|
||||
{* Suppress activity status and priority for changes to status, case type and start date. PostProc will force status to completed. *}
|
||||
{if $activityTypeFile NEQ 'ChangeCaseStatus'
|
||||
&& $activityTypeFile NEQ 'ChangeCaseType'
|
||||
&& $activityTypeFile NEQ 'ChangeCaseStartDate'}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-case-activity-form-block-status_id">
|
||||
<td class="label">{$form.status_id.label}</td><td class="view-value">{$form.status_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activity-form-block-priority_id">
|
||||
<td class="label">{$form.priority_id.label}</td><td class="view-value">{$form.priority_id.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $form.tag.html}
|
||||
<tr class="crm-case-activity-form-block-tag">
|
||||
<td class="label">{$form.tag.label}</td>
|
||||
<td class="view-value">
|
||||
<div class="crm-select-container">{$form.tag.html}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="crm-case-activity-form-block-tag_set"><td colspan="2">{include file="CRM/common/Tagset.tpl" tagsetType='activity'}</td></tr>
|
||||
</table>
|
||||
|
||||
{/if}
|
||||
|
||||
{crmRegion name='case-activity-form'}{/crmRegion}
|
||||
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
|
||||
{if $action eq 1 or $action eq 2}
|
||||
{*include custom data js file*}
|
||||
{include file="CRM/common/customData.tpl"}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
{/literal}
|
||||
{if $customDataSubType}
|
||||
CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
|
||||
{else}
|
||||
CRM.buildCustomData( '{$customDataType}' );
|
||||
{/if}
|
||||
{literal}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
{if $action neq 8 and $action neq 32768 and empty($activityTypeFile)}
|
||||
<script type="text/javascript">
|
||||
{if $searchRows}
|
||||
cj('#sendcopy').crmAccordionToggle();
|
||||
{/if}
|
||||
|
||||
cj('#follow-up').crmAccordionToggle();
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
{if $action eq 2 or $action eq 1}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$('.crm-with-contact').click(function() {
|
||||
$('#with-contacts-widget').toggle();
|
||||
$('#with-clients').toggle();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
</div>
|
|
@ -0,0 +1,40 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for "Change Case Type" activities *}
|
||||
<div class="crm-block crm-form-block crm-case-changecasestartdate-form-block">
|
||||
<tr class="crm-case-changecasestartdate-form-block-case_type_id">
|
||||
<td class="label">{$form.case_type_id.label}</td>
|
||||
<td>{$form.case_type_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-changecasestartdate-form-block-current_start_date">
|
||||
<td class="label">{ts}Current Start Date{/ts}</td>
|
||||
<td>{$current_start_date|crmDate}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-changecasestartdate-form-block-start_date">
|
||||
<td class="label">{$form.start_date.label}</td>
|
||||
<td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td>
|
||||
</tr>
|
||||
</div>
|
|
@ -0,0 +1,37 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for "Change Case Status" activities. *}
|
||||
<div class="crm-block crm-form-block crm-case-changecasestatus-form-block">
|
||||
<tr class="crm-case-changecasestatus-form-block-case_status_id">
|
||||
<td class="label">{$form.case_status_id.label}</td>
|
||||
<td>{$form.case_status_id.html}</td>
|
||||
</tr>
|
||||
{if $groupTree}
|
||||
<tr>
|
||||
<td colspan="2">{include file="CRM/Custom/Form/CustomData.tpl" noPostCustomButton=1}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</div>
|
|
@ -0,0 +1,49 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for "Change Case Type" activities *}
|
||||
<div class="crm-block crm-form-block crm-case-changecasetype-form-block">
|
||||
<tr class="crm-case-changecasetype-form-block-case_type_id">
|
||||
<td class="label">{$form.case_type_id.label}</td>
|
||||
<td>{$form.case_type_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-changecasetype-form-block-is_reset_timeline">
|
||||
<td class="label">{$form.is_reset_timeline.label}</td>
|
||||
<td>{$form.is_reset_timeline.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-changecasetype-form-block-reset_date_time" id="resetTimeline">
|
||||
<td class="label">{$form.reset_date_time.label}</td>
|
||||
<td>{include file="CRM/common/jcalendar.tpl" elementName=reset_date_time}</td>
|
||||
</tr>
|
||||
|
||||
{include file="CRM/common/showHideByFieldValue.tpl"
|
||||
trigger_field_id ="is_reset_timeline"
|
||||
trigger_value = true
|
||||
target_element_id ="resetTimeline"
|
||||
target_element_type ="table-row"
|
||||
field_type ="radio"
|
||||
invert = 0
|
||||
}
|
||||
</div>
|
|
@ -0,0 +1,49 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for to create a link between two cases. *}
|
||||
<div class="crm-block crm-form-block crm-case-linkcases-form-block">
|
||||
<tr class="crm-case-linkcases-form-block-link_to_case_id">
|
||||
<td class="label">{$form.link_to_case_id.label}</td>
|
||||
<td>{$form.link_to_case_id.html}</td>
|
||||
</tr>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var $form = $("form.{/literal}{$form.formClass}{literal}");
|
||||
$('input[name=link_to_case_id]', $form).change(function() {
|
||||
if ($(this).val()) {
|
||||
var info = $(this).select2('data').extra;
|
||||
{/literal}{* Mix in variables and placeholders for clientside substitution *}
|
||||
var subject = "{ts escape=js 1="%1" 2="%2" 3="%3" 4=$sortName 5=$caseTypeLabel 6=$caseID}Create link between %1 - %2 (CaseID: %3) and %4 - %5 (CaseID: %6){/ts}";
|
||||
{literal}
|
||||
$('#subject', $form).val(ts(subject, {1: info['contact_id.sort_name'], 2: info['case_id.case_type_id.title'], 3: $(this).val()}));
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
</div>
|
|
@ -0,0 +1,76 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $context ne 'caseActivity'}
|
||||
<tr class="crm-case-opencase-form-block-case_type_id">
|
||||
<td class="label">{$form.case_type_id.label}{help id="id-case_type" file="CRM/Case/Form/Case.hlp" activityTypeFile=$activityTypeFile}</td>
|
||||
<td>{$form.case_type_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-opencase-form-block-status_id">
|
||||
<td class="label">{$form.status_id.label}</td>
|
||||
<td>{$form.status_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-opencase-form-block-start_date">
|
||||
<td class="label">{$form.start_date.label}</td>
|
||||
<td>
|
||||
{include file="CRM/common/jcalendar.tpl" elementName=start_date}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{* Add fields for attachments *}
|
||||
{if $action eq 4 AND $currentAttachmentURL}
|
||||
{include file="CRM/Form/attachment.tpl"}{* For view action the include provides the row and cells. *}
|
||||
{elseif $action eq 1 OR $action eq 2}
|
||||
<tr class="crm-activity-form-block-attachment">
|
||||
<td colspan="2">
|
||||
{include file="CRM/Form/attachment.tpl"}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{crmAPI var='caseTypes' entity='CaseType' action='get' option_limit=0 sequential=0}
|
||||
{crmAPI var='caseStatusLabels' entity='Case' action='getoptions' option_limit=0 field="case_status_id" context='create'}
|
||||
{crmAPI var='caseStatusNames' entity='Case' action='getoptions' option_limit=0 field="case_status_id" context='validate' sequential=0}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var $form = $("form.{/literal}{$form.formClass}{literal}");
|
||||
var caseTypes = {/literal}{$caseTypes.values|@json_encode}{literal};
|
||||
var caseStatusLabels = {/literal}{$caseStatusLabels.values|@json_encode}{literal};
|
||||
var caseStatusNames = {/literal}{$caseStatusNames.values|@json_encode}{literal};
|
||||
if ($('#case_type_id, #status_id', $form).length === 2) {
|
||||
$('#case_type_id', $form).change(function() {
|
||||
if ($(this).val()) {
|
||||
var definition = caseTypes[$(this).val()].definition;
|
||||
var newOptions = CRM._.filter(caseStatusLabels, function(opt) {
|
||||
return !definition.statuses || !definition.statuses.length || definition.statuses.indexOf(caseStatusNames[opt.key]) > -1;
|
||||
});
|
||||
CRM.utils.setOptions($('#status_id', $form), newOptions);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
|
@ -0,0 +1,128 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{*this template is used for activity accordion*}
|
||||
{assign var=caseid value=$caseID}
|
||||
{if isset($isForm) and $isForm}
|
||||
<div class="crm-accordion-wrapper crm-case_activities-accordion crm-case-activities-block">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Activities{/ts}
|
||||
</div>
|
||||
|
||||
<div id="activities" class="crm-accordion-body">
|
||||
<div class="crm-accordion-wrapper crm-accordion-inner crm-search_filters-accordion collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Search Filters{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<table class="no-border form-layout-compressed" id="searchOptions">
|
||||
<tr>
|
||||
<td class="crm-case-caseview-form-block-repoter_id"colspan="2"><label for="reporter_id">{ts}Reporter/Role{/ts}</label><br />
|
||||
{$form.reporter_id.html|crmAddClass:twenty}
|
||||
</td>
|
||||
<td class="crm-case-caseview-form-block-status_id"><label for="status_id">{$form.status_id.label}</label><br />
|
||||
{$form.status_id.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="crm-case-caseview-form-block-activity_date_low">
|
||||
{assign var=activitylow value=activity_date_low_$caseID}
|
||||
{$form.$activitylow.label}<br />
|
||||
{include file="CRM/common/jcalendar.tpl" elementName=$activitylow}
|
||||
</td>
|
||||
<td class="crm-case-caseview-form-block-activity_date_high">
|
||||
{assign var=activityhigh value=activity_date_high_$caseID}
|
||||
{$form.$activityhigh.label}<br />
|
||||
{include file="CRM/common/jcalendar.tpl" elementName=$activityhigh}
|
||||
</td>
|
||||
<td class="crm-case-caseview-form-block-activity_type_filter_id">
|
||||
{$form.activity_type_filter_id.label}<br />
|
||||
{$form.activity_type_filter_id.html}
|
||||
</td>
|
||||
</tr>
|
||||
{if $form.activity_deleted}
|
||||
<tr class="crm-case-caseview-form-block-activity_deleted">
|
||||
<td>
|
||||
{$form.activity_deleted.html}{$form.activity_deleted.label}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{/if}
|
||||
|
||||
<table id="case_id_{$caseid}" class="nestedActivitySelector crm-ajax-table" data-order='[[0,"desc"]]' data-page-length="10">
|
||||
<thead><tr>
|
||||
<th data-data="activity_date_time" class="crm-case-activities-date">{ts}Date{/ts}</th>
|
||||
<th data-data="subject" cell-class="crmf-subject crm-editable" class="crm-case-activities-subject">{ts}Subject{/ts}</th>
|
||||
<th data-data="type" class="crm-case-activities-type">{ts}Type{/ts}</th>
|
||||
<th data-data="target_contact_name" class="crm-case-activities-with">{ts}With{/ts}</th>
|
||||
<th data-data="source_contact_name" class="crm-case-activities-assignee">{ts}Reporter{/ts}</th>
|
||||
<th data-data="assignee_contact_name" class="crm-case-activities-assignee">{ts}Assignee{/ts}</th>
|
||||
<th data-data="status_id" cell-class="crmf-status_id crm-editable" cell-data-type="select" cell-data-refresh=1 class="crm-case-activities-status">{ts}Status{/ts}</th>
|
||||
<th data-data="links" data-orderable="false" class="crm-case-activities-status"> </th>
|
||||
</tr></thead>
|
||||
</table>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var caseId = {/literal}{$caseID}{literal};
|
||||
CRM.$('table#case_id_' + caseId).data({
|
||||
"ajax": {
|
||||
"url": {/literal}'{crmURL p="civicrm/ajax/activity" h=0 q="snippet=4&caseID=$caseID&cid=$contactID&userID=$userID"}'{literal},
|
||||
"data": function (d) {
|
||||
d.status_id = $("select#status_id_" + caseId).val(),
|
||||
d.reporter_id = $("select#reporter_id_" + caseId).val(),
|
||||
d.activity_type_id = $("select#activity_type_filter_id_" + caseId).val(),
|
||||
d.activity_date_low = $("#activity_date_low_" + caseId).val(),
|
||||
d.activity_date_high = $("#activity_date_high_" + caseId).val(),
|
||||
d.activity_deleted = ($("#activity_deleted_1").prop('checked')) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
$(function($) {
|
||||
$('#searchOptions :input').change(function(){
|
||||
CRM.$('table#case_id_' + caseId).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#case_id_{$caseID} tr.status-id-{$status.value} {ldelim}
|
||||
border-left: 3px solid {$status.color};
|
||||
{rdelim}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</style>
|
||||
|
||||
{if isset($isForm) and $isForm}
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{/if}
|
|
@ -0,0 +1,111 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* CiviCase - assign activity to case form *}
|
||||
{if !empty($buildCaseActivityForm)}
|
||||
<div class="crm-block crm-form-block crm-case-activitytocase-form-block">
|
||||
<table class="form-layout">
|
||||
<tr class="crm-case-activitytocase-form-block-file_on_case_unclosed_case_id">
|
||||
<td class="label">{$form.file_on_case_unclosed_case_id.label}</td>
|
||||
<td>{$form.file_on_case_unclosed_case_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activitytocase-form-block-file_on_case_target_contact_id">
|
||||
<td class="label">{$form.file_on_case_target_contact_id.label}</td>
|
||||
<td>{$form.file_on_case_target_contact_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-case-activitytocase-form-block-file_on_case_activity_subject">
|
||||
<td class="label">{$form.file_on_case_activity_subject.label}</td>
|
||||
<td>{$form.file_on_case_activity_subject.html}<br />
|
||||
<span class="description">{ts}You can modify the activity subject before filing.{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{* main form end *}
|
||||
|
||||
{else}
|
||||
{* Markup and js to go on the main page for loading the above form in a popup *}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
window.fileOnCase = function(action, activityID, currentCaseId, a) {
|
||||
if ( action == "move" ) {
|
||||
var dialogTitle = "{/literal}{ts escape='js'}Move to Case{/ts}{literal}";
|
||||
} else if ( action == "copy" ) {
|
||||
var dialogTitle = "{/literal}{ts escape='js'}Copy to Case{/ts}{literal}";
|
||||
} else if ( action == "file" ) {
|
||||
var dialogTitle = "{/literal}{ts escape='js'}File on Case{/ts}{literal}";
|
||||
}
|
||||
|
||||
var dataUrl = {/literal}"{crmURL p='civicrm/case/addToCase' q='reset=1' h=0}"{literal};
|
||||
dataUrl += '&activityId=' + activityID + '&caseId=' + currentCaseId + '&cid=' + {/literal}"{$contactID}"{literal};
|
||||
|
||||
function save() {
|
||||
if (!$("#file_on_case_unclosed_case_id").val()) {
|
||||
$("#file_on_case_unclosed_case_id").crmError('{/literal}{ts escape="js"}Please select a case from the list{/ts}{literal}.');
|
||||
return false;
|
||||
}
|
||||
|
||||
var $context = $('div.crm-confirm-dialog'),
|
||||
selectedCaseId = $('input[name=file_on_case_unclosed_case_id]', $context).val(),
|
||||
caseTitle = $('input[name=file_on_case_unclosed_case_id]', $context).select2('data').label,
|
||||
contactId = $('input[name=file_on_case_unclosed_case_id]', $context).select2('data').extra.contact_id,
|
||||
subject = $("#file_on_case_activity_subject").val(),
|
||||
targetContactId = $("#file_on_case_target_contact_id").val();
|
||||
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/activity/convert' h=0 }"{literal};
|
||||
$.post( postUrl, { activityID: activityID, caseID: selectedCaseId, contactID: contactId, newSubject: subject, targetContactIds: targetContactId, mode: action, key: {/literal}"{crmKey name='civicrm/ajax/activity/convert'}"{literal} },
|
||||
function( values ) {
|
||||
if ( values.error_msg ) {
|
||||
$().crmError(values.error_msg, "{/literal}{ts escape='js'}Unable to file on case.{/ts}{literal}");
|
||||
} else {
|
||||
var destUrl = {/literal}"{crmURL p='civicrm/contact/view/case' q='reset=1&action=view&id=' h=0 }"{literal};
|
||||
var context = '';
|
||||
{/literal}{if !empty($fulltext)}{literal}
|
||||
context = '&context={/literal}{$fulltext}{literal}';
|
||||
{/literal}{/if}{literal}
|
||||
var caseUrl = destUrl + selectedCaseId + '&cid=' + contactId + context;
|
||||
|
||||
var statusMsg = {/literal}'{ts escape='js' 1='%1'}Activity has been filed to %1 case.{/ts}'{literal};
|
||||
CRM.alert(ts(statusMsg, {1: '<a href="' + caseUrl + '">' + caseTitle + '</a>'}), '{/literal}{ts escape="js"}Saved{/ts}{literal}', 'success');
|
||||
CRM.refreshParent(a);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
CRM.confirm({
|
||||
title: dialogTitle,
|
||||
width: '600',
|
||||
resizable: true,
|
||||
options: {yes: "{/literal}{ts escape='js'}Save{/ts}{literal}", no: "{/literal}{ts escape='js'}Cancel{/ts}{literal}"},
|
||||
url: dataUrl
|
||||
}).on('crmConfirm:yes', save);
|
||||
|
||||
}
|
||||
})(CRM.$);
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
|
@ -0,0 +1,83 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* View Case Activities *}
|
||||
<div class="crm-block crm-content-block crm-case-activity-view-block">
|
||||
{if $revs}
|
||||
{strip}
|
||||
<table class="crm-info-panel">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Created By{/ts}</th>
|
||||
<th>{ts}Created On{/ts}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
{foreach from=$result item=row}
|
||||
<tr {if $row.id EQ $latestRevisionID}style="font-weight: bold;"{/if}>
|
||||
<td class="crm-case-activityview-form-block-name">{$row.name}</td>
|
||||
<td class="crm-case-activityview-form-block-date">{$row.date|crmDate}</td>
|
||||
<td class="crm-case-activityview-form-block-{$row.id}"><a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid="}{$row.id}" title="{ts}View this revision of the activity record.{/ts}">{if $row.id != $latestRevisionID}View Prior Revision{else}View Current Revision{/if}</a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{else}
|
||||
{if $report}
|
||||
<table class="crm-info-panel" id="crm-activity-view-table">
|
||||
{foreach from=$report.fields item=row name=report}
|
||||
<tr class="crm-case-activity-view-{$row.label}">
|
||||
<td class="label">{$row.label}</td>
|
||||
{if $smarty.foreach.report.first AND ( $activityID OR $parentID OR $latestRevisionID )} {* Add a cell to first row with links to prior revision listing and Prompted by (parent) as appropriate *}
|
||||
<td>{$row.value}</td>
|
||||
<td style="padding-right: 50px; text-align: right; font-size: .9em;">
|
||||
{if $activityID}<a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$activityID&revs=1"}">» {ts}List all revisions{/ts}</a>{if !$latestRevisionID}<br />{ts}(this is the current revision){/ts}{/if}<br />{/if}
|
||||
{if $latestRevisionID}<a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$latestRevisionID"}">» {ts}View current revision{/ts}</a><br /><span style="color: red;">{ts}(this is not the current revision){/ts}</span><br />{/if}
|
||||
{if $parentID}<a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$parentID"}">» {ts}Prompted by{/ts}</a>{/if}
|
||||
</td>
|
||||
{else}
|
||||
<td colspan="2">{if $row.label eq 'Details'}{$row.value|crmStripAlternatives|nl2br}{elseif $row.type eq 'Date'}{$row.value|crmDate}{else}{$row.value}{/if}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{* Display custom field data for the activity. *}
|
||||
{if $report.customGroups}
|
||||
{foreach from=$report.customGroups item=customGroup key=groupTitle name=custom}
|
||||
<tr class="crm-case-activityview-form-block-groupTitle form-layout">
|
||||
<td colspan="3">{$groupTitle}</td>
|
||||
</tr>
|
||||
{foreach from=$customGroup item=customField name=fields}
|
||||
<tr{if ! $smarty.foreach.fields.last} style="border-bottom: 1px solid #F6F6F6;"{/if}>
|
||||
<td class="label">{$customField.label}</td>
|
||||
<td>{$customField.value}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">
|
||||
{crmButton p='civicrm/case' q="reset=1" class='cancel' icon='times'}{ts}Done{/ts}{/crmButton}
|
||||
</div>
|
||||
</div>
|
65
sites/all/modules/civicrm/templates/CRM/Case/Form/Case.hlp
Normal file
65
sites/all/modules/civicrm/templates/CRM/Case/Form/Case.hlp
Normal file
|
@ -0,0 +1,65 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Help file is currently only used for "New Case" activity.
|
||||
- However, it may be invoked by other special case activities at some point so use $params.activityTypeFile condition
|
||||
when adding help specific to "New Cases". *}
|
||||
|
||||
|
||||
{htxt id="id-details-title"}
|
||||
{ts}Details{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-details"}
|
||||
{if $params.activityTypeFile EQ 'OpenCase'}
|
||||
<ul>
|
||||
<li>{ts}Introduce yourself and your role within our organization.{/ts}</li>
|
||||
<li>{ts}"All of the information that you provide to us or any of our representatives and service providers will be held in strictest confidence. It will not be used for any purpose other than to help you, and for any other purpose that you authorize in writing, or which is required by law."{/ts}</li>
|
||||
<li>{ts}"Please tell me what you would like to discuss."{/ts}</li>
|
||||
<li>{ts}Reflect client's story back to them.{/ts}</li>
|
||||
<li>{ts}Guess client's feelings and needs.{/ts}</li>
|
||||
<li>{ts}"May I now ask you some screening questions?"{/ts}</li>
|
||||
</ul>
|
||||
{else}
|
||||
{ts}Record details about this activity here.{/ts}
|
||||
{/if}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-activity_subject-title"}
|
||||
{ts}Title{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-activity_subject"}
|
||||
{if $params.activityTypeFile EQ 'OpenCase'}
|
||||
{ts}Provide a one-line summary of what this case is about.{/ts}
|
||||
{/if}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-case_type-title"}
|
||||
{ts}Case Type{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-case_type"}
|
||||
{if $params.activityTypeFile EQ 'OpenCase'}
|
||||
{ts}Offer the appropriate service from the list. If the service requires coordination, contact the Director.{/ts}
|
||||
{/if}
|
||||
{/htxt}
|
146
sites/all/modules/civicrm/templates/CRM/Case/Form/Case.tpl
Normal file
146
sites/all/modules/civicrm/templates/CRM/Case/Form/Case.tpl
Normal file
|
@ -0,0 +1,146 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Base template for Open Case. May be used for other special activity types at some point ..
|
||||
Note: 1. We will include all the activity fields here however each activity type file may build (via php) only those required by them.
|
||||
2. Each activity type file can include its case fields in its own template, so that they will be included during activity edit.
|
||||
*}
|
||||
<div class="crm-block crm-form-block crm-case-form-block">
|
||||
|
||||
{if $action neq 8 && $action neq 32768}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
{/if}
|
||||
|
||||
<h3>{if $action eq 8}{ts}Delete Case{/ts}{elseif $action eq 32768}{ts}Restore Case{/ts}{/if}</h3>
|
||||
{if $action eq 8 or $action eq 32768 }
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{if $action eq 8}
|
||||
{ts}Click Delete to move this case and all associated activities to the Trash.{/ts}
|
||||
{else}
|
||||
{ts}Click Restore to retrieve this case and all associated activities from the Trash.{/ts}
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
<table class="form-layout">
|
||||
{if $activityTypeDescription }
|
||||
<tr>
|
||||
<div class="help">{$activityTypeDescription}</div>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $clientName}
|
||||
<tr class="crm-case-form-block-clientName">
|
||||
<td class="label font-size12pt">{ts}Client{/ts}</td>
|
||||
<td class="font-size12pt bold view-value">{$clientName}</td>
|
||||
</tr>
|
||||
{elseif !$clientName and $action eq 1}
|
||||
{if $context eq 'standalone'}
|
||||
<td class="label">{$form.client_id.label}</td>
|
||||
<td class="view-value">{$form.client_id.html}</td>
|
||||
{/if}
|
||||
{/if}
|
||||
{* activity fields *}
|
||||
{if $form.medium_id.html and $form.activity_location.html}
|
||||
<tr class="crm-case-form-block-medium_id">
|
||||
<td class="label">{$form.medium_id.label}</td>
|
||||
<td class="view-value">{$form.medium_id.html} {$form.activity_location.label} {$form.activity_location.html}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $form.activity_details.html}
|
||||
<tr class="crm-case-form-block-activity_details">
|
||||
<td class="label">{$form.activity_details.label}{help id="id-details" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
|
||||
<td class="view-value">{$form.activity_details.html|crmStripAlternatives}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{* custom data group *}
|
||||
{if $groupTree}
|
||||
<tr>
|
||||
<td colspan="2">{include file="CRM/Custom/Form/CustomData.tpl"}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $form.activity_subject.html}
|
||||
<tr class="crm-case-form-block-activity_subject">
|
||||
<td class="label">{$form.activity_subject.label}{help id="id-activity_subject" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
|
||||
<td>{$form.activity_subject.html|crmAddClass:huge}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{* inject activity type-specific form fields *}
|
||||
{if $activityTypeFile}
|
||||
{include file="CRM/Case/Form/Activity/$activityTypeFile.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $form.duration.html}
|
||||
<tr class="crm-case-form-block-duration">
|
||||
<td class="label">{$form.duration.label}</td>
|
||||
<td class="view-value">
|
||||
{$form.duration.html}
|
||||
<span class="description">{ts}minutes{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $form.tag.html}
|
||||
<tr class="crm-case-form-block-tag">
|
||||
<td class="label">{$form.tag.label}</td>
|
||||
<td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr class="crm-case-form-block-custom_data">
|
||||
<td colspan="2">
|
||||
<div id="customData"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-case-form-block-tag_set"><td colspan="2">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</td></tr>
|
||||
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
{if $action eq 1}
|
||||
{*include custom data js file*}
|
||||
{include file="CRM/common/customData.tpl"}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var customDataSubType = $('#case_type_id').val();
|
||||
if ( customDataSubType ) {
|
||||
CRM.buildCustomData( {/literal}'{$customDataType}'{literal}, customDataSubType );
|
||||
} else {
|
||||
CRM.buildCustomData( {/literal}'{$customDataType}'{literal} );
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
|
||||
</div>
|
287
sites/all/modules/civicrm/templates/CRM/Case/Form/CaseView.js
Normal file
287
sites/all/modules/civicrm/templates/CRM/Case/Form/CaseView.js
Normal file
|
@ -0,0 +1,287 @@
|
|||
// https://civicrm.org/licensing
|
||||
(function($, CRM) {
|
||||
|
||||
function refresh(table) {
|
||||
$('#crm-main-content-wrapper').crmSnippet('refresh');
|
||||
}
|
||||
|
||||
function open(url, options, table) {
|
||||
if (CRM.config.ajaxPopupsEnabled) {
|
||||
CRM.loadForm(url, options).on('crmFormSuccess', function() {
|
||||
refresh(table);
|
||||
});
|
||||
}
|
||||
else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
function caseId() {
|
||||
return $('.crm-entity[data-entity=case]').data('id');
|
||||
}
|
||||
|
||||
function contactId() {
|
||||
return $('.crm-entity[data-entity=case]').data('cid');
|
||||
}
|
||||
|
||||
/**
|
||||
* The CaseView form includes some extra fields which are meant to open in a dialog.
|
||||
* We stash them initially and pop them up as needed
|
||||
* TODO: Creating a separate form class for each of these and opening them as standard popup links would be simpler and more reusable
|
||||
* @type {pre, post}
|
||||
*/
|
||||
var miniForms = {
|
||||
'#manageTagsDialog': {
|
||||
post: function(data) {
|
||||
var tagsChecked = $("#tags", this) ? $("#tags", this).val() : '',
|
||||
tagList = {},
|
||||
url = CRM.url('civicrm/case/ajax/processtags');
|
||||
$("input[name^=case_taglist]", this).each(function() {
|
||||
var tsId = $(this).attr('id').split('_');
|
||||
tagList[tsId[2]] = $(this).val();
|
||||
});
|
||||
$.extend(data, {
|
||||
case_id: caseId(),
|
||||
tag: tagsChecked,
|
||||
taglist: tagList
|
||||
});
|
||||
return $.post(url, data);
|
||||
}
|
||||
},
|
||||
'#mergeCasesDialog': {
|
||||
post: function(data) {
|
||||
if ($('select#merge_case_id').val()) {
|
||||
$('select#merge_case_id').appendTo('form#CaseView');
|
||||
$('[name="_qf_CaseView_next_merge_case"]').click();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
'#deleteCaseRoleDialog': {
|
||||
post: function(data) {
|
||||
data.case_id = caseId();
|
||||
return $.post(CRM.url('civicrm/ajax/delcaserole'), data);
|
||||
}
|
||||
},
|
||||
'#addCaseRoleDialog': {
|
||||
pre: function() {
|
||||
var $contactField = $('[name=add_role_contact_id]', this);
|
||||
$('[name=role_type]', this)
|
||||
.off('.miniform')
|
||||
.on('change.miniform', function() {
|
||||
var val = $(this).val();
|
||||
$contactField.val('').change().prop('disabled', !val);
|
||||
if (val) {
|
||||
var
|
||||
pieces = val.split('_'),
|
||||
rType = pieces[0],
|
||||
target = pieces[2], // b or a
|
||||
contact_type = CRM.vars.relationshipTypes[rType]['contact_type_' + target],
|
||||
contact_sub_type = CRM.vars.relationshipTypes[rType]['contact_sub_type_' + target],
|
||||
api = {params: {}};
|
||||
if (contact_type) {
|
||||
api.params.contact_type = contact_type;
|
||||
}
|
||||
if (contact_sub_type) {
|
||||
api.params.contact_sub_type = contact_sub_type;
|
||||
}
|
||||
$contactField
|
||||
.data('api-params', api)
|
||||
.data('user-filter', {})
|
||||
.attr('placeholder', CRM.vars.relationshipTypes[rType]['placeholder_' + target])
|
||||
.change();
|
||||
}
|
||||
})
|
||||
.val('')
|
||||
.change();
|
||||
$contactField.val('').crmEntityRef({create: true, api: {params: {contact_type: 'Individual'}}});
|
||||
},
|
||||
post: function(data) {
|
||||
var contactID = $('[name=add_role_contact_id]', this).val(),
|
||||
relType = $('[name=role_type]', this).val();
|
||||
if (contactID && relType) {
|
||||
$.extend(data, {
|
||||
case_id: caseId(),
|
||||
rel_contact: contactID,
|
||||
rel_type: relType,
|
||||
contact_id: contactId()
|
||||
});
|
||||
return $.post(CRM.url('civicrm/ajax/relation'), data);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'#editCaseRoleDialog': {
|
||||
pre: function(data) {
|
||||
var params = {create: true};
|
||||
if (data.contact_type) {
|
||||
params.api = {params: {contact_type: data.contact_type}};
|
||||
}
|
||||
$('[name=edit_role_contact_id]', this).val('').crmEntityRef(params);
|
||||
},
|
||||
post: function(data) {
|
||||
data.rel_contact = $('[name=edit_role_contact_id]', this).val();
|
||||
if (data.rel_contact) {
|
||||
$.extend(data, {
|
||||
case_id: caseId(),
|
||||
contact_id: contactId()
|
||||
});
|
||||
return $.post(CRM.url('civicrm/ajax/relation'), data);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'#addClientDialog': {
|
||||
pre: function() {
|
||||
$('[name=add_client_id]', this).val('').crmEntityRef({create: true});
|
||||
},
|
||||
post: function(data) {
|
||||
data.contactID = $('[name=add_client_id]', this).val();
|
||||
if (data.contactID) {
|
||||
data.caseID = caseId();
|
||||
return $.post(CRM.url('civicrm/case/ajax/addclient'), data);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'#addMembersToGroupDialog': {
|
||||
pre: function() {
|
||||
$('[name=add_member_to_group_contact_id]', this).val('').crmEntityRef({create: true, select: {multiple: true}});
|
||||
},
|
||||
post: function(data) {
|
||||
var requests = [],
|
||||
cids = $('[name=add_member_to_group_contact_id]', this).val();
|
||||
if (cids) {
|
||||
$.each(cids.split(','), function (k, cid) {
|
||||
requests.push(['group_contact', 'create', $.extend({contact_id: cid}, data)]);
|
||||
});
|
||||
return CRM.api3(requests);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
detached = {};
|
||||
|
||||
function detachMiniForms() {
|
||||
detached = {};
|
||||
$.each(miniForms, function(selector) {
|
||||
detached[selector] = $(selector).detach().removeClass('hiddenElement');
|
||||
});
|
||||
}
|
||||
|
||||
$('#crm-container').on('crmLoad', '#crm-main-content-wrapper', detachMiniForms);
|
||||
|
||||
$(document).ready(function() {
|
||||
detachMiniForms();
|
||||
$('#crm-container')
|
||||
.on('change', 'select[name=add_activity_type_id]', function() {
|
||||
open($(this).val());
|
||||
$(this).select2('val', '');
|
||||
})
|
||||
.on('change', 'select[name=timeline_id]', function() {
|
||||
if ($(this).val()) {
|
||||
CRM.confirm({
|
||||
title: $('option:first', this).text(),
|
||||
message: ts('Add the %1 set of scheduled activities to this case?', {1: '<em>' + $('option:selected', this).text() + '</em>'})
|
||||
})
|
||||
.on('crmConfirm:yes', function() {
|
||||
$('[name=_qf_CaseView_next]').click();
|
||||
})
|
||||
.on('crmConfirm:no', function() {
|
||||
$('select[name=timeline_id]').select2('val', '');
|
||||
});
|
||||
}
|
||||
})
|
||||
.on('change', 'select[name=report_id]', function() {
|
||||
if ($(this).val()) {
|
||||
var url = CRM.url('civicrm/case/report', {
|
||||
reset: 1,
|
||||
cid: contactId(),
|
||||
caseid: caseId(),
|
||||
asn: $(this).val()
|
||||
});
|
||||
open(url, {dialog: {width: '50%', height: 'auto'}});
|
||||
$(this).select2('val', '');
|
||||
}
|
||||
})
|
||||
// When changing case subject, record an activity
|
||||
.on('crmFormSuccess', '[data-field=subject]', function(e, value) {
|
||||
var id = caseId();
|
||||
CRM.api3('Activity', 'create', {
|
||||
case_id: id,
|
||||
activity_type_id: 'Change Case Subject',
|
||||
subject: value,
|
||||
status_id: 'Completed'
|
||||
}).done(function() {
|
||||
$('#case_id_' + id).dataTable().api().draw();
|
||||
});
|
||||
})
|
||||
.on('click', 'a.case-miniform', function(e) {
|
||||
var dialog,
|
||||
$el = $(this),
|
||||
target = $el.attr('href');
|
||||
function submit() {
|
||||
// Call post function with dialog as context and link data as param
|
||||
var submission = miniForms[target].post.call(dialog[0], $.extend({}, $el.data()));
|
||||
// Function should return a deferred object
|
||||
if (submission) {
|
||||
dialog.block();
|
||||
submission.done(function(data) {
|
||||
dialog.dialog('close');
|
||||
var table = $el.closest('table.dataTable');
|
||||
refresh(table.length ? table : $el.attr('rel'));
|
||||
if ($.isPlainObject(data) && data.is_error && data.error_message) {
|
||||
CRM.alert(data.error_message, ts('Error'), 'error');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// Validation failed - show an error msg on empty fields
|
||||
else if (submission === false) {
|
||||
$(':input', dialog).not('.select2-container *').each(function() {
|
||||
if (!$(this).val()) {
|
||||
$(this).crmError(ts('Please select a value'));
|
||||
}
|
||||
});
|
||||
}
|
||||
return submission;
|
||||
}
|
||||
dialog = CRM.confirm({
|
||||
title: $(this).attr('title') || $(this).text(),
|
||||
message: detached[target],
|
||||
resizable: true,
|
||||
options: {yes: ts('Save'), no: ts('Cancel')},
|
||||
open: function() {
|
||||
if (miniForms[target].pre) miniForms[target].pre.call(this, $el.data());
|
||||
}
|
||||
})
|
||||
.on('dialogclose', function() {
|
||||
detached[target] = $(target, dialog).detach();
|
||||
})
|
||||
.on('crmConfirm:yes', submit);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Keep the state of accordions when refreshing
|
||||
var accordionStates = [];
|
||||
$('#crm-main-content-wrapper')
|
||||
.on('crmBeforeLoad', function(e) {
|
||||
if ($(e.target).is(this)) {
|
||||
accordionStates = [];
|
||||
$('.crm-accordion-wrapper', this).each(function() {
|
||||
accordionStates.push($(this).hasClass('collapsed'));
|
||||
});
|
||||
}
|
||||
})
|
||||
.on('crmLoad', function(e) {
|
||||
if ($(e.target).is(this)) {
|
||||
var $targets = $('.crm-accordion-wrapper', this);
|
||||
$.each(accordionStates, function(i, isCollapsed) {
|
||||
$targets.eq(i).toggleClass('collapsed', isCollapsed);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}(cj, CRM));
|
355
sites/all/modules/civicrm/templates/CRM/Case/Form/CaseView.tpl
Normal file
355
sites/all/modules/civicrm/templates/CRM/Case/Form/CaseView.tpl
Normal file
|
@ -0,0 +1,355 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* CiviCase - view case screen*}
|
||||
|
||||
<div class="crm-block crm-form-block crm-case-caseview-form-block">
|
||||
|
||||
{* here we are showing related cases w/ jquery dialog *}
|
||||
{if $showRelatedCases}
|
||||
{include file="CRM/Case/Form/ViewRelatedCases.tpl"}
|
||||
{* Main case view *}
|
||||
{else}
|
||||
|
||||
<h3>{ts}Summary{/ts}</h3>
|
||||
<table class="report crm-entity case-summary" data-entity="case" data-id="{$caseID}" data-cid="{$contactID}">
|
||||
{if $multiClient}
|
||||
<tr class="crm-case-caseview-client">
|
||||
<td colspan="5" class="label">
|
||||
{ts}Clients:{/ts}
|
||||
{foreach from=$caseRoles.client item=client name=clients}
|
||||
<a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$client.contact_id`"}" title="{ts}View contact record{/ts}">{$client.display_name}</a>{if not $smarty.foreach.clients.last}, {/if}
|
||||
{/foreach}
|
||||
<a href="#addClientDialog" class="crm-hover-button case-miniform" title="{ts}Add Client{/ts}" data-key="{crmKey name='civicrm/case/ajax/addclient'}">
|
||||
<i class="crm-i fa-user-plus"></i>
|
||||
</a>
|
||||
<div id="addClientDialog" class="hiddenElement">
|
||||
<input name="add_client_id" placeholder="{ts}- select contact -{/ts}" class="huge" data-api-params='{ldelim}"params": {ldelim}"contact_type": "{$contactType}"{rdelim}{rdelim}' />
|
||||
</div>
|
||||
{if $hasRelatedCases}
|
||||
<div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
{if not $multiClient}
|
||||
<td>
|
||||
<table class="form-layout-compressed">
|
||||
{foreach from=$caseRoles.client item=client}
|
||||
<tr class="crm-case-caseview-display_name">
|
||||
<td class="label-left bold" style="padding: 0px; border: none;">{$client.display_name}</td>
|
||||
</tr>
|
||||
{if $client.phone}
|
||||
<tr class="crm-case-caseview-phone">
|
||||
<td class="label-left description" style="padding: 1px">{$client.phone}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $client.birth_date}
|
||||
<tr class="crm-case-caseview-birth_date">
|
||||
<td class="label-left description" style="padding: 1px">{ts}DOB{/ts}: {$client.birth_date|crmDate}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
{if $hasRelatedCases}
|
||||
<div class="crm-block relatedCases-link"><a class="crm-hover-button crm-popup medium-popup" href="{$relatedCaseUrl}">{$relatedCaseLabel}</a></div>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
<td class="crm-case-caseview-case_subject label">
|
||||
<span class="crm-case-summary-label">{ts}Subject{/ts}:</span> <span class="crm-editable" data-field="subject">{$caseDetails.case_subject}</span>
|
||||
</td>
|
||||
<td class="crm-case-caseview-case_type label">
|
||||
<span class="crm-case-summary-label">{ts}Type{/ts}:</span> {$caseDetails.case_type} <a class="crm-hover-button crm-popup" href="{crmURL p='civicrm/case/activity' q="action=add&reset=1&cid=`$contactId`&caseid=`$caseId`&selectedChild=activity&atype=`$changeCaseTypeId`"}" title="{ts}Change case type (creates activity record){/ts}"><i class="crm-i fa-pencil"></i></a>
|
||||
</td>
|
||||
<td class="crm-case-caseview-case_status label">
|
||||
<span class="crm-case-summary-label">{ts}Status{/ts}:</span> {$caseDetails.case_status} <a class="crm-hover-button crm-popup" href="{crmURL p='civicrm/case/activity' q="action=add&reset=1&cid=`$contactId`&caseid=`$caseId`&selectedChild=activity&atype=`$changeCaseStatusId`"}" title="{ts}Change case status (creates activity record){/ts}"><i class="crm-i fa-pencil"></i></a>
|
||||
</td>
|
||||
<td class="crm-case-caseview-case_start_date label">
|
||||
<span class="crm-case-summary-label">{ts}Open Date{/ts}:</span> {$caseDetails.case_start_date|crmDate} <a class="crm-hover-button crm-popup" href="{crmURL p='civicrm/case/activity' q="action=add&reset=1&cid=`$contactId`&caseid=`$caseId`&selectedChild=activity&atype=`$changeCaseStartDateId`"}" title="{ts}Change case start date (creates activity record){/ts}"><i class="crm-i fa-pencil"></i></a>
|
||||
</td>
|
||||
<td class="crm-case-caseview-{$caseID} label">
|
||||
<span class="crm-case-summary-label">{ts}ID{/ts}:</span> {$caseID}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if $hookCaseSummary}
|
||||
<div id="caseSummary" class="crm-clearfix">
|
||||
{foreach from=$hookCaseSummary item=val key=div_id}
|
||||
<div id="{$div_id}"><label>{$val.label}</label><div class="value">{$val.value}</div></div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="case-control-panel">
|
||||
<div>
|
||||
<p>
|
||||
{$form.add_activity_type_id.html}
|
||||
{if $hasAccessToAllCases}
|
||||
{$form.timeline_id.html}{$form._qf_CaseView_next.html}
|
||||
{$form.report_id.html}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
{if $hasAccessToAllCases}
|
||||
<a class="crm-hover-button action-item no-popup" href="{crmURL p='civicrm/case/report/print' q="all=1&redact=0&cid=$contactID&caseID=$caseId&asn=standard_timeline"}"><i class="crm-i fa-print"></i> {ts}Print Report{/ts}</a>
|
||||
{/if}
|
||||
|
||||
{if !empty($exportDoc)}
|
||||
<a class="crm-hover-button action-item" href="{$exportDoc}"><i class="crm-i fa-file-pdf-o"></i> {ts}Export Document{/ts}</a>
|
||||
{/if}
|
||||
|
||||
{if $mergeCases}
|
||||
<a href="#mergeCasesDialog" class="action-item no-popup crm-hover-button case-miniform"><i class="crm-i fa-compress"></i> {ts}Merge Case{/ts}</a>
|
||||
{$form._qf_CaseView_next_merge_case.html}
|
||||
<span id="mergeCasesDialog" class="hiddenElement">
|
||||
{$form.merge_case_id.html}
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
{if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))}
|
||||
<a class="action-item crm-hover-button medium-popup" href="{crmURL p='civicrm/contact/view/case/editClient' h=1 q="reset=1&action=update&id=$caseID&cid=$contactID"}"><i class="crm-i fa-user"></i> {ts}Assign to Another Client{/ts}</a>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
{include file="CRM/Case/Page/CustomDataView.tpl"}
|
||||
|
||||
<div class="crm-accordion-wrapper collapsed crm-case-roles-block">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Roles{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
|
||||
{if $hasAccessToAllCases}
|
||||
<div class="crm-submit-buttons">
|
||||
<a class="button case-miniform" href="#addCaseRoleDialog" data-key="{crmKey name='civicrm/ajax/relation'}" rel="#caseRoles-selector-{$caseID}"><i class="crm-i fa-plus-circle"></i> {ts}Add new role{/ts}</a>
|
||||
</div>
|
||||
<div id="addCaseRoleDialog" class="hiddenElement">
|
||||
<div>{$form.role_type.label}</div>
|
||||
<div>{$form.role_type.html}</div><br />
|
||||
<div><label for="add_role_contact_id">{ts}Assign To{/ts}:</label></div>
|
||||
<div><input name="add_role_contact_id" placeholder="{ts}- first select relationship type -{/ts}" class="huge" /></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div id="editCaseRoleDialog" class="hiddenElement">
|
||||
<div><label for="edit_role_contact_id">{ts}Change To{/ts}:</label></div>
|
||||
<div><input name="edit_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div>
|
||||
</div>
|
||||
|
||||
<table id="caseRoles-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-data="relation">{ts}Case Role{/ts}</th>
|
||||
<th data-data="name">{ts}Name{/ts}</th>
|
||||
<th data-data="phone">{ts}Phone{/ts}</th>
|
||||
<th data-data="email">{ts}Email{/ts}</th>
|
||||
{if $relId neq 'client' and $hasAccessToAllCases}
|
||||
<th data-data="actions" data-orderable="false">{ts}Actions{/ts}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var caseId = {/literal}{$caseID}{literal};
|
||||
CRM.$('table#caseRoles-selector-' + caseId).data({
|
||||
"ajax": {
|
||||
"url": {/literal}'{crmURL p="civicrm/ajax/caseroles" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal}
|
||||
}
|
||||
});
|
||||
})(CRM.$);
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<div id="deleteCaseRoleDialog" class="hiddenElement">
|
||||
{ts}Are you sure you want to end this relationship?{/ts}
|
||||
</div>
|
||||
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
|
||||
{if $hasAccessToAllCases}
|
||||
<div class="crm-accordion-wrapper collapsed crm-case-other-relationships-block">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Other Relationships{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-submit-buttons">
|
||||
{crmButton p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`" icon="plus-circle"}{ts}Add client relationship{/ts}{/crmButton}
|
||||
</div>
|
||||
<table id="clientRelationships-selector-{$caseID}" class="report-layout crm-ajax-table" data-page-length="10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-data="relation">{ts}Client Relationship{/ts}</th>
|
||||
<th data-data="name">{ts}Name{/ts}</th>
|
||||
<th data-data="phone">{ts}Phone{/ts}</th>
|
||||
<th data-data="email">{ts}Email{/ts}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var caseId = {/literal}{$caseID}{literal};
|
||||
CRM.$('table#clientRelationships-selector-' + caseId).data({
|
||||
"ajax": {
|
||||
"url": {/literal}'{crmURL p="civicrm/ajax/clientrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal}
|
||||
}
|
||||
});
|
||||
})(CRM.$);
|
||||
</script>
|
||||
{/literal}
|
||||
<br />
|
||||
{if !empty($globalGroupInfo.id)}
|
||||
<div class="crm-submit-buttons">
|
||||
<a class="button case-miniform" href="#addMembersToGroupDialog" rel="#globalRelationships-selector-{$caseId}" data-group_id="{$globalGroupInfo.id}">
|
||||
<i class="crm-i fa-plus-circle"></i> {ts 1=$globalGroupInfo.title}Add members to %1{/ts}
|
||||
</a>
|
||||
</div>
|
||||
<div id="addMembersToGroupDialog" class="hiddenElement">
|
||||
<input name="add_member_to_group_contact_id" placeholder="{ts}- select contacts -{/ts}" class="huge" />
|
||||
</div>
|
||||
<table id="globalRelationships-selector-{$caseId}" class="report-layout crm-ajax-table" data-page-length="10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-data="sort_name">{$globalGroupInfo.title}</th>
|
||||
<th data-data="phone">{ts}Phone{/ts}</th>
|
||||
<th data-data="email">{ts}Email{/ts}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var caseId = {/literal}{$caseID}{literal};
|
||||
CRM.$('table#globalRelationships-selector-' + caseId).data({
|
||||
"ajax": {
|
||||
"url": {/literal}'{crmURL p="civicrm/ajax/globalrelationships" h=0 q="snippet=4&caseID=$caseId&cid=$contactID&userID=$userID"}'{literal}
|
||||
}
|
||||
});
|
||||
})(CRM.$);
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
|
||||
{/if} {* other relationship section ends *}
|
||||
{include file="CRM/Case/Form/ActivityToCase.tpl"}
|
||||
|
||||
{* pane to display / edit regular tags or tagsets for cases *}
|
||||
{if $showTags}
|
||||
<div id="casetags" class="crm-accordion-wrapper crm-case-tags-block">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Case Tags{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
{if $tags}
|
||||
<p class="crm-block crm-content-block crm-case-caseview-display-tags">
|
||||
|
||||
{foreach from=$tags item='tag'}
|
||||
<span class="crm-tag-item" {if !empty($tag.color)}style="background-color: {$tag.color}; color: {$tag.color|colorContrast};"{/if}>
|
||||
{$tag.text}
|
||||
</span>
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
{foreach from=$tagSetTags item=displayTagset}
|
||||
<p class="crm-block crm-content-block crm-case-caseview-display-tagset">
|
||||
<strong>{$displayTagset.name}:</strong>
|
||||
{', '|implode:$displayTagset.items}
|
||||
</p>
|
||||
{/foreach}
|
||||
|
||||
{if !$tags && !$tagSetTags }
|
||||
<div class="status">
|
||||
{ts}There are no tags currently assigned to this case.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
<a class="button case-miniform" href="#manageTagsDialog" data-key="{crmKey name='civicrm/case/ajax/processtags'}">
|
||||
{if $tags || $tagSetTags}{ts}Edit Tags{/ts}{else}{ts}Add Tags{/ts}{/if}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
|
||||
<div id="manageTagsDialog" class="hiddenElement">
|
||||
<div class="label">{$form.case_tag.label}</div>
|
||||
<div class="view-value"><div class="crm-select-container">{$form.case_tag.html}</div>
|
||||
<br/>
|
||||
<div style="text-align:left;">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</div>
|
||||
<br/>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if} {* end of tag block*}
|
||||
|
||||
{include file="CRM/Case/Form/ActivityTab.tpl"}
|
||||
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
{/if} {* view related cases if end *}
|
||||
</div>
|
||||
{literal}
|
||||
<style type="text/css">
|
||||
.crm-case-caseview-case_subject span.crm-editable {
|
||||
padding-right: 32px;
|
||||
position: relative;
|
||||
}
|
||||
.crm-case-caseview-case_subject span.crm-editable:before {
|
||||
position: absolute;
|
||||
font-family: 'FontAwesome';
|
||||
top: 0;
|
||||
right: 10px;
|
||||
content: "\f040";
|
||||
opacity: 0.7;
|
||||
color: #000;
|
||||
font-size: .92em;
|
||||
}
|
||||
.crm-case-caseview-case_subject span.crm-editable-editing {
|
||||
padding-right: 0;
|
||||
}
|
||||
.crm-case-caseview-case_subject span.crm-editable-editing form > input {
|
||||
min-width: 20em;
|
||||
padding: 3px;
|
||||
}
|
||||
.crm-case-caseview-case_subject span.crm-editable-editing:before {
|
||||
content: "";
|
||||
}
|
||||
</style>
|
||||
{/literal}
|
|
@ -0,0 +1,29 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-block crm-form-block crm-case-custom-form-block">
|
||||
{include file="CRM/Custom/Form/CustomData.tpl" skipTitle=1}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,43 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* template for assigning the current case to another client*}
|
||||
<div class="crm-block crm-form-block crm-case-editclient-form-block">
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div> {ts 1=$currentClientName}This is case is currently assigned to %1.{/ts}
|
||||
</div>
|
||||
<div class="crm-form-block">
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-case-editclient-form-block-change_client_id">
|
||||
<td class="label">
|
||||
{$form.reassign_contact_id.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.reassign_contact_id.html}
|
||||
</td>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
</div>
|
54
sites/all/modules/civicrm/templates/CRM/Case/Form/Report.tpl
Normal file
54
sites/all/modules/civicrm/templates/CRM/Case/Form/Report.tpl
Normal file
|
@ -0,0 +1,54 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* template to display reports *}
|
||||
{if $report}
|
||||
{$report}
|
||||
{else}
|
||||
<div id="reportForm" class="crm-block crm-form-block crm-case-report-form-block">
|
||||
<h3>{ts}Report Parameters{/ts}</h3>
|
||||
{strip}
|
||||
<table class="form-layout">
|
||||
<tr class="crm-case-report-form-block-include_activities">
|
||||
<td class="label">
|
||||
{$form.include_activities.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.include_activities.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-case-report-form-block-is_redact">
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{$form.is_redact.html} {$form.is_redact.label}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
{/strip}
|
||||
</div>
|
||||
{/if}
|
83
sites/all/modules/civicrm/templates/CRM/Case/Form/Search.tpl
Normal file
83
sites/all/modules/civicrm/templates/CRM/Case/Form/Search.tpl
Normal file
|
@ -0,0 +1,83 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Search form and results for CiviCase componenet (Find Cases) *}
|
||||
{if $notConfigured} {* Case types not present. Component is not configured for use. *}
|
||||
{include file="CRM/Case/Page/ConfigureError.tpl"}
|
||||
{else}
|
||||
|
||||
<div class="crm-block crm-form-block crm-case-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-case_search-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
{strip}
|
||||
<table class="form-layout">
|
||||
<tr class="crm-case-search-form-block-sort_name">
|
||||
<td class="font-size12pt" colspan="2">
|
||||
{$form.sort_name.label} {$form.sort_name.html|crmAddClass:'twenty'}
|
||||
</td>
|
||||
<td>{include file="CRM/common/formButtons.tpl" location="top"}</td>
|
||||
</tr>
|
||||
{include file="CRM/Case/Form/Search/Common.tpl"}
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/strip}
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
{if $rowsEmpty || $rows}
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
<div class="crm-results-block crm-results-block-empty">
|
||||
{include file="CRM/Case/Form/Search/EmptyResults.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
|
||||
{* Search request has returned 1 or more matching rows. *}
|
||||
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/common/searchResultTasks.tpl"}
|
||||
</div>
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
{include file="CRM/Case/Form/Selector.tpl" context="Search"}
|
||||
</div>
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,32 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $validCiviCase}
|
||||
<div id="case-search">
|
||||
<table class="form-layout">
|
||||
{include file="CRM/Case/Form/Search/Common.tpl"}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,92 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $notConfigured} {* Case types not present. Component is not configured for use. *}
|
||||
{include file="CRM/Case/Page/ConfigureError.tpl"}
|
||||
{else}
|
||||
<tr>
|
||||
<td class="crm-case-common-form-block-case_id">
|
||||
{$form.case_id.label}<br />
|
||||
{$form.case_id.html}
|
||||
</td>
|
||||
<td class="crm-case-common-form-block-case_subject" colspan="2">
|
||||
{$form.case_subject.label}<br />
|
||||
{$form.case_subject.html}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label>{ts}Case Start Date{/ts}</label>
|
||||
</td>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="case_from" from='_start_date_low' to='_start_date_high'}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>{ts}Case End Date{/ts}</label>
|
||||
</td>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="case_to" from='_end_date_low' to='_end_date_high'}
|
||||
</tr>
|
||||
|
||||
<tr id='case_search_form'>
|
||||
<td class="crm-case-common-form-block-case_type">
|
||||
{$form.case_type_id.label}<br />
|
||||
{$form.case_type_id.html}
|
||||
</td>
|
||||
|
||||
<td class="crm-case-common-form-block-case_status_id">
|
||||
{$form.case_status_id.label}<br />
|
||||
{$form.case_status_id.html}
|
||||
{if $accessAllCases}
|
||||
<br />
|
||||
{$form.case_owner.html}
|
||||
{/if}
|
||||
{if $form.case_deleted}
|
||||
<br />
|
||||
{$form.case_deleted.html}
|
||||
{$form.case_deleted.label}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="crm-case-common-form-block-case_tags">
|
||||
{if $form.case_tags.html}
|
||||
{$form.case_tags.label}<br />
|
||||
{$form.case_tags.html}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</td>
|
||||
</tr>
|
||||
|
||||
{if $caseGroupTree}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
{include file="CRM/Custom/Form/Search.tpl" groupTree=$caseGroupTree showHideLinks=false}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{/if}
|
|
@ -0,0 +1,42 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* No matches for submitted search request. *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{if $qill}{ts}No matches found for:{/ts}
|
||||
{include file="CRM/common/displaySearchCriteria.tpl"}
|
||||
{else}
|
||||
{ts}None found.{/ts}
|
||||
{/if}
|
||||
<br />
|
||||
{ts}Suggestions:{/ts}
|
||||
<ul>
|
||||
<li>{ts}if you are searching by client name, check your spelling{/ts}</li>
|
||||
<li>{ts}try a different spelling or use fewer letters{/ts}</li>
|
||||
<li>{ts}if you are searching within a date range, try a wider range of values{/ts}</li>
|
||||
<li>{ts}make sure you have enough privileges in the access control system{/ts}</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,88 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
{strip}
|
||||
<table class="caseSelector">
|
||||
<tr class="columnheader">
|
||||
|
||||
{if ! $single and $context eq 'Search' }
|
||||
<th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
|
||||
{/if}
|
||||
|
||||
<th></th>
|
||||
|
||||
{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 id='rowid{$list}{$row.case_id}' class="{cycle values="odd-row,even-row"} crm-case crm-case-status_{$row.case_status_id} crm-case-type_{$row.case_type_id}">
|
||||
{if $context eq 'Search' && !$single}
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{/if}
|
||||
<td class="crm-case-id crm-case-id_{$row.case_id}">
|
||||
<a title="{ts}Activities{/ts}" class="crm-expand-row" href="{crmURL p='civicrm/case/details' q="caseId=`$row.case_id`&cid=`$row.contact_id`"}"></a>
|
||||
</td>
|
||||
|
||||
{if !$single}
|
||||
<td class="crm-case-id crm-case-id_{$row.case_id}"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>{if $row.phone}<br /><span class="description">{$row.phone}</span>{/if}<br /><span class="description">{ts}Case ID{/ts}: {$row.case_id}</span></td>
|
||||
{/if}
|
||||
|
||||
<td class="crm-case-subject">{$row.case_subject}</td>
|
||||
<td class="{$row.class} crm-case-status_{$row.case_status}">{$row.case_status}</td>
|
||||
<td class="crm-case-case_type">{$row.case_type}</td>
|
||||
<td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
|
||||
<td class="crm-case-case_manager">{if $row.casemanager_id}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.casemanager_id`"}">{$row.casemanager}</a>{else}---{/if}</td>
|
||||
<td class="crm-case-case_recent_activity_type">{if $row.case_recent_activity_type}
|
||||
{$row.case_recent_activity_type}<br />{$row.case_recent_activity_date|crmDate}{else}---{/if}</td>
|
||||
<td class="crm-case-case_scheduled_activity_type">{if $row.case_scheduled_activity_type}
|
||||
{$row.case_scheduled_activity_type}<br />{$row.case_scheduled_activity_date|crmDate}{else}---{/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.case_id}{$row.moreActions|replace:'xx':$row.case_id}</td>
|
||||
{/foreach}
|
||||
|
||||
{* Dashboard only lists 10 most recent cases. *}
|
||||
{if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
|
||||
<tr class="even-row">
|
||||
<td colspan="10"><a href="{crmURL p='civicrm/case/search' q='reset=1'}">» {ts}Find more cases{/ts}... </a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
{crmScript file='js/crm.expandRow.js'}
|
41
sites/all/modules/civicrm/templates/CRM/Case/Form/Task.tpl
Normal file
41
sites/all/modules/civicrm/templates/CRM/Case/Form/Task.tpl
Normal file
|
@ -0,0 +1,41 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{ts 1=$totalSelectedCases}Number of selected cases: %1{/ts}
|
||||
|
||||
{if $rows }
|
||||
<div class="crm-block-crm-form-block crm-case-task-form-block">
|
||||
<table width="30%">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Name{/ts}</th>
|
||||
</tr>
|
||||
{foreach from=$rows item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"} crm-case-task-displayName">
|
||||
<td>{$row.displayName}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,36 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Confirmation of contribution deletes *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}Are you sure you want to delete the selected cases? This will move the case(s) and all associated activities to the Trash.{/ts}<br/>
|
||||
<p>{include file="CRM/Case/Form/Task.tpl"}</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="bottom"}
|
||||
</div>
|
|
@ -0,0 +1,30 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-form-block crm-block crm-contact-task-pdf-form-block">
|
||||
<div class="messages status no-popup">{include file="CRM/Case/Form/Task.tpl"}</div>
|
||||
{include file="CRM/Contact/Form/Task/PDFLetterCommon.tpl"}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,68 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<p>
|
||||
|
||||
{if $rows }
|
||||
<div class="crm-submit-buttons">
|
||||
<span class="element-right">{include file="CRM/common/formButtons.tpl" location="top"}</span>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<br />
|
||||
<p>
|
||||
<table>
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Client{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Case Type{/ts}</th>
|
||||
<th>{ts}My Role{/ts}</th>
|
||||
<th>{ts}Most Recent Activity{/ts}</th>
|
||||
<th>{ts}Next Scheduled Activity{/ts}</th>
|
||||
</tr>
|
||||
|
||||
{foreach from=$rows item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td class="crm-case-print-sort_name">{$row.sort_name}<br /><span class="description">{ts}Case ID{/ts}: {$row.case_id}</span></td>
|
||||
<td class="crm-case-print-case_status_id">{$row.case_status_id}</td>
|
||||
<td class="crm-case-print-case_type_id">{$row.case_type_id}</td>
|
||||
<td class="crm-case-print-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
|
||||
<td class="crm-case-print-case_recent_activity_type">{if $row.case_recent_activity_type}
|
||||
{$row.case_recent_activity_type}<br />{$row.case_recent_activity_date|crmDate}{else}---{/if}</td>
|
||||
<td class="crm-case-print-case_scheduled_activity_type">{if $row.case_scheduled_activity_type}
|
||||
{$row.case_scheduled_activity_type}<br />{$row.case_scheduled_activity_date|crmDate}{else}---{/if}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
<span class="element-right">{include file="CRM/common/formButtons.tpl" location="bottom"}</span>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}There are no records selected for Print.{/ts}
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,35 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Confirmation of contribution deletes *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}Are you sure you want to restore the selected cases? This operation will retrieve the case(s) and all associated activities from Trash.{/ts}</p>
|
||||
<p>{include file="CRM/Case/Form/Task.tpl"}</p>
|
||||
</div>
|
||||
<p>
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="bottom"}
|
||||
</div>
|
|
@ -0,0 +1,36 @@
|
|||
{if $rows}
|
||||
<div class="crm-submit-buttons">
|
||||
<span class="element-right">{include file="CRM/common/formButtons.tpl" location="top"}</span>
|
||||
</div>
|
||||
|
||||
<div class="spacer"></div>
|
||||
|
||||
<div>
|
||||
<br />
|
||||
<table>
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Display Name{/ts}</th>
|
||||
<th>{ts}Start Date{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
</tr>
|
||||
|
||||
{foreach from=$rows item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td class="crm-case-searchtaskhooksample-display_name">{$row.display_name}</td>
|
||||
<td class="crm-case-searchtaskhooksample-start_date">{$row.start_date}</td>
|
||||
<td class="crm-case-searchtaskhooksample-status">{$row.status}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
<span class="element-right">{include file="CRM/common/formButtons.tpl" location="bottom"}</span>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}There are no records selected.{/ts}
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,41 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Ajax-loaded list of related cases *}
|
||||
<table class="report">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Client Name{/ts}</th>
|
||||
<th>{ts}Case Type{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
{foreach from=$relatedCases item=row key=caseId}
|
||||
<tr>
|
||||
<td class="crm-case-caseview-client_name label">{$row.client_name}</td>
|
||||
<td class="crm-case-caseview-case_type label">{$row.case_type}</td>
|
||||
<td class="label">{$row.links}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
|
@ -0,0 +1,29 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{include file="CRM/Case/Form/ActivityTab.tpl"}
|
||||
|
||||
{include file="CRM/Case/Form/ActivityToCase.tpl"}
|
|
@ -0,0 +1,34 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* CiviCase Configuration Help - displayed when component is enabled but not yet configured. *}
|
||||
|
||||
{capture assign=docLink}{docURL page="user/case-management/set-up" text="CiviCase Setup documentation"}{/capture}
|
||||
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
<strong>{ts}You need to setup and load Case and Activity configuration files before you can begin using the CiviCase component.{/ts}</strong>
|
||||
{ts 1=$docLink}Refer to the %1 to learn about this process.{/ts}
|
||||
</div>
|
|
@ -0,0 +1,63 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Custom Data view mode*}
|
||||
{foreach from=$viewCustomData item=customValues key=customGroupId}
|
||||
{foreach from=$customValues item=cd_edit key=cvID}
|
||||
{assign var='index' value=$groupId|cat:"_$cvID"}
|
||||
<div id="{$cd_edit.name}" class="crm-accordion-wrapper {if $cd_edit.collapse_display neq 0}collapsed{/if}">
|
||||
<div class="crm-accordion-header">
|
||||
{$cd_edit.title}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
{foreach from=$cd_edit.fields item=element key=field_id}
|
||||
<table class="crm-info-panel">
|
||||
<tr>
|
||||
{if $element.options_per_line != 0}
|
||||
<td class="label">{$element.field_title}</td>
|
||||
<td class="html-adjust">
|
||||
{* sort by fails for option per line. Added a variable to iterate through the element array*}
|
||||
{foreach from=$element.field_value item=val}
|
||||
{$val}<br/>
|
||||
{/foreach}
|
||||
</td>
|
||||
{else}
|
||||
<td class="label">{$element.field_title}</td>
|
||||
<td class="html-adjust">{$element.field_value}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</table>
|
||||
{/foreach}
|
||||
<div>
|
||||
{crmButton p="civicrm/case/cd/edit" q="cgcount=1&action=update&reset=1&type=Case&entityID=$caseID&groupID=$customGroupId&cid=$contactID&subType=$caseTypeID" icon="pencil"}{ts}Edit{/ts}{/crmButton}
|
||||
</div>
|
||||
<br/>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<div id="case_custom_edit"></div>
|
112
sites/all/modules/civicrm/templates/CRM/Case/Page/DashBoard.tpl
Normal file
112
sites/all/modules/civicrm/templates/CRM/Case/Page/DashBoard.tpl
Normal file
|
@ -0,0 +1,112 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* CiviCase DashBoard (launch page) *}
|
||||
|
||||
<div class="crm-block crm-content-block">
|
||||
{if $notConfigured} {* Case types not present. Component is not configured for use. *}
|
||||
{include file="CRM/Case/Page/ConfigureError.tpl"}
|
||||
{else}
|
||||
|
||||
{capture assign=newCaseURL}{crmURL p="civicrm/case/add" q="action=add&context=standalone&reset=1"}{/capture}
|
||||
|
||||
<div class="crm-submit-buttons crm-case-dashboard-buttons">
|
||||
{if $newClient and $allowToAddNewCase}
|
||||
<a href="{$newCaseURL}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Case{/ts}</span></a>
|
||||
{/if}
|
||||
<a class="button no-popup" name="find_my_cases" href="{crmURL p="civicrm/case/search" q="reset=1&case_owner=2&force=1"}"><span><i class="crm-i fa-search"></i> {ts}Find My Cases{/ts}</span></a>
|
||||
|
||||
<div class="crm-case-dashboard-switch-view-buttons">
|
||||
{if $myCases}
|
||||
{* check for access all cases and activities *}
|
||||
{if call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities')}
|
||||
<div><input name="allupcoming" type="radio" class="radio" onClick='window.location.replace("{crmURL p="civicrm/case" q="reset=1&all=1"}")' value="1"><span>{ts}All Cases with Upcoming Activities{/ts}</span></input></div>
|
||||
<div><input name="allupcoming" checked type="radio" class="radio" onClick='window.location.replace("{crmURL p="civicrm/case" q="reset=1&all=0"}")' value="0"><span>{ts}My Cases with Upcoming Activities{/ts}</span></input></div>
|
||||
{/if}
|
||||
{else}
|
||||
<div><input name="allupcoming" checked type="radio" class="radio" onClick='window.location.replace("{crmURL p="civicrm/case" q="reset=1&all=1"}")' value="1"><span>{ts}All Cases with Upcoming Activities{/ts}</span></input></div>
|
||||
<div><input name="allupcoming" type="radio" class="radio" onClick='window.location.replace("{crmURL p="civicrm/case" q="reset=1&all=0"}")' value="0"><span>{ts}My Cases with Upcoming Activities{/ts}</span></input></div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h3>
|
||||
{if $myCases}
|
||||
{ts}Summary of Involvement{/ts}
|
||||
{else}
|
||||
{ts}Summary of All Cases{/ts}
|
||||
{/if}
|
||||
</h3>
|
||||
<table class="report">
|
||||
<tr class="columnheader">
|
||||
<th> </th>
|
||||
{foreach from=$casesSummary.headers item=header}
|
||||
<th scope="col" class="right" style="padding-right: 10px;"><a href="{$header.url}">{$header.status}</a></th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
{foreach from=$casesSummary.rows item=row key=caseType}
|
||||
<tr class="crm-case-caseStatus">
|
||||
<th><strong>{$caseType}</strong></th>
|
||||
{foreach from=$casesSummary.headers item=header}
|
||||
{assign var="caseStatus" value=$header.status}
|
||||
<td class="label">
|
||||
{if $row.$caseStatus}
|
||||
<a class="crm-case-summary-drilldown" href="{$row.$caseStatus.url}">{$row.$caseStatus.count}</a>
|
||||
{else}
|
||||
0
|
||||
{/if}
|
||||
</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{capture assign=findCasesURL}<a href="{crmURL p="civicrm/case/search" q="reset=1"}">{ts}Find Cases{/ts}</a>{/capture}
|
||||
|
||||
<div class="spacer"></div>
|
||||
<h3>{if $myCases}{ts}My Cases With Upcoming Activities{/ts}{else}{ts}All Cases With Upcoming Activities{/ts}{/if}</h3>
|
||||
{if $upcomingCases}
|
||||
<div class="form-item">
|
||||
{include file="CRM/Case/Page/DashboardSelector.tpl" context="dashboard" list="upcoming" rows=$upcomingCases}
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
{ts 1=$findCasesURL}There are no open cases with activities scheduled in the next two weeks. Use %1 to expand your search.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="spacer"></div>
|
||||
<h3>{if $myCases}{ts}My Cases With Recently Performed Activities{/ts}{else}{ts}All Cases With Recently Performed Activities{/ts}{/if}</h3>
|
||||
{if $recentCases}
|
||||
<div class="form-item">
|
||||
{include file="CRM/Case/Page/DashboardSelector.tpl" context="dashboard" list="recent" rows=$recentCases}
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
{ts 1=$findCasesURL}There are no cases with activities scheduled in the past two weeks. Use %1 to expand your search.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
|
@ -0,0 +1,98 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{capture assign=expandIconURL}<img src="{$config->resourceBase}i/TreePlus.gif" alt="{ts}open section{/ts}"/>{/capture}
|
||||
{strip}
|
||||
<table class="caseSelector">
|
||||
<tr class="columnheader">
|
||||
<th></th>
|
||||
<th>{ts}Contact{/ts}</th>
|
||||
<th>{ts}Subject{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Type{/ts}</th>
|
||||
<th>{ts}My Role{/ts}</th>
|
||||
<th>{ts}Manager{/ts}</th>
|
||||
<th>{if $list EQ 'upcoming'}{ts}Next Sched.{/ts}{elseif $list EQ 'recent'}{ts}Most Recent{/ts}{/if}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
|
||||
<tr id='{$context}-{$list}-rowid-{$row.case_id}' class="crm-case crm-case_{$row.case_id}">
|
||||
<td>
|
||||
<a title="{ts}Activities{/ts}" class="crm-expand-row" href="{crmURL p='civicrm/case/details' q="caseId=`$row.case_id`&cid=`$row.contact_id`&type=$list"}"></a>
|
||||
</td>
|
||||
|
||||
<td class="crm-case-phone"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a>{if $row.phone}<br /><span class="description">{$row.phone}</span>{/if}<br /><span class="description">{ts}Case ID{/ts}: {$row.case_id}</span></td>
|
||||
<td class="crm-case-case_subject">{$row.case_subject}</td>
|
||||
<td class="{$row.class} crm-case-case_status">{$row.case_status}</td>
|
||||
<td class="crm-case-case_type">{$row.case_type}</td>
|
||||
<td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
|
||||
<td class="crm-case-casemanager">{if $row.casemanager_id}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.casemanager_id`"}">{$row.casemanager}</a>{else}---{/if}</td>
|
||||
{if $list eq 'upcoming'}
|
||||
<td class="crm-case-case_scheduled_activity">
|
||||
{if $row.case_upcoming_activity_viewable}
|
||||
<a class="crm-popup {$row.activity_status}" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid="}{$row.contact_id}&aid={$row.case_scheduled_activity_id}" title="{ts}View activity{/ts}">{$row.case_scheduled_activity_type}</a>
|
||||
{else}
|
||||
{$row.case_scheduled_activity_type}
|
||||
{/if}
|
||||
|
||||
{if $row.case_upcoming_activity_editable}
|
||||
<a class="action-item crm-hover-button" href="{crmURL p="civicrm/case/activity" q="reset=1&cid=`$row.contact_id`&caseid=`$row.case_id`&action=update&id=`$row.case_scheduled_activity_id`"}" title="{ts}Edit activity{/ts}"><i class="crm-i fa-pencil"></i></a>
|
||||
{/if}
|
||||
<br />
|
||||
{$row.case_scheduled_activity_date|crmDate}
|
||||
</td>
|
||||
|
||||
{elseif $list eq 'recent'}
|
||||
<td class="crm-case-case_recent_activity">
|
||||
{if $row.case_recent_activity_viewable}
|
||||
<a class="action-item crm-hover-button" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid="}{$row.contact_id}&aid={$row.case_recent_activity_id}" title="{ts}View activity{/ts}">{$row.case_recent_activity_type}</a>
|
||||
{else}
|
||||
{$row.case_recent_activity_type}
|
||||
{/if}
|
||||
{if $row.case_recent_activity_editable and $row.case_recent_activity_type_name != 'Inbound Email' && $row.case_recent_activity_type_name != 'Email'} <a href="{crmURL p="civicrm/case/activity" q="reset=1&cid=`$row.contact_id`&caseid=`$row.case_id`&action=update&id=`$row.case_recent_activity_id`"}" title="{ts}Edit activity{/ts}" class="crm-hover-button crm-popup"><i class="crm-i fa-pencil"></i></a>
|
||||
{/if}<br />
|
||||
{$row.case_recent_activity_date|crmDate}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
<td>{$row.action}{$row.moreActions}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{* Dashboard only lists 10 most recent casess. *}
|
||||
{if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
|
||||
<tr class="even-row">
|
||||
<td colspan="10"><a href="{crmURL p='civicrm/case/search' q='reset=1'}">» {ts}Find more cases{/ts}... </a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
|
||||
{/strip}
|
||||
|
||||
{crmScript file='js/crm.expandRow.js'}
|
78
sites/all/modules/civicrm/templates/CRM/Case/Page/Tab.tpl
Normal file
78
sites/all/modules/civicrm/templates/CRM/Case/Page/Tab.tpl
Normal file
|
@ -0,0 +1,78 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $notConfigured} {* Case types not present. Component is not configured for use. *}
|
||||
{include file="CRM/Case/Page/ConfigureError.tpl"}
|
||||
|
||||
{elseif $redirectToCaseAdmin}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
<strong>{ts}Oops, It looks like there are no active case types.{/ts}</strong>
|
||||
{if call_user_func(array('CRM_Core_Permission','check'), ' administer CiviCase')}
|
||||
{capture assign=adminCaseTypeURL}{crmURL p='civicrm/a/#/caseType'}
|
||||
{/capture}
|
||||
{ts 1=$adminCaseTypeURL 2=$adminCaseStatusURL}Enable <a href='%1'>case types</a>.{/ts}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{else}
|
||||
|
||||
{capture assign=newCaseURL}{crmURL p="civicrm/case/add" q="reset=1&action=add&cid=`$contactId`&context=case"}{/capture}
|
||||
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 32768 } {* add, update, delete, restore*}
|
||||
{include file="CRM/Case/Form/Case.tpl"}
|
||||
{elseif $action eq 4 }
|
||||
{include file="CRM/Case/Form/CaseView.tpl"}
|
||||
|
||||
{else}
|
||||
<div class="crm-block crm-content-block">
|
||||
<div class="view-content">
|
||||
<div class="help">
|
||||
{ts 1=$displayName}This page lists all case records for %1.{/ts}
|
||||
{if $permission EQ 'edit' and call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities') and $allowToAddNewCase}
|
||||
{ts 1="href='$newCaseURL' class='action-item'"}Click <a %1>Add Case</a> to add a case record for this contact.{/ts}{/if}
|
||||
</div>
|
||||
|
||||
{if $action eq 16 and $permission EQ 'edit' and
|
||||
( call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities') OR
|
||||
call_user_func(array('CRM_Core_Permission','check'), 'add cases') ) AND
|
||||
$allowToAddNewCase}
|
||||
<div class="action-link">
|
||||
<a accesskey="N" href="{$newCaseURL}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Case{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
{include file="CRM/Case/Form/Selector.tpl"}
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}There are no case records for this contact.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,73 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Case>
|
||||
<Client>{$case.clientName}</Client>
|
||||
<CaseType>{$case.caseType}</CaseType>
|
||||
<CaseSubject>{$case.subject|escape}</CaseSubject>
|
||||
<CaseStatus>{$case.status}</CaseStatus>
|
||||
<CaseOpen>{$case.start_date}</CaseOpen>
|
||||
<CaseClose>{$case.end_date}</CaseClose>
|
||||
<ActivitySet>
|
||||
<Label>{$activitySet.label}</Label>
|
||||
<IncludeActivities>{$includeActivities}</IncludeActivities>
|
||||
<Redact>{$isRedact}</Redact>
|
||||
{foreach from=$activities item=activity}
|
||||
<Activity>
|
||||
<EditURL>{$activity.editURL}</EditURL>
|
||||
<Fields>
|
||||
{foreach from=$activity.fields item=field}
|
||||
<Field>
|
||||
<Label>{$field.label|escape}</Label>
|
||||
{if $field.category}
|
||||
<Category>{$field.category|escape}</Category>
|
||||
{/if}
|
||||
<Value>{$field.value|escape}</Value>
|
||||
<Type>{$field.type}</Type>
|
||||
</Field>
|
||||
{/foreach}
|
||||
{if $activity.customGroups}
|
||||
<CustomGroups>
|
||||
{foreach from=$activity.customGroups key=customGroupName item=customGroup}
|
||||
<CustomGroup>
|
||||
<GroupName>{$customGroupName|escape}</GroupName>
|
||||
{foreach from=$customGroup item=field}
|
||||
<Field>
|
||||
<Label>{$field.label|escape}</Label>
|
||||
<Value>{$field.value|escape}</Value>
|
||||
<Type>{$field.type}</Type>
|
||||
</Field>
|
||||
{/foreach}
|
||||
</CustomGroup>
|
||||
{/foreach}
|
||||
</CustomGroups>
|
||||
{/if}
|
||||
</Fields>
|
||||
</Activity>
|
||||
{/foreach}
|
||||
</ActivitySet>
|
||||
</Case>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue