2828use templatable ;
2929use renderer_base ;
3030use single_button ;
31+ use action_link ;
3132use stdClass ;
3233use moodle_url ;
3334use context ;
3435use context_system ;
36+ use core \output \local \properties \button ;
3537use core_competency \api ;
3638use core_competency \competency_framework ;
3739use 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