From b7087ee353b4934c0f587c30ff3f31edba584fde Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Mon, 4 Sep 2023 16:14:12 +0800 Subject: [PATCH] MDL-79250 admin: Add title to external_content_banner template --- admin/renderer.php | 6 ++++-- lang/en/admin.php | 2 ++ lib/templates/external_content_banner.mustache | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/renderer.php b/admin/renderer.php index 0c66010ed73..30365a17741 100644 --- a/admin/renderer.php +++ b/admin/renderer.php @@ -898,7 +898,8 @@ class core_admin_renderer extends plugin_renderer_base { $url = "https://campaign.moodle.org/current/lms/{$lang}/install/"; $params = [ 'url' => $url, - 'iframeid' => 'campaign-content' + 'iframeid' => 'campaign-content', + 'title' => get_string('campaign', 'admin'), ]; return $this->render_from_template('core/external_content_banner', $params); @@ -919,7 +920,8 @@ class core_admin_renderer extends plugin_renderer_base { $url = "https://campaign.moodle.org/current/lms/{$lang}/servicesandsupport/"; $params = [ 'url' => $url, - 'iframeid' => 'services-support-content' + 'iframeid' => 'services-support-content', + 'title' => get_string('supportandservices', 'admin'), ]; return $this->render_from_template('core/external_content_banner', $params); diff --git a/lang/en/admin.php b/lang/en/admin.php index 1b26f02ff8a..258290ad683 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -114,6 +114,7 @@ $string['calendarsettings'] = 'Calendar'; $string['calendartype'] = 'Calendar type'; $string['calendartype_desc'] = 'Choose a default calendar type for the whole site. This setting can be overridden in the course settings or by users in their personal profile.'; $string['calendar_weekend'] = 'Weekend days'; +$string['campaign'] = 'Campaign'; $string['cannotdeletemodfilter'] = 'You cannot uninstall the \'{$a->filter}\' because it is part of the \'{$a->module}\' module.'; $string['cannotuninstall'] = '{$a} can not be uninstalled.'; $string['categoryemail'] = 'Email'; @@ -1295,6 +1296,7 @@ $string['stickyblocksmymoodle'] = 'My Moodle'; $string['stickyblockspagetype'] = 'Page type to configure'; $string['strictformsrequired'] = 'Strict validation of required fields'; $string['stripalltitletags'] = 'Remove HTML tags from all activity names'; +$string['supportandservices'] = 'Support and services'; $string['supportcontact'] = 'Support contact'; $string['supportemail'] = 'Support email'; $string['supportemailsubject'] = 'Site support request - {$a}'; diff --git a/lib/templates/external_content_banner.mustache b/lib/templates/external_content_banner.mustache index b6b2595164d..1da7d505981 100644 --- a/lib/templates/external_content_banner.mustache +++ b/lib/templates/external_content_banner.mustache @@ -34,10 +34,11 @@ { "iframeid": "external-content", "url": "http://example.com/link", + "title": "External content" } }}
- +
{{#js}} (function() {