diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 228960802f3..2aa8443e03d 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -4128,6 +4128,24 @@ EOD; return $this->doc_link($path, $text); } + /** + * Returns the HTML for the site support email link + * + * @return string The html code for the support email link. + */ + public function supportemail(): string { + global $CFG; + + if (empty($CFG->supportemail)) { + return ''; + } + + $supportemail = $CFG->supportemail; + $label = get_string('contactsitesupport', 'admin'); + $icon = $this->pix_icon('t/email', '', 'moodle', ['class' => 'iconhelp icon-pre']); + return html_writer::tag('a', $icon . $label, ['href' => 'mailto:' . $supportemail]); + } + /** * Returns the page heading menu. * diff --git a/theme/boost/templates/footer.mustache b/theme/boost/templates/footer.mustache index 70c72ed4482..20b1ca48d31 100644 --- a/theme/boost/templates/footer.mustache +++ b/theme/boost/templates/footer.mustache @@ -42,7 +42,11 @@ {{{ output.page_doc_link }}} {{/ output.page_doc_link }} - + {{# output.supportemail }} + + {{/ output.supportemail }}