View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007917 | mantisbt | administration | public | 2007-04-24 10:18 | 2010-02-22 14:34 |
Reporter | stappel | Assigned To | dhx | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.0a2 | ||||
Target Version | 1.2.0 | Fixed in Version | 1.2.0 | ||
Summary | 0007917: Extra update/submit buttons on bug pages. | ||||
Description | When updating a bug it is always recuired to scoll down to the very buttom to press the update information button. Also when only one field in the top (like status) has to be changed. This is very annoying. A second button is very usefull so scrolling is no longer needed. | ||||
Additional Information | added diff file for bug update page against current HEAD as example. | ||||
Tags | patch | ||||
Attached Files | bug_update_advanced_page.diff (556 bytes)
--- bug_update_advanced_page.php 2007-04-24 17:09:39.000000000 +0200 +++ bug_update_advanced_page.php 2007-04-24 17:09:58.000000000 +0200 @@ -419,6 +419,12 @@ <td class="spacer" colspan="6"> </td> </tr> +<!-- Submit Button --> +<tr> + <td class="center" colspan="6"> + <input <?php echo helper_get_tab_index() ?> type="submit" class="button" value="<?php echo lang_get( 'update_information_button' ) ?>" /> + </td> +</tr> <!-- Summary --> <tr <?php echo helper_alternate_class() ?>> bug_update_advanced_page_v2.diff (2,012 bytes)
--- bug_update_advanced_page.php.org 2009-10-14 12:01:07.000000000 +0200 +++ bug_update_advanced_page.php 2009-10-14 12:14:25.000000000 +0200 @@ -60,6 +60,11 @@ $tpl_bug_id = $f_bug_id; +$t_action_button_position = config_get( 'action_button_position' ); + +$tpl_top_buttons_enabled = !$tpl_force_readonly && ( $t_action_button_position == POSITION_TOP || $t_action_button_position == POSITION_BOTH ); +$tpl_bottom_buttons_enabled = !$tpl_force_readonly && ( $t_action_button_position == POSITION_BOTTOM || $t_action_button_position == POSITION_BOTH ); + $tpl_show_id = in_array( BUG_FIELD_ID, $t_fields ); $tpl_show_project = in_array( BUG_FIELD_PROJECT, $t_fields ); $tpl_show_category = in_array( BUG_FIELD_CATEGORY, $t_fields ); @@ -123,6 +128,14 @@ print_bracket_link( string_get_bug_view_url( $tpl_bug_id ), lang_get( 'back_to_bug_link' ) ); echo '</td></tr>'; +# Submit Button +if ( $tpl_top_buttons_enabled ) { + echo '<tr><td class="center" colspan="6">'; + echo '<input ', helper_get_tab_index(), ' type="submit" class="button" value="', lang_get( 'update_information_button' ), '" />'; + echo '</td></tr>'; +} + + event_signal( 'EVENT_UPDATE_BUG_FORM_TOP', array( $tpl_bug_id, true ) ); if ( $tpl_show_id || $tpl_show_project || $tpl_show_category || $tpl_show_view_state || $tpl_show_date_submitted | $tpl_show_last_updated ) { @@ -654,9 +667,11 @@ event_signal( 'EVENT_BUGNOTE_ADD_FORM', array( $tpl_bug_id ) ); # Submit Button -echo '<tr><td class="center" colspan="6">'; -echo '<input ', helper_get_tab_index(), ' type="submit" class="button" value="', lang_get( 'update_information_button' ), '" />'; -echo '</td></tr>'; +if ( $tpl_bottom_buttons_enabled ) { + echo '<tr><td class="center" colspan="6">'; + echo '<input ', helper_get_tab_index(), ' type="submit" class="button" value="', lang_get( 'update_information_button' ), '" />'; + echo '</td></tr>'; +} echo '</table></form>'; | ||||
@jreese has implemented a feature in 1.2.0rc2 where he added a configuration option that indicates whether the action buttons should be displayed on top, bottom or both. I would recommend that you implement a feature / configuration option that works the same way. You can see the code here: |
|
New patch/diff file added. This one uses the suggested configuration option action_button_position. please commit :-) |
|
vboctor: that earlier patch only covers buttons on view.php whereas stappel is wanting bug_update.php to do much the same thing with the "Update Information" button. The diff looks fine to me... I'll queue it up for a quick real world test and then I'll commit it if everything is OK :) Thanks for your contribution stappel! |
|
Thanks for the patch! I've committed it to 1.2.x because I feel it is something that should be expected given that 1.2.x already had the ability to show buttons at the top of the view page. And of course, it's in the 1.3.x branch too. I did however need to remove the read-only checks as they make no sense in the middle of the bug update form (we only need to do them once on that page at the start). More to the point - those variables you were trying to check are undefined on the bug update form :) |
|
MantisBT: master 5c784edd 2009-10-27 06:01 Details Diff |
Issue 0007917: "Update Information" button at top of update form This patch from stappel extends the use of the existing $g_action_button_position configuration option to apply to the "Update Information" button on the bug update form. This can make it a little bit quicker/easier to update a bug without scrolling all the way down the page to reach the bottom of the form. Again, this is optional and disabled by default. |
Affected Issues 0007917 |
|
mod - bug_update_advanced_page.php | Diff File | ||
MantisBT: master-1.2.x d8fb6b21 2009-10-27 06:01 Details Diff |
Issue 0007917: "Update Information" button at top of update form This patch from stappel extends the use of the existing $g_action_button_position configuration option to apply to the "Update Information" button on the bug update form. This can make it a little bit quicker/easier to update a bug without scrolling all the way down the page to reach the bottom of the form. Again, this is optional and disabled by default. |
Affected Issues 0007917 |
|
mod - bug_update_advanced_page.php | Diff File |