MDL-54044 block_site_main_menu: Fixed labels not being indented
authorFrederic Massart <fred@moodle.com>
Tue, 10 May 2016 04:23:29 +0000 (12:23 +0800)
committerFrederic Massart <fred@moodle.com>
Tue, 10 May 2016 04:23:29 +0000 (12:23 +0800)
blocks/site_main_menu/block_site_main_menu.php
blocks/site_main_menu/styles.css

index 866047d..26bbf00 100644 (file)
@@ -75,7 +75,7 @@ class block_site_main_menu extends block_list {
                         $content = $cm->get_formatted_content(array('overflowdiv' => true, 'noclean' => true));
                     }
 
-                    $this->content->items[] = $indent . $content;
+                    $this->content->items[] = $indent . html_writer::div($content, 'main-menu-content');
                 }
             }
             return $this->content;
@@ -142,7 +142,7 @@ class block_site_main_menu extends block_list {
                     } else {
                         $content = html_writer::div($courserenderer->course_section_cm_name($mod), ' activity');
                     }
-                    $this->content->items[] = $indent. $content . $editbuttons;
+                    $this->content->items[] = $indent . html_writer::div($content . $editbuttons, 'main-menu-content');
                 }
             }
         }
index f437bae..6d43c31 100644 (file)
@@ -1,9 +1,13 @@
 .block_site_main_menu li { clear: both; }
-.block_site_main_menu li .column { width: 100%; }
+.block_site_main_menu.block.list_block .unlist > li > .column {
+    /* Made specific to win over .block.list_block .unlist > li > .column. */
+    width: 100%;
+    display: table;
+}
 .block_site_main_menu li .buttons { float: right; margin: 0; }
 .dir-rtl .block_site_main_menu li .buttons { float: left; }
 .block_site_main_menu li .buttons a img{ vertical-align: text-bottom;}
 .block_site_main_menu .footer { margin-top: 1em; }
 .block_site_main_menu .section_add_menus noscript div { display: inline;}
 .block_site_main_menu .mod-indent,
-.block_site_main_menu .activity { display: table-cell; }
+.block_site_main_menu .main-menu-content { display: table-cell; }