Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
f5b33487
Commit
f5b33487
authored
Nov 05, 2013
by
Andrew Nicols
Browse files
MDL-40975 ActionMenu: Adjust how actionmenu is displayed for course management
parent
047a8800
Changes
3
Hide whitespace changes
Inline
Side-by-side
course/classes/management_renderer.php
View file @
f5b33487
...
...
@@ -620,8 +620,7 @@ class core_course_management_renderer extends plugin_renderer_base {
new
action_menu_link_secondary
(
$shortnameurl
,
null
,
get_string
(
'resortbyshortname'
)),
new
action_menu_link_secondary
(
$idnumberurl
,
null
,
get_string
(
'resortbyidnumber'
))
));
$menu
->
actiontext
=
get_string
(
'resortcourses'
);
$menu
->
actionicon
=
new
pix_icon
(
't/contextmenu'
,
' '
,
'moodle'
,
array
(
'class'
=>
'iconsmall'
,
'title'
=>
''
));
$menu
->
set_menu_trigger
(
get_string
(
'resortcourses'
));
$actions
[]
=
$this
->
render
(
$menu
);
}
$strall
=
get_string
(
'all'
);
...
...
@@ -637,7 +636,7 @@ class core_course_management_renderer extends plugin_renderer_base {
$perpage
=
$strall
;
}
$menu
->
attributes
[
'class'
]
.
=
' courses-per-page'
;
$menu
->
actiontext
=
get_string
(
'perpagea'
,
'moodle'
,
$perpage
);
$menu
->
set_menu_trigger
(
get_string
(
'perpagea'
,
'moodle'
,
$perpage
)
)
;
$actions
[]
=
$this
->
render
(
$menu
);
return
html_writer
::
div
(
join
(
' | '
,
$actions
),
'listing-actions course-listing-actions'
);
}
...
...
@@ -931,7 +930,7 @@ class core_course_management_renderer extends plugin_renderer_base {
$menu
->
add
(
new
action_menu_link_secondary
(
$modeurl
,
null
,
$modestr
,
$attributes
));
}
$menu
->
actiontext
=
get_string
(
'viewing'
,
'moodle'
,
$selected
);
$menu
->
set_menu_trigger
(
get_string
(
'viewing'
,
'moodle'
,
$selected
)
)
;
$html
=
html_writer
::
start_div
(
'view-mode-selector vms'
);
$html
.
=
$this
->
render
(
$menu
);
...
...
theme/base/style/course.css
View file @
f5b33487
...
...
@@ -368,6 +368,17 @@ input.titleeditor { vertical-align: text-bottom; }
#course-category-listings
.listing-actions
.moodle-actionmenu
:not
([
data-enhanced
])
>
.menubar
a
{
color
:
inherit
;}
#course-category-listings
.listing-actions
.moodle-actionmenu
:not
([
data-enhanced
])
>
.menubar
a
>
img
{
display
:
none
;}
.jsenabled
#course-category-listings
.moodle-actionmenu
[
data-enhance
]
.toggle-display
img
{
width
:
auto
;
}
.jsenabled
#course-category-listings
.moodle-actionmenu
[
data-enhance
]
.toggle-display.textmenu
{
padding-right
:
4px
;
}
.jsenabled
#course-category-listings
.moodle-actionmenu
[
data-enhance
]
.toggle-display.textmenu
.caret
{
margin-top
:
10px
;
}
#course-category-listings
.item-actions
{
margin-right
:
1em
;
display
:
inline-block
;
display
:
initial
;}
#course-category-listings
.item-actions
img
{
margin
:
0
4px
;
vertical-align
:
inherit
;}
#course-category-listings
.item-actions
.menu
img
{
max-width
:
none
;
width
:
12px
;}
...
...
theme/bootstrapbase/less/moodle/course.less
View file @
f5b33487
...
...
@@ -806,6 +806,22 @@ span.editinstructions {
.moodle-actionmenu {
white-space:nowrap;
}
.moodle-actionmenu[data-enhance] {
.toggle-display {
img {
width: auto;
}
&.textmenu {
padding-right: 4px;
.caret {
margin-top: 12px;
}
}
}
}
.listing-actions {
text-align:center;
padding:0.4rem 0.3rem 0.3rem;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment