MDL-74250 core: Improve indicator that link opens in new window

This commit is contained in:
Adrian Perez 2022-03-17 12:08:30 +01:00
parent 117b24013b
commit 43847787e0
3 changed files with 7 additions and 7 deletions

View File

@ -4179,12 +4179,12 @@ EOD;
global $CFG;
$label = get_string('contactsitesupport', 'admin');
$icon = $this->pix_icon('t/email', '', 'moodle', ['class' => 'iconhelp icon-pre']);
$icon = $this->pix_icon('t/email', '');
$content = $icon . $label;
if (!empty($CFG->supportpage)) {
$attributes = ['href' => $CFG->supportpage, 'target' => 'blank'];
$content .= $this->pix_icon('i/externallink', '', 'moodle', ['class' => 'iconhelp icon-pre']);
$content .= $this->pix_icon('i/externallink', '', 'moodle', ['class' => 'ml-1']);
} else {
$attributes = ['href' => $CFG->wwwroot . '/user/contactsitesupport.php'];
}
@ -4209,8 +4209,7 @@ EOD;
}
$liferingicon = $this->pix_icon('t/life-ring', '', 'moodle', ['class' => 'fa fa-life-ring']);
$newwindowicon = $this->pix_icon('i/externallink', get_string('opensinnewwindow'), 'moodle',
['class' => 'fa fa-externallink fa-fw']);
$newwindowicon = $this->pix_icon('i/externallink', get_string('opensinnewwindow'), 'moodle', ['class' => 'ml-1']);
$link = 'https://moodle.com/help/?utm_source=CTA-banner&utm_medium=platform&utm_campaign=name~Moodle4+cat~lms+mp~no';
$content = $liferingicon . get_string('moodleservicesandsupport') . $newwindowicon;

View File

@ -61,7 +61,7 @@
{{# data }}
data-{{ name }}="{{ value }}"
{{/ data }}
>{{ title }} {{#newwindow}}{{#pix}}i/externallink, core, {{#str}}opensinnewwindow{{/str}}{{/pix}}{{/newwindow}}</a>
>{{ title }}{{#newwindow}}<span class="ml-1">{{#pix}}i/externallink, core, {{#str}}opensinnewwindow{{/str}}{{/pix}}</span>{{/newwindow}}</a>
{{/ actions }}
</div>
</div>

View File

@ -25,7 +25,8 @@
}
}}
{{# pix }} i/bullhorn, core {{/ pix }}
<a href="{{url}}" target="_blank">
{{#str}}calltofeedback_give{{/str}} {{#pix}}i/externallink, core, {{#str}}opensinnewwindow{{/str}}{{/pix}}
{{#pix}}i/bullhorn, core{{/pix}}{{!
}}{{#str}}calltofeedback_give{{/str}}{{!
}}<span class="ml-1">{{#pix}}i/externallink, core, {{#str}}opensinnewwindow{{/str}}{{/pix}}</span>
</a>