Blame Identity/Models/Html/Mantis/1.1.2-1.fc9/view_all_inc.php

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

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