From 196b465fde824ad460771c3bcf3ac1d04562140b Mon Sep 17 00:00:00 2001 From: Alexander Bias <alexander.bias@uni-ulm.de> Date: Sun, 14 Feb 2021 17:09:01 +0100 Subject: [PATCH] Make Mustache lint happier --- templates/activity_settings_incourse.mustache | 5 +-- templates/columns2.mustache | 14 ++++---- templates/full_header.mustache | 2 -- templates/imagearea.mustache | 7 ++-- templates/login.mustache | 36 ++++++++++--------- templates/settings_link_page.mustache | 4 ++- 6 files changed, 35 insertions(+), 33 deletions(-) diff --git a/templates/activity_settings_incourse.mustache b/templates/activity_settings_incourse.mustache index d76a975..710f0ec 100644 --- a/templates/activity_settings_incourse.mustache +++ b/templates/activity_settings_incourse.mustache @@ -24,11 +24,13 @@ "activitynode": { "text": "Root of menu", "key": "test0", + "action": "https://mymoodle.org/action", "display": true, "children": [ { "text": "Child of menu", "key": "test1", + "action": "https://mymoodle.org/action", "display": true, "children": [] } @@ -43,8 +45,7 @@ * Removed check for !is_short_branch to display all children of the course settings within an own tab. }} -<div id="boost-campus-activity-settings" class="card" > - <h2>{{incourse_activitynode_heading}}</h2> +<div id="boost-campus-activity-settings" class="card"> <div class="mx-2 pt-2"> <ul class="nav nav-tabs" role="tablist"> <!-- First the top most activitynode and immediate children --> diff --git a/templates/columns2.mustache b/templates/columns2.mustache index 0337236..0219afd 100644 --- a/templates/columns2.mustache +++ b/templates/columns2.mustache @@ -55,15 +55,15 @@ "navdraweropen":true, "regionmainsettingsmenu": "", "hasregionmainsettingsmenu": false, - "pagebottomelements": ""., - "timedinfobannershowonselectedpage":true, - "timedibcontent": "This is a test content for perpetual info banner.", - "timedibcss": danger, - "perpinfobannershowonselectedpage":true, + "pagebottomelements": "", + "timedinfobannershowonselectedpage": true, + "timedibcontent": "This is a test content for timed info banner.", + "timedibcss": "danger", + "perpinfobannershowonselectedpage": true, "perpibcontent": "This is a test content for perpetual info banner.", - "perpibcss": primary, + "perpibcss": "primary", "perpibdismiss": true, - "infobannerconfirmationdialogue" : true, + "infobannerconfirmationdialogue": true, "bcbttbutton": true } }} diff --git a/templates/full_header.mustache b/templates/full_header.mustache index a4d4b24..55cd986 100644 --- a/templates/full_header.mustache +++ b/templates/full_header.mustache @@ -27,8 +27,6 @@ "navbar": "navbar_if_available", "courseheader": "course_header_html" } - - Page header. }} {{! MODIFICATION: * Changed the order of the settingsmenu item. diff --git a/templates/imagearea.mustache b/templates/imagearea.mustache index c008db9..f7d9fed 100644 --- a/templates/imagearea.mustache +++ b/templates/imagearea.mustache @@ -26,16 +26,15 @@ * filepath - the path where the uploaded image is stored. * alttext - the text that will be set for the alt attribute of an image, if set - Example context (json): + Example context (json): { - "hasimagearea" : true, + "hasimagearea": true, "imageareafiles": { "filepath": "/pix/moodlelogo.png", - "linkpath": "http://moodle.org" + "linkpath": "http://moodle.org", "alttext": "Moodle logo" } } - }} {{#hasimagearea}} diff --git a/templates/login.mustache b/templates/login.mustache index 6b7624e..6c84bf0 100644 --- a/templates/login.mustache +++ b/templates/login.mustache @@ -19,33 +19,36 @@ Login page template + Context variables required for this template: + * pagebottomelements - HTML for all additional layout elements: the footnote. + * timedinfobannershowonselectedpage - true if the time controlled info banner should be displayed. + * timedetualinfobannercontent - The content that should be shown in the time controled information banner. + * timedetualinfobannercssclass - The Bootstrap class that is used for the time controlled info banner. + * perpinfobannershowonselectedpage - true if the info banner should be displayed. + * perpibcontent - The content that should be shown in the information banner. + * perpibcss - The Bootstrap class that is used for the info banner. + Example context (json): { "output": { "doctype": "<!DOCTYPE html>", "page_title": "Login page", "favicon": "favicon.ico", - "main_content": "<h1>Headers keep HTML validators happy</h1>", - "timedinfobannershowonselectedpage":true, - "timedibcontent": "This is a test content for perpetual info banner.", - "timedibcss": danger, - "perpinfobannershowonselectedpage": true, - "perpibcontent": "This is a test content.", - "perpibcss": primary, - "perpibdismiss": true - } - * pagebottomelements - HTML for all additional layout elements: the footnote. - * timedinfobannershowonselectedpage - true if the time controlled info banner should be displayed. - * timedetualinfobannercontent - The content that should be shown in the time controled information banner. - * timedetualinfobannercssclass - The Bootstrap class that is used for the time controlled info banner. - * perpinfobannershowonselectedpage - true if the info banner should be displayed. - * perpibcontent - The content that should be shown in the information banner. - * perpibcss - The Bootstrap class that is used for the info banner. + "main_content": "<h1>Headers keep HTML validators happy</h1>" + }, + "timedinfobannershowonselectedpage": true, + "timedibcontent": "This is a test content for timed info banner.", + "timedibcss": "danger", + "perpinfobannershowonselectedpage": true, + "perpibcontent": "This is a test content for perpetual info banner.", + "perpibcss": "primary", + "perpibdismiss": true } }} {{! MODIFICATION: * Add own additional layout elements: the footnote. * Added the possibility to show information banners. + * Added the login background image text elements. }} {{> theme_boost/head }} @@ -103,7 +106,6 @@ {{> theme_boost_campus/footnote }} </div> - </body> </html> {{#js}} diff --git a/templates/settings_link_page.mustache b/templates/settings_link_page.mustache index ad3708d..ac3852b 100644 --- a/templates/settings_link_page.mustache +++ b/templates/settings_link_page.mustache @@ -24,11 +24,13 @@ "node": { "text": "Root of menu", "key": "test0", + "action": "https://mymoodle.org/action", "display": true, "children": [ { "text": "Child of menu", "key": "test1", + "action": "https://mymoodle.org/action", "display": true, "children": [] } @@ -42,7 +44,7 @@ * Removed check for !is_short_branch to display all children of the course settings within an own tab. }} -<div id="boost-campus-course-settings" class="card" > +<div id="boost-campus-course-settings" class="card"> <div class="mx-2 pt-2"> <ul class="nav nav-tabs" role="tablist"> <!-- First the top most node and immediate children --> -- GitLab