Commit | Line | Data |
---|---|---|
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 | *} | |
880816e0 | 10 | {* View Case Activities *} |
6a488035 | 11 | <div class="crm-block crm-content-block crm-case-activity-view-block"> |
7bf3b68c | 12 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top" linkButtons=$actionLinks}</div> |
880816e0 CW |
13 | {if $revs} |
14 | {strip} | |
15 | <table class="crm-info-panel"> | |
16 | <tr class="columnheader"> | |
17 | <th>{ts}Created By{/ts}</th> | |
18 | <th>{ts}Created On{/ts}</th> | |
19 | <th> </th> | |
6a488035 | 20 | </tr> |
880816e0 CW |
21 | {foreach from=$result item=row} |
22 | <tr {if $row.id EQ $latestRevisionID}style="font-weight: bold;"{/if}> | |
23 | <td class="crm-case-activityview-form-block-name">{$row.name}</td> | |
24 | <td class="crm-case-activityview-form-block-date">{$row.date|crmDate}</td> | |
45df894c | 25 | <td class="crm-case-activityview-form-block-{$row.id}"><a class="open-inline-noreturn" 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}{ts}View{/ts}{else}{ts}View (Current Revision){/ts}{/if}</a></td> |
880816e0 CW |
26 | </tr> |
27 | {/foreach} | |
28 | </table> | |
29 | {/strip} | |
30 | {else} | |
31 | {if $report} | |
32 | <table class="crm-info-panel" id="crm-activity-view-table"> | |
33 | {foreach from=$report.fields item=row name=report} | |
34 | <tr class="crm-case-activity-view-{$row.label}"> | |
35 | <td class="label">{$row.label}</td> | |
36 | {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 *} | |
37 | <td>{$row.value}</td> | |
38 | <td style="padding-right: 50px; text-align: right; font-size: .9em;"> | |
13a3d214 AH |
39 | {if $activityID}<a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$activityID&revs=1"}"><i class="crm-i fa-history" aria-hidden="true"></i> {ts}List all revisions{/ts}</a>{if !$latestRevisionID}<br />{ts}(this is the current revision){/ts}{/if}<br />{/if} |
40 | {if $latestRevisionID}<a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$latestRevisionID"}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View current revision{/ts}</a><br /><span style="color: red;">{ts}(this is not the current revision){/ts}</span><br />{/if} | |
41 | {if $parentID}<a class="open-inline-noreturn" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid=$contactID&aid=$parentID"}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}Prompted by{/ts}</a>{/if} | |
880816e0 CW |
42 | </td> |
43 | {else} | |
504ab71e | 44 | <td colspan="2">{if $row.label eq 'Details'}{$row.value|crmStripAlternatives|nl2br|purify}{elseif $row.type eq 'Date'}{$row.value|crmDate}{else}{$row.value}{/if}</td> |
880816e0 CW |
45 | {/if} |
46 | </tr> | |
6a488035 | 47 | {/foreach} |
880816e0 CW |
48 | {* Display custom field data for the activity. *} |
49 | {if $report.customGroups} | |
50 | {foreach from=$report.customGroups item=customGroup key=groupTitle name=custom} | |
51 | <tr class="crm-case-activityview-form-block-groupTitle form-layout"> | |
52 | <td colspan="3">{$groupTitle}</td> | |
53 | </tr> | |
54 | {foreach from=$customGroup item=customField name=fields} | |
55 | <tr{if ! $smarty.foreach.fields.last} style="border-bottom: 1px solid #F6F6F6;"{/if}> | |
56 | <td class="label">{$customField.label}</td> | |
57 | <td>{$customField.value}</td> | |
58 | </tr> | |
59 | {/foreach} | |
60 | {/foreach} | |
61 | {/if} | |
62 | </table> | |
63 | {/if} | |
64 | {/if} | |
7bf3b68c | 65 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom" linkButtons=$actionLinks}</div> |
6a488035 | 66 | </div> |
7bf3b68c MWMC |
67 | |
68 | {include file="CRM/Case/Form/ActivityToCase.tpl"} |