Follow-up fix bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6". (Thought I committed this, what's going on?!)

This commit is contained in:
nfreear
2007-05-11 11:41:38 +00:00
parent da6677db3e
commit 8aa656699c
+79
View File
@@ -2915,6 +2915,85 @@ function get_separator() {
return ' '.link_arrow_right($text='/', $url='', $accesshide=true, 'sep').' ';
}
/**
* Return the right arrow with text ('next'), and optionally embedded in a link.
* See function above, check_theme_arrows.
* To see examples of this function in use, see function get_separator below (simple),
* and function calendar_get_link_next in calendar/lib.php (more complex).
* @param string $text Plain text label (set to blank only for breadcrumb separator cases).
* @param string $url An optional link to use in a surrounding HTML anchor.
* @param bool $accesshide True if text should be hidden (for screen readers only).
* @param string $addclass Additional class names for the link, or the arrow character.
* @return string HTML string.
*/
function link_arrow_right($text, $url='', $accesshide=false, $addclass='') {
global $THEME;
check_theme_arrows();
$arrowclass = 'arrow ';
if (! $url) {
$arrowclass .= $addclass;
}
$arrow = '<span class="'.$arrowclass.'">'.$THEME->rarrow.'</span>';
$htmltext = '';
if ($text) {
$htmltext = htmlspecialchars($text).'&nbsp;';
if ($accesshide) {
$htmltext = '<span class="accesshide">'.$htmltext.'</span>';
}
}
if ($url) {
$class = '';
if ($addclass) {
$class =" class=\"$addclass\"";
}
return '<a'.$class.' href="'.$url.'" title="'.htmlspecialchars($text).'">'.$htmltext.$arrow.'</a>';
}
return $htmltext.$arrow;
}
/**
* Return the left arrow with text ('previous'), and optionally embedded in a link.
* See function above, check_theme_arrows.
* @param string $text Plain text label (set to blank only for breadcrumb separator cases).
* @param string $url An optional link to use in a surrounding HTML anchor.
* @param bool $accesshide True if text should be hidden (for screen readers only).
* @param string $addclass Additional class names for the link, or the arrow character.
* @return string HTML string.
*/
function link_arrow_left($text, $url='', $accesshide=false, $addclass='') {
global $THEME;
check_theme_arrows();
$arrowclass = 'arrow ';
if (! $url) {
$arrowclass .= $addclass;
}
$arrow = '<span class="'.$arrowclass.'">'.$THEME->larrow.'</span>';
$htmltext = '';
if ($text) {
$htmltext = '&nbsp;'.htmlspecialchars($text);
if ($accesshide) {
$htmltext = '<span class="accesshide">'.$htmltext.'</span>';
}
}
if ($url) {
$class = '';
if ($addclass) {
$class =" class=\"$addclass\"";
}
return '<a'.$class.' href="'.$url.'" title="'.htmlspecialchars($text).'">'.$arrow.$htmltext.'</a>';
}
return $arrow.$htmltext;
}
/**
* Return the breadcrumb trail navigation separator.
* @return string HTML string.
*/
function get_separator() {
//Accessibility: the 'hidden' slash is preferred for screen readers.
return ' '.link_arrow_right($text='/', $url='', $accesshide=true, 'sep').' ';
}
/**
* Prints breadcrumb trail of links, called in theme/-/header.html
*