Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {if $notConfigured} {* Case types not present. Component is not configured for use. *} | |
11 | {include file="CRM/Case/Page/ConfigureError.tpl"} | |
12 | ||
13 | {elseif $redirectToCaseAdmin} | |
14 | <div class="messages status no-popup"> | |
34d6cec4 | 15 | {icon icon="fa-info-circle"}{/icon} |
6a488035 TO |
16 | <strong>{ts}Oops, It looks like there are no active case types.{/ts}</strong> |
17 | {if call_user_func(array('CRM_Core_Permission','check'), ' administer CiviCase')} | |
84b27ea4 | 18 | {capture assign=adminCaseTypeURL}{crmURL p='civicrm/a/#/caseType'} |
6a488035 TO |
19 | {/capture} |
20 | {ts 1=$adminCaseTypeURL 2=$adminCaseStatusURL}Enable <a href='%1'>case types</a>.{/ts} | |
21 | {/if} | |
22 | </div> | |
23 | ||
24 | {else} | |
25 | ||
26 | {capture assign=newCaseURL}{crmURL p="civicrm/case/add" q="reset=1&action=add&cid=`$contactId`&context=case"}{/capture} | |
27 | ||
28 | {if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 32768 } {* add, update, delete, restore*} | |
29 | {include file="CRM/Case/Form/Case.tpl"} | |
30 | {elseif $action eq 4 } | |
31 | {include file="CRM/Case/Form/CaseView.tpl"} | |
32 | ||
33 | {else} | |
34 | <div class="crm-block crm-content-block"> | |
35 | <div class="view-content"> | |
f6eedce7 | 36 | <div class="help"> |
6a488035 | 37 | {ts 1=$displayName}This page lists all case records for %1.{/ts} |
6b754ecb CW |
38 | {if $permission EQ 'edit' and call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities') and $allowToAddNewCase} |
39 | {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 |
40 | </div> |
41 | ||
42 | {if $action eq 16 and $permission EQ 'edit' and | |
43 | ( call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities') OR | |
44 | call_user_func(array('CRM_Core_Permission','check'), 'add cases') ) AND | |
45 | $allowToAddNewCase} | |
46 | <div class="action-link"> | |
13a3d214 | 47 | <a accesskey="N" href="{$newCaseURL}" class="button no-popup"><span><i class="crm-i fa-plus-circle" aria-hidden="true"></i> {ts}Add Case{/ts}</span></a> |
6a488035 TO |
48 | </div> |
49 | {/if} | |
50 | ||
51 | {if $rows} | |
52 | {include file="CRM/Case/Form/Selector.tpl"} | |
53 | {else} | |
54 | <div class="messages status no-popup"> | |
34d6cec4 | 55 | {icon icon="fa-info-circle"}{/icon} |
6a488035 TO |
56 | {ts}There are no case records for this contact.{/ts} |
57 | </div> | |
58 | {/if} | |
59 | </div> | |
60 | </div> | |
61 | {/if} | |
62 | {/if} |