mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-46022-master' of git://github.com/jethac/moodle
Conflicts: theme/bootstrapbase/less/moodle/modules.less theme/bootstrapbase/style/moodle.css
This commit is contained in:
commit
d9640a99ba
6 changed files with 80 additions and 13 deletions
|
@ -3070,14 +3070,31 @@ EOD;
|
|||
$content .= html_writer::end_tag('div');
|
||||
$content .= html_writer::end_tag('li');
|
||||
} else {
|
||||
// The node doesn't have children so produce a final menuitem
|
||||
$content = html_writer::start_tag('li', array('class'=>'yui3-menuitem'));
|
||||
if ($menunode->get_url() !== null) {
|
||||
$url = $menunode->get_url();
|
||||
// The node doesn't have children so produce a final menuitem.
|
||||
// Also, if the node's text matches '####', add a class so we can treat it as a divider.
|
||||
$content = '';
|
||||
if (preg_match("/^#+$/", $menunode->get_text())) {
|
||||
|
||||
// This is a divider.
|
||||
$content = html_writer::start_tag('li', array('class' => 'yui3-menuitem divider'));
|
||||
} else {
|
||||
$url = '#';
|
||||
$content = html_writer::start_tag(
|
||||
'li',
|
||||
array(
|
||||
'class' => 'yui3-menuitem'
|
||||
)
|
||||
);
|
||||
if ($menunode->get_url() !== null) {
|
||||
$url = $menunode->get_url();
|
||||
} else {
|
||||
$url = '#';
|
||||
}
|
||||
$content .= html_writer::link(
|
||||
$url,
|
||||
$menunode->get_text(),
|
||||
array('class' => 'yui3-menuitem-content', 'title' => $menunode->get_title())
|
||||
);
|
||||
}
|
||||
$content .= html_writer::link($url, $menunode->get_text(), array('class'=>'yui3-menuitem-content', 'title'=>$menunode->get_title()));
|
||||
$content .= html_writer::end_tag('li');
|
||||
}
|
||||
// Return the sub menu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue