mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-77105 theme_boost: Add 'nofilter' class when necessary
Add the `.nofilter` class for activity icons when the icon URL's `filtericon` parameter is not set, so they get rendered as they are on the context header on the activity page.
This commit is contained in:
parent
95d0e30eff
commit
cf09a7f253
@ -160,8 +160,13 @@ class core_renderer extends \core_renderer {
|
||||
$heading = format_string($this->page->course->fullname, true, ['context' => $context]);
|
||||
} else {
|
||||
$heading = $this->page->cm->get_formatted_name();
|
||||
$imagedata = html_writer::img($this->page->cm->get_icon_url()->out(false), '',
|
||||
['class' => 'icon activityicon', 'aria-hidden' => 'true']);
|
||||
$iconurl = $this->page->cm->get_icon_url();
|
||||
$iconclass = $iconurl->get_param('filtericon') ? '' : 'nofilter';
|
||||
$iconattrs = [
|
||||
'class' => "icon activityicon $iconclass",
|
||||
'aria-hidden' => 'true'
|
||||
];
|
||||
$imagedata = html_writer::img($iconurl->out(false), '', $iconattrs);
|
||||
$purposeclass = plugin_supports('mod', $this->page->activityname, FEATURE_MOD_PURPOSE);
|
||||
$purposeclass .= ' activityiconcontainer';
|
||||
$purposeclass .= ' modicon_' . $this->page->activityname;
|
||||
|
Loading…
x
Reference in New Issue
Block a user