View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0008902 | mantisbt | other | public | 2008-02-18 09:33 | 2017-06-10 14:05 |
| Reporter | aag_mantis | Assigned To | atrol | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.1.1 | ||||
| Summary | 0008902: "prev/next" links doesn´t stay on the same position | ||||
| Description | When you are viewing an issue, the "next/prev" links, to move forward and backwards within the filtered list, are attached to the 4th column, the problem is that the first 3 columns doesn´t always have the same width in different issues. Most times, when you click on "next" or "prev", the links of the new issue viewed move; so, when I am reviewing issues (just moving from one to the next...), I can´t do consecutive clicks on the same position, I have to "follow" the links, because they change their position. I attach a patch that I have made to bug_view_page.php and bug_view_advanced.php. I'm not an expert in HTML; so, maybe you don't like what I have done, anyway, it's only a suggestion, you can do it your own way. What I have done is to span the first row through the 6 columns and then create a table inside that cell to keep the prev/next link still, even when one of them is missing (on the first or last issue of the list). | ||||
| Additional Information | I have included the diff files and new whole files just in case you want to check the real changes I've made, to prevent potencial conflicts with newer versions. There are very few changes actually(about 6 lines), but since I have indented the new elements the diff files are quite larger than I expected. | ||||
| Tags | patch | ||||
| Attached Files | bug_view_page.diff (4,541 bytes)
76a77,81
> <td colspan="6">
> <table width="100%" cellspacing="0" >
> <!-- Title -->
> <td class="form-title" width="53%">
> <?php echo lang_get( 'viewing_bug_simple_details_title' ) ?>
78,80c83,84
< <!-- Title -->
< <td class="form-title" colspan="<?php echo $t_bugslist ? '3' : '4' ?>">
< <?php echo lang_get( 'viewing_bug_simple_details_title' ) ?>
---
> <!-- Jump to Bugnotes -->
> <span class="small"><?php print_bracket_link( "#bugnotes", lang_get( 'jump_to_bugnotes' ) ) ?></span>
82,108c86,93
< <!-- Jump to Bugnotes -->
< <span class="small"><?php print_bracket_link( "#bugnotes", lang_get( 'jump_to_bugnotes' ) ) ?></span>
<
< <!-- Send Bug Reminder -->
< <?php
< if ( !current_user_is_anonymous() && !bug_is_readonly( $f_bug_id ) &&
< access_has_bug_level( config_get( 'bug_reminder_threshold' ), $f_bug_id ) ) {
< ?>
< <span class="small">
< <?php print_bracket_link( 'bug_reminder_page.php?bug_id='.$f_bug_id, lang_get( 'bug_reminder' ) ) ?>
< </span>
< <?php
< }
<
< if ( wiki_is_enabled() ) {
< ?>
< <span class="small">
< <?php print_bracket_link( 'wiki.php?id='.$f_bug_id, lang_get( 'wiki' ) ) ?>
< </span>
< <?php
< }
< ?>
< </td>
<
< <!-- prev/next links -->
< <?php if( $t_bugslist ) { ?>
< <td class="center"><span class="small">
---
> <!-- Send Bug Reminder -->
> <?php
> if ( !current_user_is_anonymous() && !bug_is_readonly( $f_bug_id ) &&
> access_has_bug_level( config_get( 'bug_reminder_threshold' ), $f_bug_id ) ) {
> ?>
> <span class="small">
> <?php print_bracket_link( 'bug_reminder_page.php?bug_id='.$f_bug_id, lang_get( 'bug_reminder' ) ) ?>
> </span>
110,114d94
< $t_bugslist = explode( ',', $t_bugslist );
< $t_index = array_search( $f_bug_id, $t_bugslist );
< if( false !== $t_index ) {
< if( isset( $t_bugslist[$t_index-1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index-1], '<<' );
< if( isset( $t_bugslist[$t_index+1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index+1], '>>' );
115a96,97
>
> if ( wiki_is_enabled() ) {
117,121c99,105
< </span></td>
< <?php } ?>
<
< <!-- Links -->
< <td class="right" colspan="2">
---
> <span class="small">
> <?php print_bracket_link( 'wiki.php?id='.$f_bug_id, lang_get( 'wiki' ) ) ?>
> </span>
> <?php
> }
> ?>
> </td>
123,131c107,135
< <!-- Advanced View (if enabled) -->
< <?php if ( BOTH == config_get( 'show_view' ) ) { ?>
< <span class="small"><?php print_bracket_link( 'bug_view_advanced_page.php?bug_id=' . $f_bug_id, lang_get( 'view_advanced_link' ) )?></span>
< <?php }?>
<
< <?php if ( $t_can_view_history ) { ?>
< <!-- History -->
< <span class="small"><?php print_bracket_link( 'bug_view_page.php?bug_id=' . $f_bug_id . '&history=1#history', lang_get( 'bug_history' ) ) ?></span>
< <?php } ?>
---
> <!-- prev/next links -->
> <?php if( $t_bugslist ) { ?>
> <td class="right" width="5%" ><span class="small">
> <?php
> $t_bugslist = explode( ',', $t_bugslist );
> $t_index = array_search( $f_bug_id, $t_bugslist );
> if( false !== $t_index ) {
> if( isset( $t_bugslist[$t_index-1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index-1], '<<' );
> echo( '</td><td class="left" width="5%" ><span class="small">' );
> if( isset( $t_bugslist[$t_index+1] ) ) print_bracket_link( 'bug_view_page.php?bug_id='.$t_bugslist[$t_index+1], '>>' );
> } else {
> echo( '</td><td width="5%" ><span class="small">' );
> }
> ?>
> </span></td>
> <?php } ?>
>
> <!-- Links -->
> <td class="right" width="37%">
>
> <!-- Advanced View (if enabled) -->
> <?php if ( BOTH == config_get( 'show_view' ) ) { ?>
> <span class="small"><?php print_bracket_link( 'bug_view_advanced_page.php?bug_id=' . $f_bug_id, lang_get( 'view_advanced_link' ) )?></span>
> <?php }?>
>
> <?php if ( $t_can_view_history ) { ?>
> <!-- History -->
> <span class="small"><?php print_bracket_link( 'bug_view_page.php?bug_id=' . $f_bug_id . '&history=1#history', lang_get( 'bug_history' ) ) ?></span>
> <?php } ?>
133,134c137,138
< <!-- Print Bug -->
< <span class="small"><?php print_bracket_link( 'print_bug_page.php?bug_id=' . $f_bug_id, lang_get( 'print' ) ) ?></span>
---
> <!-- Print Bug -->
> <span class="small"><?php print_bracket_link( 'print_bug_page.php?bug_id=' . $f_bug_id, lang_get( 'print' ) ) ?></span>
135a140,141
> </td>
> </table>
bug_view_page.php.diff (240 bytes)
143c143 < <td> --- > <td width="15%"> 146c146 < <td> --- > <td width="20%"> 149c149 < <td> --- > <td width="15%"> 152c152 < <td> --- > <td width="20%"> 155c155 < <td> --- > <td width="15%"> 158c158 < <td> --- > <td width="15%"> | ||||
|
I have added a diff file, this solution (as in "bug_view_advanced_page.php") is more elegant than the one in the zip file . ** Sorry, the first one, "bug_view_page.diff" is wrong. The good one is "bug_view_page.php.diff" |
|
|
Having just tried looking at this patch, whilst it seemed to fix one case, the issue still occured on other iterations of the same page. |
|
|
If by "other iterations" you mean moving to the first or last issue in a list, you are right. When one of the links (back or forward) is missing (in a list of more than 2 issues), the other one is centered, and changes its position. The only solution I see is to split the 4th column into 2, and place the back/forward links on each of them; that means to change a few more things within the table. You probably know more than me about HTML and you can figure out a better solution. |
|
|
This issues was reported against an old version of MantisBT which is no longer supported. The issue is no longer reproducible on latest stable version [1] |
|