MDL-72984 output: add support email to footer popover

This commit is contained in:
Simey Lameze 2021-11-24 20:54:26 +08:00
parent eadf157068
commit 4c5db7e80f
2 changed files with 23 additions and 1 deletions

View File

@ -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.
*

View File

@ -42,7 +42,11 @@
{{{ output.page_doc_link }}}
</div>
{{/ output.page_doc_link }}
{{# output.supportemail }}
<div class="footer-section p-3 border-bottom">
{{{ output.supportemail }}}
</div>
{{/ output.supportemail }}
<div class="footer-section p-3 border-bottom">
<div class="logininfo">
{{{ output.login_info }}}