Skip to content
GitLab
Menu
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
01dc1c11
Commit
01dc1c11
authored
Nov 25, 2016
by
jun
Browse files
MDL-56919 mod_forum: Assign check icon for selected subscription mode
parent
894b1825
Changes
4
Hide whitespace changes
Inline
Side-by-side
mod/forum/lib.php
View file @
01dc1c11
...
@@ -7146,6 +7146,7 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
...
@@ -7146,6 +7146,7 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
if
(
$canmanage
)
{
if
(
$canmanage
)
{
$mode
=
$forumnode
->
add
(
get_string
(
'subscriptionmode'
,
'forum'
),
null
,
navigation_node
::
TYPE_CONTAINER
);
$mode
=
$forumnode
->
add
(
get_string
(
'subscriptionmode'
,
'forum'
),
null
,
navigation_node
::
TYPE_CONTAINER
);
$mode
->
add_class
(
'subscriptionmode'
);
$allowchoice
=
$mode
->
add
(
get_string
(
'subscriptionoptional'
,
'forum'
),
new
moodle_url
(
'/mod/forum/subscribe.php'
,
array
(
'id'
=>
$forumobject
->
id
,
'mode'
=>
FORUM_CHOOSESUBSCRIBE
,
'sesskey'
=>
sesskey
())),
navigation_node
::
TYPE_SETTING
);
$allowchoice
=
$mode
->
add
(
get_string
(
'subscriptionoptional'
,
'forum'
),
new
moodle_url
(
'/mod/forum/subscribe.php'
,
array
(
'id'
=>
$forumobject
->
id
,
'mode'
=>
FORUM_CHOOSESUBSCRIBE
,
'sesskey'
=>
sesskey
())),
navigation_node
::
TYPE_SETTING
);
$forceforever
=
$mode
->
add
(
get_string
(
"subscriptionforced"
,
"forum"
),
new
moodle_url
(
'/mod/forum/subscribe.php'
,
array
(
'id'
=>
$forumobject
->
id
,
'mode'
=>
FORUM_FORCESUBSCRIBE
,
'sesskey'
=>
sesskey
())),
navigation_node
::
TYPE_SETTING
);
$forceforever
=
$mode
->
add
(
get_string
(
"subscriptionforced"
,
"forum"
),
new
moodle_url
(
'/mod/forum/subscribe.php'
,
array
(
'id'
=>
$forumobject
->
id
,
'mode'
=>
FORUM_FORCESUBSCRIBE
,
'sesskey'
=>
sesskey
())),
navigation_node
::
TYPE_SETTING
);
...
@@ -7156,18 +7157,22 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
...
@@ -7156,18 +7157,22 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
case
FORUM_CHOOSESUBSCRIBE
:
// 0
case
FORUM_CHOOSESUBSCRIBE
:
// 0
$allowchoice
->
action
=
null
;
$allowchoice
->
action
=
null
;
$allowchoice
->
add_class
(
'activesetting'
);
$allowchoice
->
add_class
(
'activesetting'
);
$allowchoice
->
icon
=
new
pix_icon
(
't/selected'
,
''
,
'mod_forum'
);
break
;
break
;
case
FORUM_FORCESUBSCRIBE
:
// 1
case
FORUM_FORCESUBSCRIBE
:
// 1
$forceforever
->
action
=
null
;
$forceforever
->
action
=
null
;
$forceforever
->
add_class
(
'activesetting'
);
$forceforever
->
add_class
(
'activesetting'
);
$forceforever
->
icon
=
new
pix_icon
(
't/selected'
,
''
,
'mod_forum'
);
break
;
break
;
case
FORUM_INITIALSUBSCRIBE
:
// 2
case
FORUM_INITIALSUBSCRIBE
:
// 2
$forceinitially
->
action
=
null
;
$forceinitially
->
action
=
null
;
$forceinitially
->
add_class
(
'activesetting'
);
$forceinitially
->
add_class
(
'activesetting'
);
$forceinitially
->
icon
=
new
pix_icon
(
't/selected'
,
''
,
'mod_forum'
);
break
;
break
;
case
FORUM_DISALLOWSUBSCRIBE
:
// 3
case
FORUM_DISALLOWSUBSCRIBE
:
// 3
$disallowchoice
->
action
=
null
;
$disallowchoice
->
action
=
null
;
$disallowchoice
->
add_class
(
'activesetting'
);
$disallowchoice
->
add_class
(
'activesetting'
);
$disallowchoice
->
icon
=
new
pix_icon
(
't/selected'
,
''
,
'mod_forum'
);
break
;
break
;
}
}
...
...
mod/forum/pix/t/selected.png
0 → 100644
View file @
01dc1c11
205 Bytes
mod/forum/pix/t/selected.svg
0 → 100644
View file @
01dc1c11
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"12"
height=
"12"
viewBox=
"0 0 12 12"
preserveAspectRatio=
"xMinYMid meet"
overflow=
"visible"
><path
d=
"M11.4.6l-.9-.5c-.4-.2-1-.1-1.3.4L4.7 8.2 2 6.6C1.5 6.3.9 6.5.6 7l-.5.8c-.2.5-.1 1.1.4 1.4L5 11.8c.1.1.3.1.4.1.4.1.8-.1 1-.5L11.8 2c.3-.5.1-1.1-.4-1.4z"
fill=
"#999"
/></svg>
\ No newline at end of file
theme/boost/scss/moodle/modules.scss
View file @
01dc1c11
...
@@ -91,6 +91,17 @@ select {
...
@@ -91,6 +91,17 @@ select {
}
}
}
}
}
}
// Style for the forum subscription mode node.
.subscriptionmode
{
color
:
$body-color
;
}
// Style for the currently selected subscription mode.
.activesetting
{
color
:
$body-color
;
font-weight
:
bold
;
}
}
}
.forumpost
{
.forumpost
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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