mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +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
1 changed files with 7 additions and 2 deletions
|
@ -160,8 +160,13 @@ class core_renderer extends \core_renderer {
|
||||||
$heading = format_string($this->page->course->fullname, true, ['context' => $context]);
|
$heading = format_string($this->page->course->fullname, true, ['context' => $context]);
|
||||||
} else {
|
} else {
|
||||||
$heading = $this->page->cm->get_formatted_name();
|
$heading = $this->page->cm->get_formatted_name();
|
||||||
$imagedata = html_writer::img($this->page->cm->get_icon_url()->out(false), '',
|
$iconurl = $this->page->cm->get_icon_url();
|
||||||
['class' => 'icon activityicon', 'aria-hidden' => 'true']);
|
$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 = plugin_supports('mod', $this->page->activityname, FEATURE_MOD_PURPOSE);
|
||||||
$purposeclass .= ' activityiconcontainer';
|
$purposeclass .= ' activityiconcontainer';
|
||||||
$purposeclass .= ' modicon_' . $this->page->activityname;
|
$purposeclass .= ' modicon_' . $this->page->activityname;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue