Skip to content

Commit

Permalink
MDL-65448 block_site_main_menu: Restyle moving.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Oct 16, 2020
1 parent d1c884a commit 71f05ec
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 16 deletions.
10 changes: 5 additions & 5 deletions blocks/site_main_menu/block_site_main_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function get_content() {
$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 {
Expand Down Expand Up @@ -128,8 +127,9 @@ function get_content() {
if ($mod->id == $USER->activitycopy) {
continue;
}
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'&amp;sesskey='.sesskey().'">'.
'<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->image_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
$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) {
Expand All @@ -148,8 +148,8 @@ function get_content() {
}

if ($ismoving) {
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'&amp;sesskey='.sesskey().'">'.
'<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->image_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
$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[] = '';
}

Expand Down
13 changes: 13 additions & 0 deletions theme/boost/scss/moodle/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion theme/boost/scss/moodle/grade.scss
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
display: block;
width: 100%;
height: 2rem;
border: 2px dashed $brand-primary;
border: 2px dashed $gray-800;
}

.category input[type="text"],
Expand Down
4 changes: 0 additions & 4 deletions theme/boost/scss/moodle/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ $iconsizes: map-merge((
height: $icon-big-height;
font-size: $icon-big-height;
}

&.movetarget {
width: 80px;
}
}

.navbar-dark a .icon {
Expand Down
15 changes: 12 additions & 3 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
15 changes: 12 additions & 3 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 71f05ec

Please sign in to comment.