View Issue Details

IDProjectCategoryView StatusLast Update
0009920mantisbtfeaturepublic2009-01-15 11:26
Reportermthibeault Assigned Tograngeway  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0a2 
Fixed in Version1.2.0a3 
Summary0009920: The 'Select Profile' and profile-related information is taking a lot of space when unused on bug report advanced page.
Description

In a lot of project that uses Mantis for bug tracking where I work, only one or two uses profile and OS information. So I had to "remove" the profile information. In the end, I just make the profile information able to be collapsed which really helped getting some space on screen back for more useful (in our case) information.

Additional Information

Patch Added. By default the 'Select Profile' section is collapsed leaving the combo box (if the user has profiles set). Other than collapsing, the profile section should behave like it was before. This patch only apply to bug_report_advanced.php as it was the only page that was really a problem. It was made against the latest GIT commit (a09b9e7c3b9c0cce7ade7c6dba57c8a0d84af669).

TagsNo tags attached.
Attached Files
profile_collapsed.diff (1,758 bytes)   
diff -N -a --unified -r mantisbt/bug_report_advanced_page.php mantisbt-profile_collapsed/bug_report_advanced_page.php
--- mantisbt/bug_report_advanced_page.php	2008-11-30 14:16:41.000000000 -0500
+++ mantisbt-profile_collapsed/bug_report_advanced_page.php	2008-12-01 12:38:51.480601800 -0500
@@ -36,6 +36,7 @@
 	require_once( $t_core_path.'custom_field_api.php' );
 	require_once( $t_core_path.'last_visited_api.php' );
 	require_once( $t_core_path.'projax_api.php' );
+	require_once( $t_core_path.'collapse_api.php' );
 
 	$f_master_bug_id = gpc_get_int( 'm_id', 0 );
 
@@ -255,21 +256,19 @@
 		<?php echo lang_get( 'select_profile' ) ?>
 	</td>
 	<td>
-		<select <?php echo helper_get_tab_index() ?> name="profile_id">
-			<?php print_profile_option_list( auth_get_current_user_id(), $f_profile_id ) ?>
-		</select>
-	</td>
-</tr>
-
-
-<!-- instructions -->
-<tr>
-	<td colspan="2">
-		<?php echo lang_get( 'or_fill_in' ) ?>
+		<?php if (count(profile_get_all_for_user( auth_get_current_user_id() )) > 0) { ?>
+			<select <?php echo helper_get_tab_index() ?> name="profile_id">
+				<?php print_profile_option_list( auth_get_current_user_id(), $f_profile_id ) ?>
+			</select>
+		<?php } ?>
 	</td>
 </tr>
 
-
+<tr class="none" cellspacing="0">
+	<td colspan="2" class="none">
+		<?php collapse_open( 'profile' ); collapse_icon('profile'); ?>
+		<?php echo lang_get( 'or_fill_in' ); ?>
+		<table class="none">
 <!-- Platform -->
 <tr <?php echo helper_alternate_class() ?>>
 	<td class="category">
@@ -340,7 +339,12 @@
 		?>
 	</td>
 </tr>
-
+		</table>
+		<?php collapse_closed( 'profile' ); collapse_icon('profile'); echo lang_get( 'or_fill_in' );?>
+		<?php collapse_end( 'profile' ); ?>
+		</div>
+	</td>
+</tr>
 
 <!-- spacer -->
 <tr class="spacer">
profile_collapsed.diff (1,758 bytes)   

Activities

grangeway

grangeway

2008-12-06 17:50

reporter   ~0020273

commited a version of this to GIT trunk