edb1a1b86631676b83e07d8159bb13f168c0a63d
[civicrm-core.git] / templates / CRM / Case / Page / DashboardSelector.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
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 {capture assign=expandIconURL}<img src="{$config->resourceBase}i/TreePlus.gif" alt="{ts}open section{/ts}"/>{/capture}
27 {strip}
28 <table class="caseSelector">
29 <tr class="columnheader">
30 <th></th>
31 <th>{ts}Contact{/ts}</th>
32 <th>{ts}Subject{/ts}</th>
33 <th>{ts}Status{/ts}</th>
34 <th>{ts}Type{/ts}</th>
35 <th>{ts}My Role{/ts}</th>
36 <th>{ts}Manager{/ts}</th>
37 <th>{if $list EQ 'upcoming'}{ts}Next Sched.{/ts}{elseif $list EQ 'recent'}{ts}Most Recent{/ts}{/if}</th>
38 <th></th>
39 </tr>
40
41 {counter start=0 skip=1 print=false}
42 {foreach from=$rows item=row}
43
44 <tr id='{$context}-{$list}-rowid-{$row.case_id}' class="crm-case crm-case_{$row.case_id}">
45 <td>
46 <a title="{ts}Activities{/ts}" class="crm-expand-row" href="{crmURL p='civicrm/case/details' q="caseId=`$row.case_id`&cid=`$row.contact_id`&type=$list"}"></a>
47 </td>
48
49 <td class="crm-case-phone"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a>{if $row.phone}<br /><span class="description">{$row.phone}</span>{/if}<br /><span class="description">{ts}Case ID{/ts}: {$row.case_id}</span></td>
50 <td class="crm-case-case_subject">{$row.case_subject}</td>
51 <td class="{$row.class} crm-case-case_status">{$row.case_status}</td>
52 <td class="crm-case-case_type">{$row.case_type}</td>
53 <td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
54 <td class="crm-case-casemanager">{if $row.casemanager_id}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.casemanager_id`"}">{$row.casemanager}</a>{else}---{/if}</td>
55 {if $list eq 'upcoming'}
56 <td class="crm-case-case_scheduled_activity">
57 {if $row.case_upcoming_activity_viewable}
58 <a class="crm-popup {$row.activity_status}" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid="}{$row.contact_id}&aid={$row.case_scheduled_activity_id}" title="{ts}View activity{/ts}">{$row.case_scheduled_activity_type}</a>
59 {else}
60 {$row.case_scheduled_activity_type}
61 {/if}
62 &nbsp;&nbsp;
63 {if $row.case_upcoming_activity_editable}
64 <a class="action-item crm-hover-button" href="{crmURL p="civicrm/case/activity" q="reset=1&cid=`$row.contact_id`&caseid=`$row.case_id`&action=update&id=`$row.case_scheduled_activity_id`"}" title="{ts}Edit activity{/ts}"><i class="crm-i fa-pencil"></i></a>
65 {/if}
66 <br />
67 {$row.case_scheduled_activity_date|crmDate}
68 </td>
69
70 {elseif $list eq 'recent'}
71 <td class="crm-case-case_recent_activity">
72 {if $row.case_recent_activity_viewable}
73 <a class="action-item crm-hover-button" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid="}{$row.contact_id}&aid={$row.case_recent_activity_id}" title="{ts}View activity{/ts}">{$row.case_recent_activity_type}</a>
74 {else}
75 {$row.case_recent_activity_type}
76 {/if}
77 {if $row.case_recent_activity_editable and $row.case_recent_activity_type_name != 'Inbound Email' && $row.case_recent_activity_type_name != 'Email'}&nbsp;&nbsp;<a href="{crmURL p="civicrm/case/activity" q="reset=1&cid=`$row.contact_id`&caseid=`$row.case_id`&action=update&id=`$row.case_recent_activity_id`"}" title="{ts}Edit activity{/ts}" class="crm-hover-button crm-popup"><i class="crm-i fa-pencil"></i></a>
78 {/if}<br />
79 {$row.case_recent_activity_date|crmDate}
80 </td>
81 {/if}
82
83 <td>{$row.action}{$row.moreActions}</td>
84 </tr>
85 {/foreach}
86
87 {* Dashboard only lists 10 most recent casess. *}
88 {if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
89 <tr class="even-row">
90 <td colspan="10"><a href="{crmURL p='civicrm/case/search' q='reset=1'}">&raquo; {ts}Find more cases{/ts}... </a></td>
91 </tr>
92 {/if}
93
94 </table>
95
96 {/strip}
97
98 {crmScript file='js/crm.expandRow.js'}