mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
navigation MDL-22173 Fixed XHTML issue with navbar, and removed redundant ul's from nodes without children
This commit is contained in:
parent
633fedbcea
commit
6c721bbfed
@ -96,7 +96,12 @@ class block_navigation_renderer extends plugin_renderer_base {
|
||||
$content = html_writer::tag('li', $content, $liattr);
|
||||
$lis[] = $content;
|
||||
}
|
||||
|
||||
if (count($lis)) {
|
||||
return html_writer::tag('ul', implode("\n", $lis), $attrs);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -62,7 +62,12 @@ class block_settings_renderer extends plugin_renderer_base {
|
||||
$content = html_writer::tag('li', $content, $liattr);
|
||||
$lis[] = $content;
|
||||
}
|
||||
|
||||
if (count($lis)) {
|
||||
return html_writer::tag('ul', implode("\n", $lis), $attrs);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public function search_form(moodle_url $formtarget, $searchvalue) {
|
||||
|
@ -2079,7 +2079,7 @@ END;
|
||||
}
|
||||
|
||||
// XHTML
|
||||
return join(get_separator(), $htmlblocks);
|
||||
return html_writer::tag('ul', join(html_writer::tag('li',get_separator()), $htmlblocks));;
|
||||
}
|
||||
|
||||
protected function render_navigation_node(navigation_node $item) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user