[ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # -------------------------------------------------------- 21 # $Id: view_all_inc.php,v 1.172.2.1 2007-10-13 22:34:48 giallu Exp $ 22 # -------------------------------------------------------- 23 ?> 24 <?php 25 $t_core_path = config_get( 'core_path' ); 26 27 require_once( $t_core_path.'current_user_api.php' ); 28 require_once( $t_core_path.'bug_api.php' ); 29 require_once( $t_core_path.'string_api.php' ); 30 require_once( $t_core_path.'date_api.php' ); 31 require_once( $t_core_path.'icon_api.php' ); 32 require_once( $t_core_path.'columns_api.php' ); 33 34 $t_filter = current_user_get_bug_filter(); 35 36 if( $t_filter ) { 37 list( $t_sort, ) = split( ',', $t_filter['sort'] ); 38 list( $t_dir, ) = split( ',', $t_filter['dir'] ); 39 } 40 41 $t_checkboxes_exist = false; 42 43 $t_icon_path = config_get( 'icon_path' ); 44 $t_update_bug_threshold = config_get( 'update_bug_threshold' ); 45 46 $t_columns = helper_get_columns_to_view( COLUMNS_TARGET_VIEW_PAGE ); 47 48 $col_count = sizeof( $t_columns ); 49 50 $t_filter_position = config_get( 'filter_position' ); 51 52 # -- ====================== FILTER FORM ========================= -- 53 if ( ( $t_filter_position & FILTER_POSITION_TOP ) == FILTER_POSITION_TOP ) { 54 filter_draw_selection_area( $f_page_number ); 55 } 56 # -- ====================== end of FILTER FORM ================== -- 57 58 59 # -- ====================== BUG LIST ============================ -- 60 61 $t_status_legend_position = config_get( 'status_legend_position' ); 62 63 if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) { 64 html_status_legend(); 65 } 66 67 # @@@ (thraxisp) this may want a browser check ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...) 68 if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){ 69 ?> 70 <script type="text/javascript" language="JavaScript"> 71 <!-- 72 var string_loading = '<?php echo lang_get( 'loading' );?>'; 73 // --> 74 </script> 75 <script type="text/javascript" language="JavaScript" src="javascript/xmlhttprequest.js"></script> 76 <script type="text/javascript" language="JavaScript" src="javascript/addLoadEvent.js"></script> 77 <script type="text/javascript" language="JavaScript" src="javascript/dynamic_filters.js"></script> 78 <?php 79 } 80 ?> 81 <br /> 82 <form name="bug_action" method="get" action="bug_actiongroup_page.php"> 83 <table id="buglist" class="width100" cellspacing="1"> 84 <tr> 85 <td class="form-title" colspan="<?php echo $col_count - 2; ?>"> 86 <?php 87 # -- Viewing range info -- 88 89 $v_start = 0; 90 $v_end = 0; 91 92 if ( sizeof( $rows ) > 0 ) { 93 if( $t_filter ) 94 $v_start = $t_filter['per_page'] * (int)($f_page_number-1) +1; 95 else 96 $v_start = 1; 97 $v_end = $v_start + sizeof( $rows ) -1; 98 } 99 100 echo lang_get( 'viewing_bugs_title' ); 101 echo " ($v_start - $v_end / $t_bug_count)"; 102 ?> 103 104 <span class="small"> <?php 105 # -- Print and Export links -- 106 107 print_bracket_link( 'print_all_bug_page.php', lang_get( 'print_all_bug_page_link' ) ); 108 echo ' '; 109 if ( ON == config_get( 'use_jpgraph' ) ) { 110 print_bracket_link( 'bug_graph_page.php', lang_get( 'graph_bug_page_link' ) ); 111 echo ' '; 112 } 113 print_bracket_link( 'csv_export.php', lang_get( 'csv_export' ) ); 114 ?> </span> 115 </td> 116 117 <td class="right" colspan="2"> 118 <span class="small"> <?php 119 # -- Page number links -- 120 $f_filter = gpc_get_int( 'filter', 0); 121 print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter ); 122 ?> </span> 123 </td> 124 </tr> 125 <?php # -- Bug list column header row -- ?> 126 <tr class="row-category"> 127 <?php 128 foreach( $t_columns as $t_column ) { 129 $t_title_function = 'print_column_title'; 130 helper_call_custom_function( $t_title_function, array( $t_column ) ); 131 } 132 ?> 133 </tr> 134 135 <?php # -- Spacer row -- ?> 136 <tr class="spacer"> 137 <td colspan="<?php echo $col_count; ?>"></td> 138 </tr> 139 <?php 140 function write_bug_rows ( $p_rows ) 141 { 142 global $t_columns, $t_filter; 143 144 $t_in_stickies = ( $t_filter && ( 'on' == $t_filter['sticky_issues'] ) ); 145 146 mark_time( 'begin loop' ); 147 148 # -- Loop over bug rows -- 149 150 $t_rows = sizeof( $p_rows ); 151 for( $i=0; $i < $t_rows; $i++ ) { 152 $t_row = $p_rows[$i]; 153 154 if ( ( 0 == $t_row['sticky'] ) && ( 0 == $i ) ) { 155 $t_in_stickies = false; 156 } 157 if ( ( 0 == $t_row['sticky'] ) && $t_in_stickies ) { # demarcate stickies, if any have been shown 158 ?> 159 <tr> 160 <td class="left" colspan="<?php echo sizeof( $t_columns ); ?>" bgcolor="#999999"> </td> 161 </tr> 162 <?php 163 $t_in_stickies = false; 164 } 165 166 # choose color based on status 167 $status_color = get_status_color( $t_row['status'] ); 168 169 echo '<tr bgcolor="', $status_color, '" border="1">'; 170 171 foreach( $t_columns as $t_column ) { 172 $t_column_value_function = 'print_column_value'; 173 helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row ) ); 174 } 175 176 echo '</tr>'; 177 } 178 } 179 180 181 write_bug_rows($rows); 182 # -- ====================== end of BUG LIST ========================= -- 183 184 # -- ====================== MASS BUG MANIPULATION =================== -- 185 ?> 186 <tr> 187 <td class="left" colspan="<?php echo $col_count-2; ?>"> 188 <?php 189 if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) { 190 echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" /><span class=\"small\">" . lang_get( 'select_all' ) . '</span>'; 191 } 192 193 if ( $t_checkboxes_exist ) { 194 ?> 195 <select name="action"> 196 <?php print_all_bug_action_option_list() ?> 197 </select> 198 <input type="submit" class="button" value="<?php echo lang_get( 'ok' ); ?>" /> 199 <?php 200 } else { 201 echo ' '; 202 } 203 ?> 204 </td> 205 <?php # -- Page number links -- ?> 206 <td class="right" colspan="2"> 207 <span class="small"> 208 <?php 209 $f_filter = gpc_get_int( 'filter', 0); 210 print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter ); 211 ?> 212 </span> 213 </td> 214 </tr> 215 <?php # -- ====================== end of MASS BUG MANIPULATION ========================= -- ?> 216 </table> 217 </form> 218 219 <?php 220 221 mark_time( 'end loop' ); 222 223 if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) { 224 html_status_legend(); 225 } 226 227 # -- ====================== FILTER FORM ========================= -- 228 if ( ( $t_filter_position & FILTER_POSITION_BOTTOM ) == FILTER_POSITION_BOTTOM ) { 229 filter_draw_selection_area( $f_page_number ); 230 } 231 # -- ====================== end of FILTER FORM ================== -- 232 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |