CRM-11610 - Add row-highlight class to search tables
[civicrm-core.git] / templates / CRM / Activity / Selector / Activity.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
232624b1 3 | CiviCRM version 4.4 |
6a488035
TO
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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{* Displays Activities. *}
27
28<div>
29 {if empty($noFieldSet)}
30 <h3 class="crm-table-title">{ts}Activities{/ts}</h3>
31 {/if}
32{if $rows}
33 <form title="activity_pager" action="{crmURL}" method="post">
34 {include file="CRM/common/pager.tpl" location="top"}
35
36 {strip}
16850d34 37 <table class="selector row-highlight">
6a488035
TO
38 <tr class="columnheader">
39 {foreach from=$columnHeaders item=header}
40 <th scope="col">
41 {if $header.sort}
42 {assign var='key' value=$header.sort}
43 {$sort->_response.$key.link}
44 {else}
45 {$header.name}
46 {/if}
47 </th>
48 {/foreach}
49 </tr>
50
51 {counter start=0 skip=1 print=false}
52 {foreach from=$rows item=row}
53 <tr class="{cycle values="odd-row,even-row"} {$row.class} crm-activity crm-activity_status-{$row.activity_status_id} crm-activity-type_{$row.activity_type_id}" id="crm-activity_{$row.activity_id}">
54 <td class="crm-activity-type crm-activity-type_{$row.activity_type_id}">{$row.activity_type}</td>
55 <td class="crm-activity-subject">{$row.subject}</td>
56 <td class="crm-activity-source_contact_name">
57 {if $contactId == $row.source_contact_id}
58 {$row.source_contact_name}
59 {elseif $row.source_contact_id}
60 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.source_contact_id`"}" title="{ts}View contact{/ts}">{$row.source_contact_name}</a>
61 {else}
62 <em>n/a</em>
63 {/if}
64 </td>
65
66 <td class="crm-activity-target_contact_name">
67 {if $row.mailingId}
68 <a href="{$row.mailingId}" title="{ts}View Mailing Report{/ts}">{$row.recipients}</a>
69 {elseif $row.recipients}
70 {$row.recipients}
71 {elseif !$row.target_contact_name}
72 <em>n/a</em>
73 {elseif $row.target_contact_name}
74 {assign var="showTarget" value=0}
75 {foreach from=$row.target_contact_name item=targetName key=targetID}
76 {if $showTarget < 5}
77 {if $showTarget};&nbsp;{/if}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$targetID`"}" title="{ts}View contact{/ts}">{$targetName}</a>
78 {assign var="showTarget" value=$showTarget+1}
79 {/if}
80 {/foreach}
81 {if count($row.target_contact_name) > 5} ({ts}more{/ts}){/if}
82 {/if}
83 </td>
84
85 <td class="crm-activity-assignee_contact_name">
86 {if !$row.assignee_contact_name}
87 <em>n/a</em>
88 {elseif $row.assignee_contact_name}
89 {assign var="showAssignee" value=0}
90 {foreach from=$row.assignee_contact_name item=assigneeName key=assigneeID}
91 {if $showAssignee < 5}
92 {if $showAssignee};&nbsp;{/if}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$assigneeID`"}" title="{ts}View contact{/ts}">{$assigneeName}</a>
93 {assign var="showAssignee" value=$showAssignee+1}
94 {/if}
95 {/foreach}
96 {if count($row.assignee_contact_name) > 5}({ts}more{/ts}){/if}
97 {/if}
98 </td>
99
100 <td class="crm-activity-date_time">{$row.activity_date_time|crmDate}</td>
101 <td class="crm-activity-status crm-activity-status_{$row.status_id}">{$row.status}</td>
102 <td>{$row.action|replace:'xx':$row.id}</td>
103 </tr>
104 {/foreach}
105
106 </table>
107 {/strip}
108
109 {include file="CRM/common/pager.tpl" location="bottom"}
110
111 {include file="CRM/Case/Form/ActivityToCase.tpl" contactID=$contactId}
112 </form>
113{else}
114
115 <div class="messages status no-popup">
116 {if isset($caseview) and $caseview}
117 {ts}There are no Activities attached to this case record.{/ts}{if $permission EQ 'edit'} {ts}You can go to the Activities tab to create or attach activity records.{/ts}{/if}
118 {elseif $context eq 'home'}
119 {ts}There are no Activities to display.{/ts}
120 {else}
121 {ts}There are no Activites to display.{/ts}{if $permission EQ 'edit'} {ts}You can use the links above to schedule or record an activity.{/ts}{/if}
122 {/if}
123 </div>
124
125{/if}
126{if !$noFieldSet}
127{/if}
128</div>
129