Commit | Line | Data |
---|---|---|
b2603e29 | 1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
b2603e29 | 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 | | |
b2603e29 | 8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {* CiviCase DashBoard (launch page) *} | |
11 | ||
12 | <div class="crm-block crm-content-block"> | |
682a72f9 | 13 | {if $notConfigured} {* Case types not present. Component is not configured for use. *} |
b2603e29 | 14 | {include file="CRM/Case/Page/ConfigureError.tpl"} |
682a72f9 | 15 | {else} |
b2603e29 | 16 | |
682a72f9 | 17 | {capture assign=newCaseURL}{crmURL p="civicrm/case/add" q="action=add&context=standalone&reset=1"}{/capture} |
b2603e29 | 18 | |
682a72f9 SL |
19 | <div class="crm-submit-buttons crm-case-dashboard-buttons"> |
20 | {if $newClient and $allowToAddNewCase} | |
13a3d214 | 21 | <a href="{$newCaseURL}" class="button"><span><i class="crm-i fa-plus-circle" aria-hidden="true"></i> {ts}Add Case{/ts}</span></a> |
682a72f9 | 22 | {/if} |
13a3d214 | 23 | <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" aria-hidden="true"></i> {ts}Find My Cases{/ts}</span></a> |
b2603e29 | 24 | |
682a72f9 | 25 | <div class="crm-case-dashboard-switch-view-buttons"> |
b2603e29 | 26 | {if $myCases} |
5f1c8c57 | 27 | {* check for access all cases and activities *} |
28 | {if call_user_func(array('CRM_Core_Permission','check'), 'access all cases and activities')} | |
29 | <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> | |
30 | <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> | |
31 | {/if} | |
b2603e29 | 32 | {else} |
5f1c8c57 | 33 | <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> |
34 | <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> | |
b2603e29 | 35 | {/if} |
682a72f9 | 36 | </div> |
b2603e29 | 37 | </div> |
b2603e29 | 38 | |
682a72f9 SL |
39 | <h3> |
40 | {if $myCases} | |
41 | {ts}Summary of Involvement{/ts} | |
42 | {else} | |
43 | {ts}Summary of All Cases{/ts} | |
44 | {/if} | |
45 | </h3> | |
46 | <table class="report"> | |
47 | <tr class="columnheader"> | |
48 | <th> </th> | |
49 | {foreach from=$casesSummary.headers item=header} | |
50 | <th scope="col" class="right" style="padding-right: 10px;"><a href="{$header.url}">{$header.status}</a></th> | |
51 | {/foreach} | |
52 | </tr> | |
53 | {foreach from=$casesSummary.rows item=row key=caseType} | |
54 | <tr class="crm-case-caseStatus"> | |
55 | <th><strong>{$caseType}</strong></th> | |
56 | {foreach from=$casesSummary.headers item=header} | |
57 | {assign var="caseStatus" value=$header.status} | |
58 | <td class="label"> | |
59 | {if $row.$caseStatus} | |
60 | <a class="crm-case-summary-drilldown" href="{$row.$caseStatus.url}">{$row.$caseStatus.count}</a> | |
61 | {else} | |
62 | 0 | |
63 | {/if} | |
64 | </td> | |
65 | {/foreach} | |
66 | </tr> | |
67 | {/foreach} | |
68 | </table> | |
69 | {capture assign=findCasesURL}<a href="{crmURL p="civicrm/case/search" q="reset=1"}">{ts}Find Cases{/ts}</a>{/capture} | |
b2603e29 | 70 | |
682a72f9 | 71 | <div class="spacer"></div> |
b2603e29 | 72 | <h3>{if $myCases}{ts}My Cases With Upcoming Activities{/ts}{else}{ts}All Cases With Upcoming Activities{/ts}{/if}</h3> |
73 | {if $upcomingCases} | |
682a72f9 SL |
74 | {include file="CRM/Case/Form/CaseFilter.tpl" context="$context" list="upcoming"} |
75 | <div class="form-item"> | |
5f1c8c57 | 76 | {include file="CRM/Case/Page/DashboardSelector.tpl" context="dashboard" list="upcoming" all="$all"} |
682a72f9 | 77 | </div> |
b2603e29 | 78 | {else} |
682a72f9 SL |
79 | <div class="messages status no-popup"> |
80 | {ts 1=$findCasesURL}There are no open cases with activities scheduled in the next two weeks. Use %1 to expand your search.{/ts} | |
81 | </div> | |
b2603e29 | 82 | {/if} |
83 | ||
682a72f9 | 84 | <div class="spacer"></div> |
1d36546b SL |
85 | <h3>{if $myCases}{ts}My Cases With Recently Performed Activities{/ts}{else}{ts}All Cases With Recently Performed Activities{/ts}{/if}</h3> |
86 | {if $recentCases} | |
87 | {include file="CRM/Case/Form/CaseFilter.tpl" context="$context" list="recent"} | |
88 | <div class="form-item"> | |
89 | {include file="CRM/Case/Page/DashboardSelector.tpl" context="dashboard" list="recent" all="$all"} | |
90 | </div> | |
91 | {else} | |
92 | <div class="messages status no-popup"> | |
93 | {ts 1=$findCasesURL}There are no cases with activities scheduled in the past two weeks. Use %1 to expand your search.{/ts} | |
94 | </div> | |
95 | {/if} | |
682a72f9 | 96 | {/if} |
5f1c8c57 | 97 | </div> |