Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
6a488035 TO |
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 | {* View Case Activities *} {* Uses inline styles since we have not figured out yet how to include our normal .css files. *} | |
27 | <div class="crm-block crm-content-block crm-case-activity-view-block"> | |
28 | {if $revs} | |
6a488035 TO |
29 | {strip} |
30 | <table style="width: 95%; border: 1px solid #CCCCCC;"> | |
31 | <tr style="background-color: #F6F6F6; color: #000000; border: 1px solid #CCCCCC;"> | |
32 | <th>{ts}Created By{/ts}</th> | |
33 | <th>{ts}Created On{/ts}</th> | |
34 | <th> </th> | |
35 | </tr> | |
36 | {foreach from=$result item=row} | |
37 | <tr {if $row.id EQ $latestRevisionID}style="font-weight: bold;"{/if}> | |
38 | <td class="crm-case-activityview-form-block-name">{$row.name}</td> | |
39 | <td class="crm-case-activityview-form-block-date">{$row.date|crmDate}</td> | |
56cbe6ae | 40 | <td class="crm-case-activityview-form-block-{$row.id}"><a class="open-inline" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid="}{$row.id}" title="{ts}View this revision of the activity record.{/ts}">{if $row.id != $latestRevisionID}View Prior Revision{else}View Current Revision{/if}</a></td> |
6a488035 TO |
41 | </tr> |
42 | {/foreach} | |
43 | </table> | |
44 | {/strip} | |
45 | {else} | |
46 | {if $report} | |
47 | {if $caseID} | |
56cbe6ae | 48 | <div class="activity-content"> |
6a488035 TO |
49 | {/if} |
50 | <table class="crm-info-panel" id="crm-activity-view-table"> | |
51 | {foreach from=$report.fields item=row name=report} | |
52 | <tr class="crm-case-activity-view-{$row.label}"> | |
53 | <td class="label">{$row.label}</td> | |
54 | {if $smarty.foreach.report.first AND ( $activityID OR $parentID OR $latestRevisionID )} {* Add a cell to first row with links to prior revision listing and Prompted by (parent) as appropriate *} | |
55 | <td>{$row.value}</td> | |
56 | <td style="padding-right: 50px; text-align: right; font-size: .9em;"> | |
56cbe6ae CW |
57 | {if $activityID}<a class="open-inline" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$activityID&revs=1"}">» {ts}List all revisions{/ts}</a>{if !$latestRevisionID}<br />{ts}(this is the current revision){/ts}{/if}<br />{/if} |
58 | {if $latestRevisionID}<a class="open-inline" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$latestRevisionID"}">» {ts}View current revision{/ts}</a><br /><span style="color: red;">{ts}(this is not the current revision){/ts}</span><br />{/if} | |
59 | {if $parentID}<a class="open-inline" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$parentID"}">» {ts}Prompted by{/ts}</a>{/if} | |
6a488035 TO |
60 | </td> |
61 | {else} | |
62 | <td colspan="2">{if $row.label eq 'Details'}{$row.value|crmStripAlternatives|nl2br}{elseif $row.type eq 'Date'}{$row.value|crmDate}{else}{$row.value}{/if}</td> | |
63 | {/if} | |
64 | </tr> | |
65 | {/foreach} | |
66 | {* Display custom field data for the activity. *} | |
67 | {if $report.customGroups} | |
68 | {foreach from=$report.customGroups item=customGroup key=groupTitle name=custom} | |
69 | <tr style="background-color: #F6F6F6; color: #000000; border: 1px solid #CCCCCC; font-weight: bold" class="crm-case-activityview-form-block-groupTitle"> | |
70 | <td colspan="3">{$groupTitle}</td> | |
71 | </tr> | |
72 | {foreach from=$customGroup item=customField name=fields} | |
73 | <tr{if ! $smarty.foreach.fields.last} style="border-bottom: 1px solid #F6F6F6;"{/if}> | |
74 | <td class="label">{$customField.label}</td> | |
75 | <td>{$customField.value}</td> | |
76 | </tr> | |
77 | {/foreach} | |
78 | {/foreach} | |
79 | {/if} | |
80 | </table> | |
81 | {if $caseID} | |
82 | <div class="crm-submit-buttons"> | |
83 | <a class="button" href="{crmURL p='civicrm/contact/view/case' q="reset=1&id=`$caseID`&cid=`$contactID`&action=view"}"><span>{ts}Manage Case{/ts}</span></a> | |
84 | </div> | |
85 | {/if} | |
86 | {else} | |
87 | <div class="messages status no-popup">{ts}This activity might not be attached to any case. Please investigate.{/ts}</div> | |
88 | {/if} | |
89 | {/if} | |
6a488035 | 90 | </div> |