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