commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / templates / CRM / Case / Form / Selector.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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">
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 <span id="{$list}{$row.case_id}_show">
59 <a href="#" onclick="cj('#caseDetails{$list}{$row.case_id}').show();
60 buildCaseDetails('{$list}{$row.case_id}','{$row.contact_id}');
61 cj('#{$list}{$row.case_id}_show').hide();
62 cj('#minus{$list}{$row.case_id}_hide').show();
63 cj('#{$list}{$row.case_id}_hide').show();
64 return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}Show recent activities{/ts}"/></a>
65 </span>
66 <span id="minus{$list}{$row.case_id}_hide">
67 <a href="#" onclick="cj('#caseDetails{$list}{$row.case_id}').hide();
68 cj('#{$list}{$row.case_id}_show').show();
69 cj('#{$list}{$row.case_id}_hide').hide();
70 cj('#minus{$list}{$row.case_id}_hide').hide();
71 return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}Hide activities{/ts}"/></a>
72 </td>
73
74 {if !$single}
75 <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>
76 {/if}
77
78 <td class="crm-case-subject">{$row.case_subject}</td>
79 <td class="{$row.class} crm-case-status_{$row.case_status}">{$row.case_status}</td>
80 <td class="crm-case-case_type">{$row.case_type}</td>
81 <td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
82 <td class="crm-case-case_manager">{if $row.casemanager_id}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.casemanager_id`"}">{$row.casemanager}</a>{else}---{/if}</td>
83 <td class="crm-case-case_recent_activity_type">{if $row.case_recent_activity_type}
84 {$row.case_recent_activity_type}<br />{$row.case_recent_activity_date|crmDate}{else}---{/if}</td>
85 <td class="crm-case-case_scheduled_activity_type">{if $row.case_scheduled_activity_type}
86 {$row.case_scheduled_activity_type}<br />{$row.case_scheduled_activity_date|crmDate}{else}---{/if}</td>
87 <td>{$row.action|replace:'xx':$row.case_id}{$row.moreActions|replace:'xx':$row.case_id}</td>
88 </tr>
89 <tr id="{$list}{$row.case_id}_hide" class='{$rowClass}'>
90 <td>
91 </td>
92 {if $context EQ 'Search'}
93 <td colspan="10" class="enclosingNested">
94 {else}
95 <td colspan="9" class="enclosingNested">
96 {/if}
97 <div id="caseDetails{$list}{$row.case_id}"></div>
98 </td>
99 </tr>
100 <script type="text/javascript">
101 cj('#{$list}{$row.case_id}_hide').hide();
102 cj('#minus{$list}{$row.case_id}_hide').hide();
103 </script>
104 {/foreach}
105
106 {* Dashboard only lists 10 most recent cases. *}
107 {if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
108 <tr class="even-row">
109 <td colspan="10"><a href="{crmURL p='civicrm/case/search' q='reset=1'}">&raquo; {ts}Find more cases{/ts}... </a></td>
110 </tr>
111 {/if}
112
113 </table>
114 {/strip}
115
116 {include file="CRM/common/pager.tpl" location="bottom"}
117
118 {* Build case details*}
119 {literal}
120 <script type="text/javascript">
121
122 function buildCaseDetails( caseId, contactId ) {
123 var dataUrl = {/literal}"{crmURL p='civicrm/case/details' h=0 q='caseId='}{literal}" + caseId +'&cid=' + contactId;
124 CRM.loadPage(dataUrl, {target: '#caseDetails' + caseId});
125 }
126 </script>
127
128 {/literal}