Merge pull request #17943 from jitendrapurohit/core-1906
[civicrm-core.git] / templates / CRM / Case / Form / Selector.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 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 |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
e33d662d 10{include file="CRM/common/pager.tpl" location="top"}
6a488035 11{strip}
72c35327 12<table class="caseSelector row-highlight">
6a488035
TO
13 <tr class="columnheader">
14
15 {if ! $single and $context eq 'Search' }
16 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
17 {/if}
18
e33d662d 19 <th></th>
6a488035
TO
20
21 {foreach from=$columnHeaders item=header}
22 <th scope="col">
23 {if $header.sort}
24 {assign var='key' value=$header.sort}
25 {$sort->_response.$key.link}
26 {else}
27 {$header.name}
28 {/if}
29 </th>
30 {/foreach}
31 </tr>
32
33 {counter start=0 skip=1 print=false}
34 {foreach from=$rows item=row}
35
36 <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}">
37 {if $context eq 'Search' && !$single}
38 {assign var=cbName value=$row.checkbox}
39 <td>{$form.$cbName.html}</td>
40 {/if}
6a488035 41 <td class="crm-case-id crm-case-id_{$row.case_id}">
38502d98 42 <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>
6a488035 43 </td>
6a488035
TO
44
45 {if !$single}
aee9e297 46 <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>
6a488035
TO
47 {/if}
48
49 <td class="crm-case-subject">{$row.case_subject}</td>
50 <td class="{$row.class} crm-case-status_{$row.case_status}">{$row.case_status}</td>
51 <td class="crm-case-case_type">{$row.case_type}</td>
52 <td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
5757b086 53 <td class="crm-case-case_manager">{$row.casemanager}</td>
6a488035
TO
54 <td class="crm-case-case_recent_activity_type">{if $row.case_recent_activity_type}
55 {$row.case_recent_activity_type}<br />{$row.case_recent_activity_date|crmDate}{else}---{/if}</td>
56 <td class="crm-case-case_scheduled_activity_type">{if $row.case_scheduled_activity_type}
57 {$row.case_scheduled_activity_type}<br />{$row.case_scheduled_activity_date|crmDate}{else}---{/if}</td>
58 <td>{$row.action|replace:'xx':$row.case_id}{$row.moreActions|replace:'xx':$row.case_id}</td>
6a488035
TO
59 {/foreach}
60
61 {* Dashboard only lists 10 most recent cases. *}
62 {if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
63 <tr class="even-row">
13a3d214 64 <td colspan="10"><a href="{crmURL p='civicrm/case/search' q='reset=1'}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}Find more cases{/ts}... </a></td>
6a488035
TO
65 </tr>
66 {/if}
67
68</table>
69{/strip}
70
e33d662d 71{include file="CRM/common/pager.tpl" location="bottom"}
38502d98 72{crmScript file='js/crm.expandRow.js'}