Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {if $notConfigured} {* Case types not present. Component is not configured for use. *} | |
27 | {include file="CRM/Case/Page/ConfigureError.tpl"} | |
28 | ||
29 | {elseif $redirectToCaseAdmin} | |
30 | <div class="messages status no-popup"> | |
31 | <div class="icon inform-icon"></div> | |
32 | <strong>{ts}Oops, It looks like there are no active case types.{/ts}</strong> | |
33 | {if call_user_func(array('CRM_Core_Permission','check'), ' administer CiviCase')} | |
84b27ea4 | 34 | {capture assign=adminCaseTypeURL}{crmURL p='civicrm/a/#/caseType'} |
6a488035 TO |
35 | {/capture} |
36 | {ts 1=$adminCaseTypeURL 2=$adminCaseStatusURL}Enable <a href='%1'>case types</a>.{/ts} | |
37 | {/if} | |
38 | </div> | |
39 | ||
40 | {else} | |
41 | ||
42 | {capture assign=newCaseURL}{crmURL p="civicrm/case/add" q="reset=1&action=add&cid=`$contactId`&context=case"}{/capture} | |
43 | ||
44 | {if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 32768 } {* add, update, delete, restore*} | |
45 | {include file="CRM/Case/Form/Case.tpl"} | |
46 | {elseif $action eq 4 } | |
47 | {include file="CRM/Case/Form/CaseView.tpl"} | |
48 | ||
49 | {else} | |
50 | <div class="crm-block crm-content-block"> | |
51 | <div class="view-content"> | |
f6eedce7 | 52 | <div class="help"> |
6a488035 | 53 | {ts 1=$displayName}This page lists all case records for %1.{/ts} |
6b754ecb CW |
54 | {if $permission EQ 'edit' and call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities') and $allowToAddNewCase} |
55 | {ts 1="href='$newCaseURL' class='action-item'"}Click <a %1>Add Case</a> to add a case record for this contact.{/ts}{/if} | |
6a488035 TO |
56 | </div> |
57 | ||
58 | {if $action eq 16 and $permission EQ 'edit' and | |
59 | ( call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities') OR | |
60 | call_user_func(array('CRM_Core_Permission','check'), 'add cases') ) AND | |
61 | $allowToAddNewCase} | |
62 | <div class="action-link"> | |
b9b7fd6b | 63 | <a accesskey="N" href="{$newCaseURL}" class="button no-popup"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Case{/ts}</span></a> |
6a488035 TO |
64 | </div> |
65 | {/if} | |
66 | ||
67 | {if $rows} | |
68 | {include file="CRM/Case/Form/Selector.tpl"} | |
69 | {else} | |
70 | <div class="messages status no-popup"> | |
71 | <div class="icon inform-icon"></div> | |
72 | {ts}There are no case records for this contact.{/ts} | |
73 | </div> | |
74 | {/if} | |
75 | </div> | |
76 | </div> | |
77 | {/if} | |
78 | {/if} |