From 91c9ca0f49ce67c75a395189e1ea94bd3fa1867d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 1 May 2019 11:27:38 +0200 Subject: [PATCH] MDL-65448 block_site_main_menu: Restyle moving. --- blocks/site_main_menu/block_site_main_menu.php | 10 +++++----- theme/boost/scss/moodle/core.scss | 13 +++++++++++++ theme/boost/scss/moodle/grade.scss | 2 +- theme/boost/scss/moodle/icons.scss | 4 ---- theme/boost/style/moodle.css | 15 ++++++++++++--- theme/classic/style/moodle.css | 15 ++++++++++++--- 6 files changed, 43 insertions(+), 16 deletions(-) diff --git a/blocks/site_main_menu/block_site_main_menu.php b/blocks/site_main_menu/block_site_main_menu.php index c5a692fa468..a0de2d1a755 100644 --- a/blocks/site_main_menu/block_site_main_menu.php +++ b/blocks/site_main_menu/block_site_main_menu.php @@ -88,7 +88,6 @@ class block_site_main_menu extends block_list { $section = $modinfo->get_section_info(0); if ($ismoving) { - $strmovehere = get_string('movehere'); $strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'")); $strcancel= get_string('cancel'); } else { @@ -128,8 +127,9 @@ class block_site_main_menu extends block_list { if ($mod->id == $USER->activitycopy) { continue; } - $this->content->items[] = ''. - ''.$strmovehere.''; + $movingurl = new moodle_url('/course/mod.php', array('moveto' => $mod->id, 'sesskey' => sesskey())); + $this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, + 'class' => 'movehere')); $this->content->icons[] = ''; } if ($mod->indent > 0) { @@ -148,8 +148,8 @@ class block_site_main_menu extends block_list { } if ($ismoving) { - $this->content->items[] = ''. - ''.$strmovehere.''; + $movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey())); + $this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')); $this->content->icons[] = ''; } diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index e49aaae7c64..90eb0e57842 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -219,6 +219,19 @@ div.dropdown-item { padding: 0; } +.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed $gray-800; + margin: 4px 0; +} + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; +} + .inline, .inline-list li { display: inline; diff --git a/theme/boost/scss/moodle/grade.scss b/theme/boost/scss/moodle/grade.scss index 4d09195e602..a543b7450ba 100644 --- a/theme/boost/scss/moodle/grade.scss +++ b/theme/boost/scss/moodle/grade.scss @@ -284,7 +284,7 @@ display: block; width: 100%; height: 2rem; - border: 2px dashed $brand-primary; + border: 2px dashed $gray-800; } .category input[type="text"], diff --git a/theme/boost/scss/moodle/icons.scss b/theme/boost/scss/moodle/icons.scss index da5d30a72a9..b78839abf09 100644 --- a/theme/boost/scss/moodle/icons.scss +++ b/theme/boost/scss/moodle/icons.scss @@ -41,10 +41,6 @@ $iconsizes: map-merge(( height: $icon-big-height; font-size: $icon-big-height; } - - &.movetarget { - width: 80px; - } } .navbar-dark a .icon { diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 10b9a7dd869..30b15c1f13e 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -9840,6 +9840,17 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; + margin: 4px 0; } + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; } + .inline, .inline-list li { display: inline; } @@ -11874,8 +11885,6 @@ input[disabled] { width: 64px; height: 64px; font-size: 64px; } - .icon.movetarget { - width: 80px; } .navbar-dark a .icon { color: rgba(255, 255, 255, 0.5) !important; @@ -18358,7 +18367,7 @@ p.arrow_button { display: block; width: 100%; height: 2rem; - border: 2px dashed #1177d1; } + border: 2px dashed #343a40; } .path-grade-edit-tree .setup-grades .category input[type="text"], .path-grade-edit-tree .setup-grades .category .column-range, diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 9fac82b7a62..6e741f0a191 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -10044,6 +10044,17 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; + margin: 4px 0; } + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; } + .inline, .inline-list li { display: inline; } @@ -12087,8 +12098,6 @@ input[disabled] { width: 64px; height: 64px; font-size: 64px; } - .icon.movetarget { - width: 80px; } .navbar-dark a .icon { color: rgba(255, 255, 255, 0.5) !important; @@ -18590,7 +18599,7 @@ p.arrow_button { display: block; width: 100%; height: 2rem; - border: 2px dashed #1177d1; } + border: 2px dashed #343a40; } .path-grade-edit-tree .setup-grades .category input[type="text"], .path-grade-edit-tree .setup-grades .category .column-range,