Blame Identity/Webenv/Mantis/1.1.2-1.fc9/view_all_inc.php

ef5584
ef5584
# Mantis - a php based bugtracking system
ef5584
ef5584
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
ef5584
# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
ef5584
ef5584
# Mantis is free software: you can redistribute it and/or modify
ef5584
# it under the terms of the GNU General Public License as published by
ef5584
# the Free Software Foundation, either version 2 of the License, or
ef5584
# (at your option) any later version.
ef5584
#
ef5584
# Mantis is distributed in the hope that it will be useful,
ef5584
# but WITHOUT ANY WARRANTY; without even the implied warranty of
ef5584
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ef5584
# GNU General Public License for more details.
ef5584
#
ef5584
# You should have received a copy of the GNU General Public License
ef5584
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
ef5584
ef5584
	#------------------------------
ef5584
	#   $Revision: 2643 $
ef5584
	#     $Author: al $    
ef5584
	#       $Date: 2009-06-18 19:06:27 -0400 (Thu, 18 Jun 2009) $  
ef5584
	#------------------------------
ef5584
?>
ef5584
ef5584
	$t_core_path = config_get( 'core_path' );
ef5584
ef5584
	require_once( $t_core_path.'current_user_api.php' );
ef5584
	require_once( $t_core_path.'bug_api.php' );
ef5584
	require_once( $t_core_path.'string_api.php' );
ef5584
	require_once( $t_core_path.'date_api.php' );
ef5584
	require_once( $t_core_path.'icon_api.php' );
ef5584
	require_once( $t_core_path.'columns_api.php' );
ef5584
ef5584
	$t_filter = current_user_get_bug_filter();
ef5584
ef5584
	if( $t_filter ) {
ef5584
		list( $t_sort, ) = split( ',', $t_filter['sort'] );
ef5584
		list( $t_dir, ) = split( ',', $t_filter['dir'] );
ef5584
	}
ef5584
	
ef5584
	$t_checkboxes_exist = false;
ef5584
ef5584
	$t_icon_path = config_get( 'icon_path' );
ef5584
	$t_update_bug_threshold = config_get( 'update_bug_threshold' );
ef5584
ef5584
	$t_columns = helper_get_columns_to_view( COLUMNS_TARGET_VIEW_PAGE );
ef5584
ef5584
	$col_count = sizeof( $t_columns );
ef5584
ef5584
	$t_filter_position = config_get( 'filter_position' );
ef5584
ef5584
	# -- ====================== FILTER FORM ========================= --
ef5584
	if ( ( $t_filter_position & FILTER_POSITION_TOP ) == FILTER_POSITION_TOP ) {
ef5584
		filter_draw_selection_area( $f_page_number );
ef5584
	}
ef5584
	# -- ====================== end of FILTER FORM ================== --
ef5584
ef5584
ef5584
	# -- ====================== BUG LIST ============================ --
ef5584
ef5584
	$t_status_legend_position = config_get( 'status_legend_position' );
ef5584
ef5584
	if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
ef5584
		html_status_legend();
ef5584
	}
ef5584
ef5584
# @@@ (thraxisp) this may want a browser check  ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)
ef5584
	if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
ef5584
		?>
ef5584
		<script type="text/javascript" language="JavaScript">
ef5584
		
ef5584
			var string_loading = '';
ef5584
		// -->
ef5584
		</script>
ef5584
		<script type="text/javascript" language="JavaScript" src="javascript/xmlhttprequest.js"></script>
ef5584
		<script type="text/javascript" language="JavaScript" src="javascript/addLoadEvent.js"></script>
ef5584
		<script type="text/javascript" language="JavaScript" src="javascript/dynamic_filters.js"></script>
ef5584
		
ef5584
	}
ef5584
?>
ef5584

ef5584
<form name="bug_action" method="get" action="bug_actiongroup_page.php">
ef5584
ef5584
ef5584
	
ef5584
		
ef5584
			# -- Viewing range info --
ef5584
ef5584
			$v_start = 0;
ef5584
			$v_end   = 0;
ef5584
ef5584
			if ( sizeof( $rows ) > 0 ) {
ef5584
				if( $t_filter )
ef5584
					$v_start = $t_filter['per_page'] * (int)($f_page_number-1) +1;
ef5584
				else 
ef5584
					$v_start = 1;
ef5584
				$v_end   = $v_start + sizeof( $rows ) -1;
ef5584
			}
ef5584
ef5584
			echo lang_get( 'viewing_bugs_title' );
ef5584
			echo " ($v_start - $v_end / $t_bug_count)";
ef5584
		?>
ef5584
ef5584
		 
ef5584
				# -- Print and Export links --
ef5584
ef5584
				print_bracket_link( 'print_all_bug_page.php', lang_get( 'print_all_bug_page_link' ) );
ef5584
				echo ' ';
ef5584
				if ( ON == config_get( 'use_jpgraph' ) ) {
ef5584
				    print_bracket_link( 'bug_graph_page.php', lang_get( 'graph_bug_page_link' ) );
ef5584
				    echo ' ';
ef5584
				}
ef5584
				print_bracket_link( 'csv_export.php', lang_get( 'csv_export' ) );
ef5584
		?> 
ef5584
	
ef5584
ef5584
	
ef5584
		 
ef5584
			# -- Page number links --
ef5584
			$f_filter	= gpc_get_int( 'filter', 0);
ef5584
			print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
ef5584
		?> 
ef5584
	
ef5584
ef5584
ef5584
ef5584
ef5584
		foreach( $t_columns as $t_column ) {
ef5584
			$t_title_function = 'print_column_title';
ef5584
			helper_call_custom_function( $t_title_function, array( $t_column ) );
ef5584
		}
ef5584
?>
ef5584
ef5584
ef5584
ef5584
ef5584
	
ef5584
ef5584
ef5584
	function write_bug_rows ( $p_rows )
ef5584
	{
ef5584
		global $t_columns, $t_filter;
ef5584
ef5584
		$t_in_stickies = ( $t_filter && ( 'on' == $t_filter['sticky_issues'] ) );
ef5584
ef5584
		mark_time( 'begin loop' );
ef5584
ef5584
		# -- Loop over bug rows --
ef5584
ef5584
		$t_rows = sizeof( $p_rows ); 
ef5584
		for( $i=0; $i < $t_rows; $i++ ) {
ef5584
			$t_row = $p_rows[$i];
ef5584
ef5584
			if ( ( 0 == $t_row['sticky'] ) && ( 0 == $i ) ) {
ef5584
				$t_in_stickies = false;
ef5584
			}
ef5584
			if ( ( 0 == $t_row['sticky'] ) && $t_in_stickies ) {	# demarcate stickies, if any have been shown
ef5584
?>
ef5584
               
ef5584
                        
ef5584
               
ef5584
ef5584
				$t_in_stickies = false;
ef5584
			}
ef5584
ef5584
			# choose color based on status
ef5584
			$status_color = get_status_color( $t_row['status'] );
ef5584
ef5584
			echo '';
ef5584
ef5584
			foreach( $t_columns as $t_column ) {
ef5584
				$t_column_value_function = 'print_column_value';
ef5584
				helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row ) );
ef5584
			}
ef5584
ef5584
			echo '';
ef5584
		}
ef5584
	}
ef5584
ef5584
ef5584
	write_bug_rows($rows);
ef5584
	# -- ====================== end of BUG LIST ========================= --
ef5584
ef5584
	# -- ====================== MASS BUG MANIPULATION =================== --
ef5584
?>
ef5584
	
ef5584
		
ef5584
ef5584
		if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) {
ef5584
			echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" />" . lang_get( 'select_all' ) . '';
ef5584
		}
ef5584
ef5584
		if ( $t_checkboxes_exist ) {
ef5584
?>
ef5584
			<select name="action">
ef5584
				
ef5584
			</select>
ef5584
			<input type="submit" class="button" value="<?php echo lang_get( 'ok' ); ?>" />
ef5584
ef5584
		} else {
ef5584
			echo ' ';
ef5584
		}
ef5584
?>
ef5584
		
ef5584
		
ef5584
		
ef5584
			
ef5584
				
ef5584
					$f_filter	= gpc_get_int( 'filter', 0);
ef5584
					print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
ef5584
				?>
ef5584
			
ef5584
		
ef5584
	
ef5584
ef5584
ef5584
</form>
ef5584
ef5584
ef5584
ef5584
	mark_time( 'end loop' );
ef5584
ef5584
	if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
ef5584
		html_status_legend();
ef5584
	}
ef5584
ef5584
	# -- ====================== FILTER FORM ========================= --
ef5584
	if ( ( $t_filter_position & FILTER_POSITION_BOTTOM ) == FILTER_POSITION_BOTTOM ) {
ef5584
		filter_draw_selection_area( $f_page_number );
ef5584
	}
ef5584
	# -- ====================== end of FILTER FORM ================== --
ef5584
?>