Skip to content

Commit

Permalink
MDL-74250 core: Improve indicator that link opens in new window
Browse files Browse the repository at this point in the history
  • Loading branch information
adpe committed May 27, 2022
1 parent 117b240 commit 4384778
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 3 additions & 4 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -4179,12 +4179,12 @@ public function supportemail(array $customattribs = []): string {
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'];
}
Expand All @@ -4209,8 +4209,7 @@ public function services_support_link(): string {
}

$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;

Expand Down
2 changes: 1 addition & 1 deletion lib/templates/local/notification/cta.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 3 additions & 2 deletions lib/templates/userfeedback_footer_link.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 4384778

Please sign in to comment.