|
|
f2e824 |
|
|
|
f2e824 |
# Mantis - a php based bugtracking system
|
|
|
f2e824 |
|
|
|
f2e824 |
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
|
|
|
f2e824 |
# Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net
|
|
|
f2e824 |
|
|
|
f2e824 |
# Mantis is free software: you can redistribute it and/or modify
|
|
|
f2e824 |
# it under the terms of the GNU General Public License as published by
|
|
|
f2e824 |
# the Free Software Foundation, either version 2 of the License, or
|
|
|
f2e824 |
# (at your option) any later version.
|
|
|
f2e824 |
#
|
|
|
f2e824 |
# Mantis is distributed in the hope that it will be useful,
|
|
|
f2e824 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
f2e824 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
f2e824 |
# GNU General Public License for more details.
|
|
|
f2e824 |
#
|
|
|
f2e824 |
# You should have received a copy of the GNU General Public License
|
|
|
f2e824 |
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.
|
|
|
f2e824 |
|
|
|
f2e824 |
#------------------------------
|
|
|
f2e824 |
# $Revision: 2643 $
|
|
|
f2e824 |
# $Author: al $
|
|
|
f2e824 |
# $Date: 2009-06-18 19:06:27 -0400 (Thu, 18 Jun 2009) $
|
|
|
f2e824 |
#------------------------------
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_core_path = config_get( 'core_path' );
|
|
|
f2e824 |
|
|
|
f2e824 |
require_once( $t_core_path.'current_user_api.php' );
|
|
|
f2e824 |
require_once( $t_core_path.'bug_api.php' );
|
|
|
f2e824 |
require_once( $t_core_path.'string_api.php' );
|
|
|
f2e824 |
require_once( $t_core_path.'date_api.php' );
|
|
|
f2e824 |
require_once( $t_core_path.'icon_api.php' );
|
|
|
f2e824 |
require_once( $t_core_path.'columns_api.php' );
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_filter = current_user_get_bug_filter();
|
|
|
f2e824 |
|
|
|
f2e824 |
if( $t_filter ) {
|
|
|
f2e824 |
list( $t_sort, ) = split( ',', $t_filter['sort'] );
|
|
|
f2e824 |
list( $t_dir, ) = split( ',', $t_filter['dir'] );
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_checkboxes_exist = false;
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_icon_path = config_get( 'icon_path' );
|
|
|
f2e824 |
$t_update_bug_threshold = config_get( 'update_bug_threshold' );
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_columns = helper_get_columns_to_view( COLUMNS_TARGET_VIEW_PAGE );
|
|
|
f2e824 |
|
|
|
f2e824 |
$col_count = sizeof( $t_columns );
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_filter_position = config_get( 'filter_position' );
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- ====================== FILTER FORM ========================= --
|
|
|
f2e824 |
if ( ( $t_filter_position & FILTER_POSITION_TOP ) == FILTER_POSITION_TOP ) {
|
|
|
f2e824 |
filter_draw_selection_area( $f_page_number );
|
|
|
f2e824 |
}
|
|
|
f2e824 |
# -- ====================== end of FILTER FORM ================== --
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- ====================== BUG LIST ============================ --
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_status_legend_position = config_get( 'status_legend_position' );
|
|
|
f2e824 |
|
|
|
f2e824 |
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
|
|
|
f2e824 |
html_status_legend();
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
# @@@ (thraxisp) this may want a browser check ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)
|
|
|
f2e824 |
if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
<script type="text/javascript" language="JavaScript">
|
|
|
f2e824 |
|
|
|
f2e824 |
var string_loading = '';
|
|
|
f2e824 |
// -->
|
|
|
f2e824 |
</script>
|
|
|
f2e824 |
<script type="text/javascript" language="JavaScript" src="javascript/xmlhttprequest.js"></script>
|
|
|
f2e824 |
<script type="text/javascript" language="JavaScript" src="javascript/addLoadEvent.js"></script>
|
|
|
f2e824 |
<script type="text/javascript" language="JavaScript" src="javascript/dynamic_filters.js"></script>
|
|
|
f2e824 |
|
|
|
f2e824 |
}
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
<form name="bug_action" method="get" action="bug_actiongroup_page.php">
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- Viewing range info --
|
|
|
f2e824 |
|
|
|
f2e824 |
$v_start = 0;
|
|
|
f2e824 |
$v_end = 0;
|
|
|
f2e824 |
|
|
|
f2e824 |
if ( sizeof( $rows ) > 0 ) {
|
|
|
f2e824 |
if( $t_filter )
|
|
|
f2e824 |
$v_start = $t_filter['per_page'] * (int)($f_page_number-1) +1;
|
|
|
f2e824 |
else
|
|
|
f2e824 |
$v_start = 1;
|
|
|
f2e824 |
$v_end = $v_start + sizeof( $rows ) -1;
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
echo lang_get( 'viewing_bugs_title' );
|
|
|
f2e824 |
echo " ($v_start - $v_end / $t_bug_count)";
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- Print and Export links --
|
|
|
f2e824 |
|
|
|
f2e824 |
print_bracket_link( 'print_all_bug_page.php', lang_get( 'print_all_bug_page_link' ) );
|
|
|
f2e824 |
echo ' ';
|
|
|
f2e824 |
if ( ON == config_get( 'use_jpgraph' ) ) {
|
|
|
f2e824 |
print_bracket_link( 'bug_graph_page.php', lang_get( 'graph_bug_page_link' ) );
|
|
|
f2e824 |
echo ' ';
|
|
|
f2e824 |
}
|
|
|
f2e824 |
print_bracket_link( 'csv_export.php', lang_get( 'csv_export' ) );
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- Page number links --
|
|
|
f2e824 |
$f_filter = gpc_get_int( 'filter', 0);
|
|
|
f2e824 |
print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
foreach( $t_columns as $t_column ) {
|
|
|
f2e824 |
$t_title_function = 'print_column_title';
|
|
|
f2e824 |
helper_call_custom_function( $t_title_function, array( $t_column ) );
|
|
|
f2e824 |
}
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
function write_bug_rows ( $p_rows )
|
|
|
f2e824 |
{
|
|
|
f2e824 |
global $t_columns, $t_filter;
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_in_stickies = ( $t_filter && ( 'on' == $t_filter['sticky_issues'] ) );
|
|
|
f2e824 |
|
|
|
f2e824 |
mark_time( 'begin loop' );
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- Loop over bug rows --
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_rows = sizeof( $p_rows );
|
|
|
f2e824 |
for( $i=0; $i < $t_rows; $i++ ) {
|
|
|
f2e824 |
$t_row = $p_rows[$i];
|
|
|
f2e824 |
|
|
|
f2e824 |
if ( ( 0 == $t_row['sticky'] ) && ( 0 == $i ) ) {
|
|
|
f2e824 |
$t_in_stickies = false;
|
|
|
f2e824 |
}
|
|
|
f2e824 |
if ( ( 0 == $t_row['sticky'] ) && $t_in_stickies ) { # demarcate stickies, if any have been shown
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
$t_in_stickies = false;
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
# choose color based on status
|
|
|
f2e824 |
$status_color = get_status_color( $t_row['status'] );
|
|
|
f2e824 |
|
|
|
f2e824 |
echo '';
|
|
|
f2e824 |
|
|
|
f2e824 |
foreach( $t_columns as $t_column ) {
|
|
|
f2e824 |
$t_column_value_function = 'print_column_value';
|
|
|
f2e824 |
helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row ) );
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
echo '';
|
|
|
f2e824 |
}
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
write_bug_rows($rows);
|
|
|
f2e824 |
# -- ====================== end of BUG LIST ========================= --
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- ====================== MASS BUG MANIPULATION =================== --
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) {
|
|
|
f2e824 |
echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" />" . lang_get( 'select_all' ) . '';
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
if ( $t_checkboxes_exist ) {
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
<select name="action">
|
|
|
f2e824 |
|
|
|
f2e824 |
</select>
|
|
|
f2e824 |
<input type="submit" class="button" value="<?php echo lang_get( 'ok' ); ?>" />
|
|
|
f2e824 |
|
|
|
f2e824 |
} else {
|
|
|
f2e824 |
echo ' ';
|
|
|
f2e824 |
}
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
$f_filter = gpc_get_int( 'filter', 0);
|
|
|
f2e824 |
print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
|
|
|
f2e824 |
?>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
</form>
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
|
|
|
f2e824 |
mark_time( 'end loop' );
|
|
|
f2e824 |
|
|
|
f2e824 |
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
|
|
|
f2e824 |
html_status_legend();
|
|
|
f2e824 |
}
|
|
|
f2e824 |
|
|
|
f2e824 |
# -- ====================== FILTER FORM ========================= --
|
|
|
f2e824 |
if ( ( $t_filter_position & FILTER_POSITION_BOTTOM ) == FILTER_POSITION_BOTTOM ) {
|
|
|
f2e824 |
filter_draw_selection_area( $f_page_number );
|
|
|
f2e824 |
}
|
|
|
f2e824 |
# -- ====================== end of FILTER FORM ================== --
|
|
|
f2e824 |
?>
|