Merge pull request #17912 from eileenmcnaughton/flex2
[civicrm-core.git] / templates / CRM / Contact / Page / View / Log.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
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 |
8 +--------------------------------------------------------------------+
9 *}
10 <div id="changeLog" class="view-content">
11 <p></p>
12 <div class="bold">{ts}Change Log:{/ts} {$displayName}</div>
13 {if $useLogging}
14 <br />
15 <div class='instance_data'><div class="crm-loading-element"></div></div>
16 {else}
17 <div class="form-item">
18 {if $logCount > 0 }
19 <table>
20 <tr class="columnheader"><th>{ts}Changed By{/ts}</th><th>{ts}Change Date{/ts}</th></tr>
21 {foreach from=$log item=row}
22 <tr class="{cycle values="odd-row,even-row"}">
23 <td> {$row.image}&nbsp;<a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$row.id`"}">{$row.name}</a></td>
24 <td>{$row.date|crmDate}</td>
25 </tr>
26 {/foreach}
27 </table>
28 {else}
29 <div class="messages status no-popup">
30 {icon icon="fa-info-circle"}{/icon}
31 {ts}None found.{/ts}
32 </div>
33 {/if}
34 </div>
35 {/if}
36 </p>
37 </div>
38
39 {if $useLogging}
40 {literal}
41 <script type="text/javascript">
42 CRM.$(function($) {
43 $('#changeLog .instance_data').on('crmLoad', function(e, data) {
44 CRM.tabHeader.updateCount('#tab_log', data.totalRows);
45 });
46 CRM.reloadChangeLogTab = function(url) {
47 if (url) {
48 $('#changeLog .instance_data').crmSnippet({url: url});
49 }
50 $('#changeLog .instance_data').crmSnippet('refresh');
51 };
52 CRM.incrementChangeLogTab = function() {
53 CRM.tabHeader.updateCount('#tab_log', 1 + CRM.tabHeader.getCount('#tab_log'));
54 };
55 CRM.reloadChangeLogTab({/literal}"{$instanceUrl}"{literal});
56 });
57
58 </script>
59 {/literal}
60 {/if}