mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Fixes bug MDL-6360 "Resizable image in breadcrumb trail..."
- files block_search_forums.php, calendar/lib.php, lang/en_utf8/access.php, weblib.php, theme/standard/config.php, styles_color.css
This commit is contained in:
parent
717cfb0a7b
commit
57100a9098
6 changed files with 91 additions and 30 deletions
|
@ -2621,25 +2621,56 @@ function user_login_string($course=NULL, $user=NULL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Prints breadcrumbs links
|
||||
* Tests whether $THEME->rarrow, $THEME->larrow have been set (theme/-/config.php).
|
||||
* If not it applies sensible defaults.
|
||||
*
|
||||
* Accessibility: right and left arrow Unicode characters for breadcrumb, calendar,
|
||||
* search forum block, etc. Important: these are 'silent' in a screen-reader
|
||||
* (unlike > »), and must be accompanied by text.
|
||||
* @uses $THEME
|
||||
*/
|
||||
function check_theme_arrows() {
|
||||
global $THEME;
|
||||
|
||||
if (!isset($THEME->rarrow) and !isset($THEME->larrow)) {
|
||||
$THEME->rarrow = '►';
|
||||
$THEME->larrow = '◄';
|
||||
if (FALSE !== strpos($_SERVER['HTTP_USER_AGENT'], 'Opera')) {
|
||||
$THEME->rarrow = '▶';
|
||||
$THEME->larrow = '◀';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints breadcrumb trail of links, called in theme/-/header.html
|
||||
*
|
||||
* @uses $CFG
|
||||
* @param string $navigation The breadcrumbs string to be printed
|
||||
* @param string $navigation The breadcrumb navigation string to be printed
|
||||
* @param string $separator The breadcrumb trail separator. The default 0 leads to the use
|
||||
* of $THEME->rarrow, themes could use '→', '/', or '' for a style-sheet solution.
|
||||
* @param boolean $return False to echo the breadcrumb string (default), true to return it.
|
||||
*/
|
||||
function print_navigation ($navigation, $return=false) {
|
||||
global $CFG, $USER;
|
||||
|
||||
function print_navigation ($navigation, $separator=0, $return=false) {
|
||||
global $CFG, $THEME;
|
||||
$output = '';
|
||||
|
||||
check_theme_arrows();
|
||||
if (0 === $separator) {
|
||||
$separator = $THEME->rarrow;
|
||||
}
|
||||
if (!empty($separator)) {
|
||||
$separator = '<span class="sep">'. $separator .'</span>';
|
||||
}
|
||||
|
||||
if ($navigation) {
|
||||
//Accessibility: breadcrumb links now in a list, » replaced with image.
|
||||
//Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
|
||||
$nav_text = get_string('youarehere','access');
|
||||
$output .= '<h2 class="accesshide">'.$nav_text.",</h2><ul>\n";
|
||||
$output .= '<h2 class="accesshide">'.$nav_text."</h2><ul>\n";
|
||||
if (! $site = get_site()) {
|
||||
$site->shortname = get_string('home');
|
||||
}
|
||||
$navigation = '<li title="'.$nav_text.'"><img src="'.$CFG->pixpath.'/a/r_breadcrumb.gif" class="resize" alt="" /> '
|
||||
.str_replace('->', '</li><li title="'.$nav_text.'"><img src="'.$CFG->pixpath.'/a/r_breadcrumb.gif" class="resize" alt="" /> ', $navigation)."</li>\n";
|
||||
$navigation = "<li>$separator ". str_replace('->', "</li>\n<li>$separator", $navigation) ."</li>\n";
|
||||
$output .= '<li class="first"><a target="'. $CFG->framename .'" href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
|
||||
? '/my' : '') .'/">'. $site->shortname ."</a></li>\n". $navigation;
|
||||
$output .= "</ul>\n";
|
||||
|
@ -4019,27 +4050,33 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
|
|||
$previousmod = $mod;
|
||||
}
|
||||
}
|
||||
//Accessibility: added Alt text, replaced > < with 'silent' character and 'accesshide' text.
|
||||
check_theme_arrows();
|
||||
|
||||
if ($selectmod and has_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
$logslink = "<td><a target=\"$CFG->framename\" href=".
|
||||
$logstext = get_string('alllogs');
|
||||
$logslink = "<a title=\"$logstext\" target=\"$CFG->framename\" href=".
|
||||
"\"$CFG->wwwroot/course/report/log/index.php?chooselog=1&user=0&date=0&id=$course->id&modid=$selectmod->cm\">".
|
||||
"<img border=\"0\" height=\"16\" width=\"16\" src=\"$CFG->pixpath/i/log.gif\" alt=\"\" /></a></td>";
|
||||
"<img class=\"icon log\" src=\"$CFG->pixpath/i/log.gif\" alt=\"$logstext\" /></a>";
|
||||
|
||||
}
|
||||
if ($backmod) {
|
||||
$backtext= get_string('activityprev', 'access');
|
||||
$backmod = "<form action=\"$CFG->wwwroot/mod/$backmod->mod/view.php\" target=\"$CFG->framename\">".
|
||||
"<input type=\"hidden\" name=\"id\" value=\"$backmod->cm\" />".
|
||||
"<input type=\"submit\" value=\"<\" /></form>";
|
||||
"<button type=\"submit\" title=\"$backtext\">$THEME->larrow<span class=\"accesshide\">$backtext</span></button></form>";
|
||||
}
|
||||
if ($nextmod) {
|
||||
$nexttext= get_string('activitynext', 'access');
|
||||
$nextmod = "<form action=\"$CFG->wwwroot/mod/$nextmod->mod/view.php\" target=\"$CFG->framename\">".
|
||||
"<input type=\"hidden\" name=\"id\" value=\"$nextmod->cm\" />".
|
||||
"<input type=\"submit\" value=\">\" /></form>";
|
||||
"<button type=\"submit\" title=\"$nexttext\">$THEME->rarrow<span class=\"accesshide\">$nexttext</span></button></form>";
|
||||
}
|
||||
|
||||
return '<table><tr>'.$logslink .'<td>'. $backmod .'</td><td>' .
|
||||
return "<table><tr>\n<td>".$logslink .'</td><td>'. $backmod .'</td><td>' .
|
||||
popup_form($CFG->wwwroot .'/mod/', $menu, 'navmenu', $selected, $strjumpto,
|
||||
'', '', true, $targetwindow).
|
||||
'</td><td>'. $nextmod .'</td></tr></table>';
|
||||
'</td><td>'. $nextmod ."</td>\n</tr></table>";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5252,4 +5289,4 @@ function debugging($message='', $level=E_NOTICE) {
|
|||
}
|
||||
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue