Merge pull request #13427 from chamilwijesooriya/issue-652
[civicrm-core.git] / templates / CRM / Case / Form / Selector.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
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 {include file="CRM/common/pager.tpl" location="top"}
27 {strip}
28 <table class="caseSelector row-highlight">
29 <tr class="columnheader">
30
31 {if ! $single and $context eq 'Search' }
32 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
33 {/if}
34
35 <th></th>
36
37 {foreach from=$columnHeaders item=header}
38 <th scope="col">
39 {if $header.sort}
40 {assign var='key' value=$header.sort}
41 {$sort->_response.$key.link}
42 {else}
43 {$header.name}
44 {/if}
45 </th>
46 {/foreach}
47 </tr>
48
49 {counter start=0 skip=1 print=false}
50 {foreach from=$rows item=row}
51
52 <tr id='rowid{$list}{$row.case_id}' class="{cycle values="odd-row,even-row"} crm-case crm-case-status_{$row.case_status_id} crm-case-type_{$row.case_type_id}">
53 {if $context eq 'Search' && !$single}
54 {assign var=cbName value=$row.checkbox}
55 <td>{$form.$cbName.html}</td>
56 {/if}
57 <td class="crm-case-id crm-case-id_{$row.case_id}">
58 <a title="{ts}Activities{/ts}" class="crm-expand-row" href="{crmURL p='civicrm/case/details' q="caseId=`$row.case_id`&cid=`$row.contact_id`"}"></a>
59 </td>
60
61 {if !$single}
62 <td class="crm-case-id crm-case-id_{$row.case_id}"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}View Contact Details{/ts}">{$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>
63 {/if}
64
65 <td class="crm-case-subject">{$row.case_subject}</td>
66 <td class="{$row.class} crm-case-status_{$row.case_status}">{$row.case_status}</td>
67 <td class="crm-case-case_type">{$row.case_type}</td>
68 <td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
69 <td class="crm-case-case_manager">{$row.casemanager}</td>
70 <td class="crm-case-case_recent_activity_type">{if $row.case_recent_activity_type}
71 {$row.case_recent_activity_type}<br />{$row.case_recent_activity_date|crmDate}{else}---{/if}</td>
72 <td class="crm-case-case_scheduled_activity_type">{if $row.case_scheduled_activity_type}
73 {$row.case_scheduled_activity_type}<br />{$row.case_scheduled_activity_date|crmDate}{else}---{/if}</td>
74 <td>{$row.action|replace:'xx':$row.case_id}{$row.moreActions|replace:'xx':$row.case_id}</td>
75 {/foreach}
76
77 {* Dashboard only lists 10 most recent cases. *}
78 {if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
79 <tr class="even-row">
80 <td colspan="10"><a href="{crmURL p='civicrm/case/search' q='reset=1'}">&raquo; {ts}Find more cases{/ts}... </a></td>
81 </tr>
82 {/if}
83
84 </table>
85 {/strip}
86
87 {include file="CRM/common/pager.tpl" location="bottom"}
88 {crmScript file='js/crm.expandRow.js'}