[ 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: bug_relationship_graph.php,v 1.6.2.1 2007-10-13 22:32:47 giallu Exp $ 22 # -------------------------------------------------------- 23 24 require_once ( 'core.php' ); 25 26 $t_core_path = config_get( 'core_path' ); 27 28 require_once( $t_core_path.'bug_api.php' ); 29 require_once( $t_core_path.'compress_api.php' ); 30 require_once( $t_core_path.'current_user_api.php' ); 31 require_once( $t_core_path.'relationship_graph_api.php' ); 32 33 # If relationship graphs were made disabled, we disallow any access to 34 # this script. 35 36 auth_ensure_user_authenticated(); 37 38 if ( ON != config_get( 'relationship_graph_enable' ) ) 39 access_denied(); 40 41 $f_bug_id = gpc_get_int( 'bug_id' ); 42 $f_type = gpc_get_string( 'graph', 'relation' ); 43 $f_orientation = gpc_get_string( 'orientation', config_get( 'relationship_graph_orientation' ) ); 44 45 if ( 'relation' == $f_type ) { 46 $t_graph_type = 'relation'; 47 $t_graph_relation = true; 48 } else { 49 $t_graph_type = 'dependency'; 50 $t_graph_relation = false; 51 } 52 53 if ( 'horizontal' == $f_orientation ) { 54 $t_graph_orientation = 'horizontal'; 55 $t_graph_horizontal = true; 56 } else { 57 $t_graph_orientation = 'vertical'; 58 $t_graph_horizontal = false; 59 } 60 61 access_ensure_bug_level( VIEWER, $f_bug_id ); 62 63 $t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) ); 64 65 if( $t_bug->project_id != helper_get_current_project() ) { 66 # in case the current project is not the same project of the bug we are viewing... 67 # ... override the current project. This to avoid problems with categories and handlers lists etc. 68 $g_project_override = $t_bug->project_id; 69 } 70 71 compress_enable(); 72 73 html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ); 74 html_page_top2(); 75 ?> 76 <br /> 77 78 <table class="width100" cellspacing="1"> 79 80 <tr> 81 <!-- Title --> 82 <td class="form-title"> 83 <?php 84 if ( $t_graph_relation ) 85 echo lang_get( 'viewing_bug_relationship_graph_title' ); 86 else 87 echo lang_get( 'viewing_bug_dependency_graph_title' ); 88 ?> 89 </td> 90 <!-- Links --> 91 <td class="right"> 92 <!-- View Issue --> 93 <span class="small"><?php print_bracket_link( 'view.php?id=' . $f_bug_id, lang_get( 'view_issue' ) ) ?></span> 94 95 <!-- Relation/Dependency Graph Switch --> 96 <span class="small"> 97 <?php 98 if ( $t_graph_relation ) 99 print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=dependency', lang_get( 'dependency_graph' ) ); 100 else 101 print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=relation', lang_get( 'relation_graph' ) ); 102 ?> 103 </span> 104 <?php 105 if ( !$t_graph_relation ) { 106 ?> 107 <!-- Horizontal/Vertical Switch --> 108 <span class="small"> 109 <?php 110 if ( $t_graph_horizontal ) 111 print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=dependency&orientation=vertical', lang_get( 'vertical' ) ); 112 else 113 print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=dependency&orientation=horizontal', lang_get( 'horizontal' ) ); 114 ?> 115 </span> 116 <?php 117 } 118 ?> 119 </td> 120 </tr> 121 122 <tr> 123 <!-- Graph --> 124 <td colspan="2"> 125 <?php 126 if ( $t_graph_relation ) 127 $t_graph = relgraph_generate_rel_graph( $f_bug_id, $t_bug ); 128 else 129 $t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_bug, $t_graph_horizontal ); 130 131 relgraph_output_map( $t_graph, 'relationship_graph_map' ); 132 ?> 133 <div class="center relationship-graph"> 134 <img src="bug_relationship_graph_img.php?bug_id=<?php echo $f_bug_id ?>&graph=<?php echo $t_graph_type ?>&orientation=<?php echo $t_graph_orientation ?>" 135 border="0" usemap="#relationship_graph_map" /> 136 </div> 137 </td> 138 </tr> 139 140 <tr> 141 <!-- Legend --> 142 <td colspan="2"> 143 <table class="hide"> 144 <tr> 145 <td class="center"> 146 <img alt="" src="images/rel_related.png" /> 147 <?php echo lang_get( 'related_to' ) ?> 148 </td> 149 <td class="center"> 150 <img alt="" src="images/rel_dependant.png" /> 151 <?php echo lang_get( 'blocks' ) ?> 152 </td> 153 <td class="center"> 154 <img alt="" src="images/rel_duplicate.png" /> 155 <?php echo lang_get( 'duplicate_of' ) ?> 156 </td> 157 </tr> 158 </table> 159 </td> 160 </tr> 161 162 </table> 163 164 <br /> 165 166 <?php 167 include ( 'bug_view_inc.php' ); 168 html_page_bottom1( __FILE__ ); 169 ?>
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 |
![]() |