Skip to content

Commit

Permalink
Clean up the menu and header a little bit
Browse files Browse the repository at this point in the history
* core/html_api.php
  (print_header): use string_display() on the title
  (print_hr): flip the code in the conditional
  (print_menu): rearrange the menu so account prefs are next to login/logout
    and conditional admin stuff is at the end

* core/print_api.php
  (print_project_option_list): use string_display() on the project names

* lang/strings_english.txt
  (account_link): use 'My Account' instead of 'Account'


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1818 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Feb 9, 2003
1 parent fb79c20 commit 9e0203b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
21 changes: 11 additions & 10 deletions core/html_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: html_api.php,v 1.40 2003-02-09 10:30:07 jfitzell Exp $
# $Id: html_api.php,v 1.41 2003-02-09 22:30:10 jfitzell Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -185,7 +185,7 @@ function print_header( $p_title='Mantis' ) {
break;
}

PRINT "<div class=\"center\"><span class=\"pagetitle\">$t_title</span></div>";
echo '<div class="center"><span class="pagetitle">' . string_display( $t_title ) . '</span></div>';
}
# --------------------
# (10) $p_page is included. This allows for the admin to have a nice banner or
Expand Down Expand Up @@ -320,10 +320,10 @@ function print_source_link( $p_file ) {
# --------------------
# print the hr
function print_hr( $p_hr_size=null, $p_hr_width=null ) {
if ( $p_hr_size === null ) {
if ( null === $p_hr_size ) {
$p_hr_size = config_get( 'hr_size' );
}
if ( $p_hr_width === null ) {
if ( null === $p_hr_width ) {
$p_hr_width = config_get( 'hr_width' );
}
echo "<hr size=\"$p_hr_size\" width=\"$p_hr_width%\" />";
Expand Down Expand Up @@ -354,10 +354,7 @@ function print_menu() {
PRINT '<a href="summary_page.php">' . lang_get( 'summary_link' ) . '</a> | ';
}

# only show accounts that are NOT protected
if ( OFF == $t_protected ) {
PRINT '<a href="account_page.php">' . lang_get( 'account_link' ) . '</a> | ';
}
PRINT '<a href="proj_doc_page.php">' . lang_get( 'docs_link' ) . '</a> | ';

if ( access_level_check_greater_or_equal( MANAGER ) ) {
if ( access_level_check_greater_or_equal( ADMINISTRATOR ) ) {
Expand All @@ -376,7 +373,11 @@ function print_menu() {
}
}

PRINT '<a href="proj_doc_page.php">' . lang_get( 'docs_link' ) . '</a> | ';
# only show accounts that are NOT protected
if ( OFF == $t_protected ) {
PRINT '<a href="account_page.php">' . lang_get( 'account_link' ) . '</a> | ';
}

PRINT '<a href="logout_page.php">' . lang_get( 'logout_link' ) . '</a>';
PRINT '</td>';
PRINT '<td class="right" style="white-space: nowrap;">';
Expand Down Expand Up @@ -427,7 +428,7 @@ function print_project_menu_bar() {
for ( $i=0 ; $i < $project_count ; $i++ ) {
$row = db_fetch_array( $result );
extract( $row, EXTR_PREFIX_ALL, 'v' );
PRINT " | <a href=\"set_project.php?project_id=$v_id\">$v_name</a>";
PRINT " | <a href=\"set_project.php?project_id=$v_id\">" . string_display( $v_name ) . '</a>';
}
PRINT '</td>';
PRINT '</tr>';
Expand Down
4 changes: 2 additions & 2 deletions core/print_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: print_api.php,v 1.39 2003-02-09 22:15:17 jfitzell Exp $
# $Id: print_api.php,v 1.40 2003-02-09 22:30:10 jfitzell Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -451,7 +451,7 @@ function print_project_option_list( $p_project_id = null, $p_include_all_project
extract( $row, EXTR_PREFIX_ALL, 'v' );
echo "<option value=\"$v_id\"";
check_selected( $p_project_id, $v_id );
echo ">$v_name</option>";
echo '>' . string_display( $v_name ) . '</option>';
}
}
# --------------------
Expand Down
8 changes: 4 additions & 4 deletions lang/strings_english.txt
Expand Up @@ -9,11 +9,11 @@
###########################################################################
# English strings for Mantis
# -------------------------------------------------
# $Revision: 1.111 $
# $Revision: 1.112 $
# $Author: jfitzell $
# $Date: 2003-02-09 10:30:07 $
# $Date: 2003-02-09 22:30:11 $
#
# $Id: strings_english.txt,v 1.111 2003-02-09 10:30:07 jfitzell Exp $
# $Id: strings_english.txt,v 1.112 2003-02-09 22:30:11 jfitzell Exp $
###########################################################################
?>
<?php
Expand Down Expand Up @@ -614,7 +614,7 @@
$s_view_bugs_link = 'View Bugs';
$s_report_bug_link = 'Report Bug';
$s_summary_link = 'Summary';
$s_account_link = 'Account';
$s_account_link = 'My Account';
$s_users_link = 'Users';
$s_manage_link = 'Manage';
$s_edit_news_link = 'Edit News';
Expand Down

0 comments on commit 9e0203b

Please sign in to comment.