{* +--------------------------------------------------------------------+ | Copyright CiviCRM LLC. All rights reserved. | | | | This work is published under the GNU AGPLv3 license with some | | permitted exceptions and without any warranty. For full license | | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} {* CiviCase DashBoard (launch page) *}
{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}
{if $newClient and $allowToAddNewCase} {ts}Add Case{/ts} {/if} {ts}Find My Cases{/ts}
{if $myCases} {* check for access all cases and activities *} {if call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities')}
{ts}All Cases with Upcoming Activities{/ts}
{ts}My Cases with Upcoming Activities{/ts}
{/if} {else}
{ts}All Cases with Upcoming Activities{/ts}
{ts}My Cases with Upcoming Activities{/ts}
{/if}

{if $myCases} {ts}Summary of Involvement{/ts} {else} {ts}Summary of All Cases{/ts} {/if}

{foreach from=$casesSummary.headers item=header} {/foreach} {foreach from=$casesSummary.rows item=row key=caseType} {foreach from=$casesSummary.headers item=header} {assign var="caseStatus" value=$header.status} {/foreach} {/foreach}
 {$header.status}
{$caseType} {if $row.$caseStatus} {$row.$caseStatus.count} {else} 0 {/if}
{capture assign=findCasesURL}{ts}Find Cases{/ts}{/capture}

{if $myCases}{ts}My Cases With Upcoming Activities{/ts}{else}{ts}All Cases With Upcoming Activities{/ts}{/if}

{if $upcomingCases} {include file="CRM/Case/Form/CaseFilter.tpl" context="$context" list="upcoming"}
{include file="CRM/Case/Page/DashboardSelector.tpl" context="dashboard" list="upcoming" all="$all"}
{else}
{ts 1=$findCasesURL}There are no open cases with activities scheduled in the next two weeks. Use %1 to expand your search.{/ts}
{/if}

{if $myCases}{ts}My Cases With Recently Performed Activities{/ts}{else}{ts}All Cases With Recently Performed Activities{/ts}{/if}

{if $recentCases} {include file="CRM/Case/Form/CaseFilter.tpl" context="$context" list="recent"}
{include file="CRM/Case/Page/DashboardSelector.tpl" context="dashboard" list="recent" all="$all"}
{else}
{ts 1=$findCasesURL}There are no cases with activities scheduled in the past two weeks. Use %1 to expand your search.{/ts}
{/if} {/if}