Merge pull request #16546 from eileenmcnaughton/part_end2
[civicrm-core.git] / templates / CRM / common / logButton.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
11 {*
12 Usage: CRM_Core_Region::instance('...')->add(array(
13 'template' => 'CRM/common/LogButton.tpl',
14 'instance_id' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'),
15 'css_class' => 'hrqual-revision-link',
16 'table_name' => 'my_table',
17 'contact_id' => 123,
18 ));
19
20 Note: This file is used by CivHR
21 *}
22
23 <a class="css_right {$snippet.css_class}" href="#" title="{ts}View Revisions{/ts}">View Revisions</a>
24
25 {literal}
26 <script type="text/javascript">
27 (function($, CRM) {
28 if ($(".{/literal}{$snippet.css_class}{literal}").length) {
29 $(".{/literal}{$snippet.css_class}{literal}").crmRevisionLink({
30 contactId: {/literal}{$snippet.contact_id}{literal},
31 tableName: "{/literal}{$snippet.table_name}{literal}",
32 reportId: {/literal}{$snippet.instance_id}{literal}
33 });
34 }
35 })(cj, CRM);
36 </script>
37 {/literal}