Commit | Line | Data |
---|---|---|
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 | <div id="changeLog" class="view-content"> | |
27 | <p></p> | |
28 | <div class="bold">{ts}Change Log:{/ts} {$displayName}</div> | |
29 | {if $useLogging} | |
30 | <br /> | |
31 | <div class='hiddenElement' id='instance_data'> </div> | |
32 | {else} | |
33 | <div class="form-item"> | |
34 | {if $logCount > 0 } | |
35 | <table> | |
36 | <tr class="columnheader"><th>{ts}Changed By{/ts}</th><th>{ts}Change Date{/ts}</th></tr> | |
37 | {foreach from=$log item=row} | |
38 | <tr class="{cycle values="odd-row,even-row"}"> | |
39 | <td> {$row.image} <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$row.id`"}">{$row.name}</a></td> | |
40 | <td>{$row.date|crmDate}</td> | |
41 | </tr> | |
42 | {/foreach} | |
43 | </table> | |
44 | {else} | |
45 | <div class="messages status no-popup"> | |
46 | <div class="icon inform-icon"></div> | |
47 | {ts}No modifications have been logged for this contact.{/ts} | |
48 | </div> | |
49 | {/if} | |
50 | </div> | |
51 | {/if} | |
52 | </p> | |
53 | </div> | |
54 | ||
55 | {if $useLogging} | |
56 | {literal} | |
57 | <script type="text/javascript"> | |
58 | cj( document ).ready( function ( ) { | |
59 | var dataURL = {/literal}"{$instanceUrl}"{literal}; | |
60 | cj.ajax({ | |
61 | url: dataURL, | |
62 | success: function( content ) { | |
63 | cj('#instance_data').show( ).html( content ); | |
64 | } | |
65 | }); | |
66 | }); | |
67 | ||
68 | cj('div#changeLog div#instance_data .report-pager .crm-pager-nav a').live("click", function(e) { | |
69 | cj.ajax({ | |
70 | url: this.href + '&snippet=4§ion=2', | |
71 | success: function( content ) { | |
72 | cj('div#changeLog div#instance_data').html(content); | |
73 | } | |
74 | }); | |
75 | return false; | |
76 | }); | |
77 | ||
78 | cj('input[name="PagerBottomButton"], input[name="PagerTopButton"]').live("click", function(e) { | |
79 | var crmpid = (this.name == 'PagerBottomButton') ? cj('input[name="crmPID_B"]').val() : cj('input[name="crmPID"]').val(); | |
80 | cj.ajax({ | |
81 | url: cj('div#changeLog div#instance_data .report-pager .crm-pager-nav a:first').attr('href') + '&snippet=4§ion=2&crmPID=' + crmpid, | |
82 | success: function( content ) { | |
83 | cj('div#changeLog div#instance_data').html(content); | |
84 | } | |
85 | }); | |
86 | return false; | |
87 | }); | |
88 | ||
89 | </script> | |
90 | {/literal} | |
91 | {/if} |