Skip to content

Commit f593f69

Browse files
author
Damyon Wiese
committed
MDL-55416 theme_noname: Bootstrap alpha3 support
1 parent 30c3663 commit f593f69

File tree

8 files changed

+17
-20
lines changed

8 files changed

+17
-20
lines changed

theme/noname/classes/output/core_renderer.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,7 @@ public function standard_head_html() {
6868
* Uses bootstrap compatible html.
6969
*/
7070
public function navbar() {
71-
$items = $this->page->navbar->get_items();
72-
if (empty($items)) {
73-
return '';
74-
}
75-
76-
$breadcrumbs = array();
77-
foreach ($items as $item) {
78-
$item->hideicon = true;
79-
$breadcrumbs[] = $this->render($item);
80-
}
81-
$list_items = '<li>'.join(" </li><li>", $breadcrumbs).'</li>';
82-
$title = '<span class="accesshide" id="navbar-label">'.get_string('pagepath').'</span>';
83-
return $title . '<nav aria-labelledby="navbar-label"><ul class="breadcrumb">' .
84-
$list_items . '</ul></nav>';
71+
return $this->render_from_template('core/navbar', $this->page->navbar);
8572
}
8673

8774
/*

theme/noname/layout/columns2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
$templatecontext = [
2525
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
2626
'output' => $OUTPUT,
27-
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-3 col-md-pull-9'),
27+
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-3 pull-md-9'),
2828
];
2929

3030
echo $OUTPUT->render_from_template('theme_noname/columns2', $templatecontext);

theme/noname/layout/columns3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
$templatecontext = [
2525
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
2626
'output' => $OUTPUT,
27-
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 col-md-pull-8'),
27+
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 pull-md-8'),
2828
'sidepostblocks' => $OUTPUT->blocks('side-post', 'col-md-3')
2929
];
3030

theme/noname/layout/secure.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
$templatecontext = [
2525
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
2626
'output' => $OUTPUT,
27-
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 col-md-pull-8 col-lg-3 col-lg-pull-9'),
27+
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 pull-md-8 col-lg-3 pull-lg-9'),
2828
'sidepostblocks' => $OUTPUT->blocks('side-post', 'col-md-3')
2929
];
3030

theme/noname/templates/columns2.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{{{ output.full_header }}}
3636

3737
<div id="page-content" class="row">
38-
<div id="region-main-box" class="col-md-9 col-md-push-3">
38+
<div id="region-main-box" class="col-md-9 push-md-3">
3939
<section id="region-main">
4040
{{{ output.course_content_header }}}
4141
{{{ output.main_content }}}

theme/noname/templates/columns3.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<div id="page-content" class="row">
3838
<div id="region-main-box" class="col-md-9">
3939
<div class="row">
40-
<section id="region-main" class="col-md-8 col-md-push-4">
40+
<section id="region-main" class="col-md-8 push-md-4">
4141
{{{ output.course_content_header }}}
4242
{{{ output.main_content }}}
4343
{{{ output.course_content_footer }}}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ol class="breadcrumb" role="navigation">
2+
{{#get_items}}
3+
{{#action}}
4+
<li class="breadcrumb-item {{#is_active}}active{{/is_active}}"><a href="{{action}}" {{#get_title}}title="{{get_title}}"{{/get_title}}>{{text}}</a></li>
5+
{{/action}}
6+
{{^action}}
7+
<li class="breadcrumb-item {{#is_active}}active{{/is_active}}">{{text}}</li>
8+
{{/action}}
9+
{{/get_items}}
10+
</ol>

theme/noname/templates/secure.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<div id="page-content" class="row">
3838
<div id="region-main-box" class="col-md-9">
3939
<div class="row">
40-
<section id="region-main" class="col-md-8 col-md-push-4 col-lg-9 col-lg-push-3">
40+
<section id="region-main" class="col-md-8 push-md-4 col-lg-9 push-lg-3">
4141
{{{ output.main_content }}}
4242
</section>
4343
{{{ sidepreblocks }}}

0 commit comments

Comments
 (0)