MDL-55074 theme_boost: Make sections different in flat nav
This commit is contained in:
@@ -3610,6 +3610,14 @@ class flat_navigation_node extends navigation_node {
|
||||
$this->indent = $indent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this node represent a course section link.
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_section() {
|
||||
return $this->type == navigation_node::TYPE_SECTION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for "showdivider"
|
||||
* @return boolean
|
||||
|
||||
@@ -1,19 +1,30 @@
|
||||
<nav class="nav nav-stacked nav-pills">
|
||||
<nav class="list-group">
|
||||
{{# flatnavigation }}
|
||||
{{#showdivider}}
|
||||
</nav>
|
||||
<nav class="list-group m-t-1">
|
||||
{{/showdivider}}
|
||||
{{#get_smscreenonly}}
|
||||
<div class="hidden-lg-up">
|
||||
{{/get_smscreenonly}}
|
||||
{{#showdivider}}
|
||||
<div class="nav-item"><hr></div>
|
||||
{{/showdivider}}
|
||||
{{#action}}
|
||||
<div class="nav-item"><a class="nav-link {{#isactive}}active{{/isactive}} m-l-{{get_indent}}" href="{{{action}}}">{{text}}</a></div>
|
||||
<a class="list-group-item list-group-item-action {{#isactive}}active{{/isactive}}" href="{{{action}}}"><span class="m-l-{{get_indent}}">
|
||||
{{#is_section}}
|
||||
{{#pix}}i/folder{{/pix}}
|
||||
{{/is_section}}
|
||||
{{text}}
|
||||
</span></a>
|
||||
{{/action}}
|
||||
{{^action}}
|
||||
<div class="nav-item"><span class="nav-link m-l-{{get_indent}}">{{text}}</span></div>
|
||||
<div class="list-group-item"><span class="m-l-{{get_indent}}">
|
||||
{{#is_section}}
|
||||
{{#pix}}i/folder{{/pix}}
|
||||
{{/is_section}}
|
||||
{{text}}
|
||||
</span></div>
|
||||
{{/action}}
|
||||
{{#get_smscreenonly}}
|
||||
</div>
|
||||
{{/get_smscreenonly}}
|
||||
{{/ flatnavigation }}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user