Skip to content

Commit

Permalink
Change order of top buttons on "View Issue" page
Browse files Browse the repository at this point in the history
Chang order and avoid unneeded server round trip if history is visible

Fixes #23202
  • Loading branch information
atrol committed Aug 11, 2017
1 parent 508ab61 commit e8845fd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
19 changes: 12 additions & 7 deletions bug_view_inc.php
Expand Up @@ -147,7 +147,13 @@
$t_wiki_link = config_get_global( 'wiki_enable' ) == ON ? 'wiki.php?id=' . $f_bug_id : '';

if( access_has_bug_level( config_get( 'view_history_threshold' ), $f_bug_id ) ) {
$t_history_link = 'view.php?id=' . $f_bug_id . '&history=1#history';
if( $f_history ) {
$t_history_link = '#history';
$t_history_label = lang_get( 'jump_to_history' );
} else {
$t_history_link = 'view.php?id=' . $f_bug_id . '&history=1#history';
$t_history_label = lang_get( 'display_history' );
}
} else {
$t_history_link = '';
}
Expand Down Expand Up @@ -247,9 +253,6 @@
echo '<div class="widget-toolbox padding-8 clearfix noprint">';
echo '<div class="btn-group pull-left">';

# Jump to Bugnotes
print_small_button( '#bugnotes', lang_get( 'jump_to_bugnotes' ) );

# Send Bug Reminder
if( $t_show_reminder_link ) {
print_small_button( $t_bug_reminder_link, lang_get( 'bug_reminder' ) );
Expand All @@ -275,10 +278,12 @@
}
}

# Links
# Jump to Bugnotes
print_small_button( '#bugnotes', lang_get( 'jump_to_bugnotes' ) );

# Display or Jump to History
if( !is_blank( $t_history_link ) ) {
# History
print_small_button( $t_history_link, lang_get( 'bug_history' ) );
print_small_button( $t_history_link, $t_history_label );
}

echo '</div>';
Expand Down
4 changes: 3 additions & 1 deletion lang/strings_english.txt
Expand Up @@ -105,6 +105,8 @@ $s_excel_export = 'Excel Export';
$s_login_anonymously = 'Login Anonymously';
$s_anonymous = 'Anonymous';
$s_jump_to_bugnotes = 'Jump to Notes';
$s_jump_to_history = 'Jump to History';
$s_display_history = 'Display History';
$s_public_project_msg = 'This project is public. All users have access.';
$s_private_project_msg = 'This project is private. Only administrators and manually added users have access.';
$s_access_level_project = 'Project Access Level';
Expand Down Expand Up @@ -531,7 +533,7 @@ $s_bugnote_add_resolve_button = 'Add Note';
$s_from = 'From';
$s_to = 'To';
$s_sent_you_this_reminder_about = 'sent you this reminder about';
$s_bug_reminder = 'Send a reminder';
$s_bug_reminder = 'Send a Reminder';
$s_reminder_sent_to = 'Reminder sent to';
$s_reminder_sent_none = 'No reminders could be sent';
$s_reminder_list_truncated = 'recipients list truncated';
Expand Down

0 comments on commit e8845fd

Please sign in to comment.