2 # MantisBT - A PHP based bugtracking system
4 # MantisBT is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # MantisBT is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
18 * This include file prints out the bug history
19 * $f_bug_id must already be defined
22 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
23 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
24 * @link http://www.mantisbt.org
26 * @uses access_api.php
27 * @uses collapse_api.php
28 * @uses config_api.php
29 * @uses helper_api.php
30 * @uses history_api.php
33 * @uses string_api.php
36 require_api( 'access_api.php' );
37 require_api( 'collapse_api.php' );
38 require_api( 'config_api.php' );
39 require_api( 'helper_api.php' );
40 require_api( 'history_api.php' );
41 require_api( 'lang_api.php' );
42 require_api( 'print_api.php' );
43 require_api( 'string_api.php' );
45 $t_access_level_needed = config_get( 'view_history_threshold' );
46 if ( !access_has_bug_level( $t_access_level_needed, $f_bug_id ) ) {
51 <a name
="history" id
="history" /><br
/>
54 collapse_open( 'history' );
55 $t_history = history_get_events_array( $f_bug_id );
57 <table
class="width100" cellspacing
="0">
59 <td
class="form-title" colspan
="4">
61 collapse_icon( 'history' );
62 echo lang_get( 'bug_history' ) ?
>
65 <tr
class="row-category-history">
66 <td
class="small-caption">
67 <?php
echo lang_get( 'date_modified' ) ?
>
69 <td
class="small-caption">
70 <?php
echo lang_get( 'username' ) ?
>
72 <td
class="small-caption">
73 <?php
echo lang_get( 'field' ) ?
>
75 <td
class="small-caption">
76 <?php
echo lang_get( 'change' ) ?
>
80 foreach ( $t_history as $t_item ) {
82 <tr
<?php
echo helper_alternate_class() ?
>>
83 <td
class="small-caption">
84 <?php
echo $t_item['date'] ?
>
86 <td
class="small-caption">
87 <?php
print_user( $t_item['userid'] ) ?
>
89 <td
class="small-caption">
90 <?php
echo string_display( $t_item['note'] ) ?
>
92 <td
class="small-caption">
93 <?php
echo ( $t_item['raw'] ?
string_display_line_links( $t_item['change'] ) : $t_item['change'] ) ?
>
101 collapse_closed( 'history' );
103 <table
class="width100" cellspacing
="0">
105 <td
class="form-title" colspan
="4">
106 <?php
collapse_icon( 'history' );
107 echo lang_get( 'bug_history' ) ?
>
113 collapse_end( 'history' );