Skip to content

Commit ceacb6c

Browse files
MDL-74046 tool_lp: new-tab for competency frameworks repo link
2 parents 8e37ada + d9f0159 commit ceacb6c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

public/admin/tool/lp/classes/output/manage_competency_frameworks_page.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
use templatable;
2929
use renderer_base;
3030
use single_button;
31+
use action_link;
3132
use stdClass;
3233
use moodle_url;
3334
use context;
3435
use context_system;
36+
use core\output\local\properties\button;
3537
use core_competency\api;
3638
use core_competency\competency_framework;
3739
use core_competency\external\competency_framework_exporter;
@@ -65,6 +67,8 @@ class manage_competency_frameworks_page implements renderable, templatable {
6567
* @param context $pagecontext The page context
6668
*/
6769
public function __construct(context $pagecontext) {
70+
global $OUTPUT;
71+
6872
$this->pagecontext = $pagecontext;
6973

7074
if (competency_framework::can_manage_context($this->pagecontext)) {
@@ -74,10 +78,13 @@ public function __construct(context $pagecontext) {
7478
'get'
7579
);
7680
$this->navigation[] = $addpage;
77-
$competenciesrepository = new single_button(
81+
82+
$icon = $OUTPUT->pix_icon('i/externallink', get_string('opensinnewwindow'), 'moodle', ['class' => 'ms-1']);
83+
$competenciesrepository = new action_link(
7884
new moodle_url('https://moodle.net/search', ['q' => 'competency frameworks']),
79-
get_string('competencyframeworksrepository', 'tool_lp'),
80-
'get'
85+
get_string('competencyframeworksrepository', 'tool_lp') . $icon,
86+
null,
87+
['target' => '_blank', 'class' => button::SECONDARY->classes() . ' ms-sm-2'],
8188
);
8289
$this->navigation[] = $competenciesrepository;
8390
}

0 commit comments

Comments
 (0)