mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
navigation MDL-22173 Separators are now written inside the LI elements of the node they relate to.
This commit is contained in:
parent
931697773c
commit
ffca6f4be7
1 changed files with 11 additions and 3 deletions
|
@ -2073,13 +2073,21 @@ END;
|
|||
|
||||
$htmlblocks = array();
|
||||
// Iterate the navarray and display each node
|
||||
foreach ($items as $item) {
|
||||
$itemcount = count($items);
|
||||
$separator = get_separator();
|
||||
for ($i=0;$i < $itemcount;$i++) {
|
||||
$item = $items[$i];
|
||||
$item->hideicon = true;
|
||||
$htmlblocks[] = html_writer::tag('li', $this->render($item));
|
||||
if ($i===0) {
|
||||
$content = html_writer::tag('li', $this->render($item));
|
||||
} else {
|
||||
$content = html_writer::tag('li', $separator.$this->render($item));
|
||||
}
|
||||
$htmlblocks[] = $content;
|
||||
}
|
||||
|
||||
// XHTML
|
||||
return html_writer::tag('ul', join(html_writer::tag('li',get_separator()), $htmlblocks));;
|
||||
return html_writer::tag('ul', join('', $htmlblocks));
|
||||
}
|
||||
|
||||
protected function render_navigation_node(navigation_node $item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue