From 3f2c68f1193a98eea611f047940fa45bdf44b2e8 Mon Sep 17 00:00:00 2001 From: Mathew May Date: Thu, 7 Mar 2019 10:42:32 +0800 Subject: [PATCH] MDL-64506 templates: Move BS2 labels to BS4 badges --- admin/renderer.php | 42 +++++++------- .../external/data_request_exporter.php | 16 +++--- .../classes/output/my_data_requests_page.php | 8 +-- .../templates/my_data_requests.mustache | 10 ++-- .../templates/request_details.mustache | 4 +- .../course_competencies_page.mustache | 2 +- .../lp/templates/evidence_summary.mustache | 2 +- admin/tool/lp/templates/plans_page.mustache | 4 +- .../template_competencies_page.mustache | 2 +- .../user_competency_summary.mustache | 2 +- ...user_competency_summary_in_course.mustache | 2 +- .../user_competency_summary_in_plan.mustache | 4 +- .../classes/output/page_managedocs_list.php | 4 +- .../policy/templates/acceptances.mustache | 4 +- lib/templates/availability_info.mustache | 4 +- .../form_autocomplete_selection.mustache | 2 +- .../templates/message_content_item.mustache | 2 +- mod/lesson/essay.php | 6 +- mod/lti/templates/tool_card.mustache | 8 +-- mod/lti/templates/tool_proxy_card.mustache | 8 +-- tag/templates/taglist.mustache | 2 +- theme/boost/scss/moodle/bs2-compat.scss | 24 -------- theme/boost/style/moodle.css | 54 +----------------- theme/classic/style/moodle.css | 55 +------------------ user/templates/status_details.mustache | 2 +- user/templates/status_field.mustache | 2 +- 26 files changed, 75 insertions(+), 200 deletions(-) diff --git a/admin/renderer.php b/admin/renderer.php index 57eaa0efc07..257f82556bb 100644 --- a/admin/renderer.php +++ b/admin/renderer.php @@ -1066,7 +1066,7 @@ class core_admin_renderer extends plugin_renderer_base { $sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'), 'sourcetext label'); } else { $row->attributes['class'] .= ' extension'; - $sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext label label-info'); + $sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext badge badge-info'); } $coredependency = $plugin->is_core_dependency_satisfied($version); @@ -1078,19 +1078,19 @@ class core_admin_renderer extends plugin_renderer_base { $statusclass = 'statustext label '; switch ($statuscode) { case core_plugin_manager::PLUGIN_STATUS_NEW: - $statusclass .= $dependenciesok ? 'label-success' : 'label-warning'; + $statusclass .= $dependenciesok ? 'badge-success' : 'badge-warning'; break; case core_plugin_manager::PLUGIN_STATUS_UPGRADE: - $statusclass .= $dependenciesok ? 'label-info' : 'label-warning'; + $statusclass .= $dependenciesok ? 'badge-info' : 'badge-warning'; break; case core_plugin_manager::PLUGIN_STATUS_MISSING: case core_plugin_manager::PLUGIN_STATUS_DOWNGRADE: case core_plugin_manager::PLUGIN_STATUS_DELETE: - $statusclass .= 'label-important'; + $statusclass .= 'badge-danger'; break; case core_plugin_manager::PLUGIN_STATUS_NODB: case core_plugin_manager::PLUGIN_STATUS_UPTODATE: - $statusclass .= $dependenciesok ? '' : 'label-warning'; + $statusclass .= $dependenciesok ? '' : 'badge-warning'; break; } $status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass); @@ -1363,7 +1363,7 @@ class core_admin_renderer extends plugin_renderer_base { $supportedmoodles = array(); foreach ($plugin->version->supportedmoodles as $moodle) { if ($CFG->branch == str_replace('.', '', $moodle->release)) { - $supportedmoodles[] = html_writer::span($moodle->release, 'label label-success'); + $supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-success'); } else { $supportedmoodles[] = html_writer::span($moodle->release, 'label'); } @@ -1468,7 +1468,7 @@ class core_admin_renderer extends plugin_renderer_base { $label = ''; } else { $class = 'requires-failed'; - $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important'); + $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger'); } $requires[] = html_writer::tag('li', html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core'). @@ -1483,8 +1483,8 @@ class core_admin_renderer extends plugin_renderer_base { } else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_MISSING) { if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) { - $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-warning'); - $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning'); + $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-warning'); + $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning'); $class = 'requires-failed requires-missing requires-available'; $actions[] = html_writer::link( new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $reqname)), @@ -1492,24 +1492,24 @@ class core_admin_renderer extends plugin_renderer_base { ); } else { - $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-important'); + $label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-danger'); $label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'), - 'label label-important'); + 'badge badge-danger'); $class = 'requires-failed requires-missing requires-unavailable'; } $displayuploadlink = true; } else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OUTDATED) { if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) { - $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-warning'); - $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning'); + $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-warning'); + $label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning'); $class = 'requires-failed requires-outdated requires-available'; $displayupdateslink = true; } else { - $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important'); + $label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger'); $label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'), - 'label label-important'); + 'badge badge-danger'); $class = 'requires-failed requires-outdated requires-unavailable'; } $displayuploadlink = true; @@ -1773,13 +1773,13 @@ class core_admin_renderer extends plugin_renderer_base { $source = ''; } else { $row->attributes['class'] .= ' extension'; - $source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source label label-info'); + $source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge badge-info'); } if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) { - $msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg label label-important'); + $msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge badge-danger'); } else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) { - $msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg label label-success'); + $msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge badge-success'); } else { $msg = ''; } @@ -2018,13 +2018,13 @@ class core_admin_renderer extends plugin_renderer_base { // Format error or warning line if ($errorline) { $messagetype = 'error'; - $statusclass = 'label-important'; + $statusclass = 'badge-danger'; } else if ($warningline) { $messagetype = 'warn'; - $statusclass = 'label-warning'; + $statusclass = 'badge-warning'; } else { $messagetype = 'ok'; - $statusclass = 'label-success'; + $statusclass = 'badge-success'; } $status = html_writer::span($status, 'label ' . $statusclass); // Here we'll store all the feedback found diff --git a/admin/tool/dataprivacy/classes/external/data_request_exporter.php b/admin/tool/dataprivacy/classes/external/data_request_exporter.php index 2826fc81d7c..a309c8ed7da 100644 --- a/admin/tool/dataprivacy/classes/external/data_request_exporter.php +++ b/admin/tool/dataprivacy/classes/external/data_request_exporter.php @@ -160,36 +160,36 @@ class data_request_exporter extends persistent_exporter { switch ($this->persistent->get('status')) { case api::DATAREQUEST_STATUS_PENDING: - $values['statuslabelclass'] = 'label-info'; + $values['statuslabelclass'] = 'badge-info'; // Request can be manually completed for general enquiry requests. $values['canmarkcomplete'] = $requesttype == api::DATAREQUEST_TYPE_OTHERS; break; case api::DATAREQUEST_STATUS_AWAITING_APPROVAL: - $values['statuslabelclass'] = 'label-info'; + $values['statuslabelclass'] = 'badge-info'; // DPO can review the request once it's ready. $values['canreview'] = true; // Whether the DPO can approve or deny the request. $values['approvedeny'] = in_array($requesttype, [api::DATAREQUEST_TYPE_EXPORT, api::DATAREQUEST_TYPE_DELETE]); break; case api::DATAREQUEST_STATUS_APPROVED: - $values['statuslabelclass'] = 'label-info'; + $values['statuslabelclass'] = 'badge-info'; break; case api::DATAREQUEST_STATUS_PROCESSING: - $values['statuslabelclass'] = 'label-info'; + $values['statuslabelclass'] = 'badge-info'; break; case api::DATAREQUEST_STATUS_COMPLETE: case api::DATAREQUEST_STATUS_DOWNLOAD_READY: case api::DATAREQUEST_STATUS_DELETED: - $values['statuslabelclass'] = 'label-success'; + $values['statuslabelclass'] = 'badge-success'; break; case api::DATAREQUEST_STATUS_CANCELLED: - $values['statuslabelclass'] = 'label-warning'; + $values['statuslabelclass'] = 'badge-warning'; break; case api::DATAREQUEST_STATUS_REJECTED: - $values['statuslabelclass'] = 'label-important'; + $values['statuslabelclass'] = 'badge-danger'; break; case api::DATAREQUEST_STATUS_EXPIRED: - $values['statuslabelclass'] = 'label-default'; + $values['statuslabelclass'] = 'badge-secondary'; break; } diff --git a/admin/tool/dataprivacy/classes/output/my_data_requests_page.php b/admin/tool/dataprivacy/classes/output/my_data_requests_page.php index 729a7fe1710..b82579f8afb 100644 --- a/admin/tool/dataprivacy/classes/output/my_data_requests_page.php +++ b/admin/tool/dataprivacy/classes/output/my_data_requests_page.php @@ -106,12 +106,12 @@ class my_data_requests_page implements renderable, templatable { $cancancel = true; switch ($status) { case api::DATAREQUEST_STATUS_COMPLETE: - $item->statuslabelclass = 'label-success'; + $item->statuslabelclass = 'badge-success'; $item->statuslabel = get_string('statuscomplete', 'tool_dataprivacy'); $cancancel = false; break; case api::DATAREQUEST_STATUS_DOWNLOAD_READY: - $item->statuslabelclass = 'label-success'; + $item->statuslabelclass = 'badge-success'; $item->statuslabel = get_string('statusready', 'tool_dataprivacy'); $cancancel = false; $candownload = true; @@ -122,12 +122,12 @@ class my_data_requests_page implements renderable, templatable { } break; case api::DATAREQUEST_STATUS_DELETED: - $item->statuslabelclass = 'label-success'; + $item->statuslabelclass = 'badge-success'; $item->statuslabel = get_string('statusdeleted', 'tool_dataprivacy'); $cancancel = false; break; case api::DATAREQUEST_STATUS_EXPIRED: - $item->statuslabelclass = 'label-default'; + $item->statuslabelclass = 'badge-secondary'; $item->statuslabel = get_string('statusexpired', 'tool_dataprivacy'); $item->statuslabeltitle = get_string('downloadexpireduser', 'tool_dataprivacy'); $cancancel = false; diff --git a/admin/tool/dataprivacy/templates/my_data_requests.mustache b/admin/tool/dataprivacy/templates/my_data_requests.mustache index 6f00965f69f..1f544acbb0c 100644 --- a/admin/tool/dataprivacy/templates/my_data_requests.mustache +++ b/admin/tool/dataprivacy/templates/my_data_requests.mustache @@ -35,7 +35,7 @@ "id": 1, "typename" : "Data export", "comments": "I would like to download all of my daughter's personal data", - "statuslabelclass": "label-default", + "statuslabelclass": "badge-secondary", "statuslabel": "Pending", "timecreated" : 1517902087, "requestedbyuser" : { @@ -47,7 +47,7 @@ "id": 2, "typename" : "Data export", "comments": "Give me all of the information you have about me, or else...", - "statuslabelclass": "label-warning", + "statuslabelclass": "badge-warning", "statuslabel": "Awaiting completion", "timecreated" : 1517902087, "requestedbyuser" : { @@ -59,7 +59,7 @@ "id": 3, "typename" : "Data deletion", "comments": "Please delete all of my son's personal data.", - "statuslabelclass": "label-success", + "statuslabelclass": "badge-success", "statuslabel": "Deleted", "timecreated" : 1517902087, "requestedbyuser" : { @@ -83,7 +83,7 @@ "id": 5, "typename" : "Data export", "comments": "Please let me download my data", - "statuslabelclass": "label-info", + "statuslabelclass": "badge-info", "statuslabel": "Processing", "timecreated" : 1517902087, "requestedbyuser" : { @@ -140,7 +140,7 @@ {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}} {{requestedbyuser.fullname}} - {{statuslabel}} + {{statuslabel}} {{comments}} diff --git a/admin/tool/dataprivacy/templates/request_details.mustache b/admin/tool/dataprivacy/templates/request_details.mustache index 47c4f9892be..41f6aff2d31 100644 --- a/admin/tool/dataprivacy/templates/request_details.mustache +++ b/admin/tool/dataprivacy/templates/request_details.mustache @@ -49,7 +49,7 @@ "profileurl": "#" }, "statuslabel": "Pending", - "statuslabelclass": "label-default", + "statuslabelclass": "badge-secondary", "messagehtml": "

Hello,

I would like to download all of my personal data.

Thanks!

" } }} @@ -71,7 +71,7 @@ {{#str}}statusdetail, tool_dataprivacy{{/str}} - {{statuslabel}} + {{statuslabel}} {{#str}}requestbydetail, tool_dataprivacy{{/str}} diff --git a/admin/tool/lp/templates/course_competencies_page.mustache b/admin/tool/lp/templates/course_competencies_page.mustache index 6d89b202e40..4def99eac00 100644 --- a/admin/tool/lp/templates/course_competencies_page.mustache +++ b/admin/tool/lp/templates/course_competencies_page.mustache @@ -82,7 +82,7 @@ {{/comppath}} {{#usercompetencycourse}} {{#grade}} - {{gradename}} + {{gradename}} {{/grade}} {{/usercompetencycourse}} {{#canmanagecoursecompetencies}} diff --git a/admin/tool/lp/templates/evidence_summary.mustache b/admin/tool/lp/templates/evidence_summary.mustache index 06d7ca08fc5..90059eea36e 100644 --- a/admin/tool/lp/templates/evidence_summary.mustache +++ b/admin/tool/lp/templates/evidence_summary.mustache @@ -57,7 +57,7 @@ {{/actionuser}} {{#grade}} -

{{gradename}}

+

{{gradename}}

{{/grade}}

{{description}}

{{#note}} diff --git a/admin/tool/lp/templates/plans_page.mustache b/admin/tool/lp/templates/plans_page.mustache index 8a3af99518e..392038bc856 100644 --- a/admin/tool/lp/templates/plans_page.mustache +++ b/admin/tool/lp/templates/plans_page.mustache @@ -57,10 +57,10 @@ {{#isbasedontemplate}} - {{#str}}yes{{/str}} + {{#str}}yes{{/str}} {{/isbasedontemplate}} {{^isbasedontemplate}} - {{#str}}no{{/str}} + {{#str}}no{{/str}} {{/isbasedontemplate}} {{statusname}} diff --git a/admin/tool/lp/templates/template_competencies_page.mustache b/admin/tool/lp/templates/template_competencies_page.mustache index 0b6a4c7d1a6..12737889a70 100644 --- a/admin/tool/lp/templates/template_competencies_page.mustache +++ b/admin/tool/lp/templates/template_competencies_page.mustache @@ -60,7 +60,7 @@ {{/hascourses}} {{^hascourses}} - {{#str}}nolinkedcourses, tool_lp{{/str}} + {{#str}}nolinkedcourses, tool_lp{{/str}} {{/hascourses}} diff --git a/admin/tool/lp/templates/user_competency_summary.mustache b/admin/tool/lp/templates/user_competency_summary.mustache index 0e280f63e2d..29b29432d90 100644 --- a/admin/tool/lp/templates/user_competency_summary.mustache +++ b/admin/tool/lp/templates/user_competency_summary.mustache @@ -57,7 +57,7 @@
{{#str}}proficient, tool_lp{{/str}}
- + {{proficiencyname}}
diff --git a/admin/tool/lp/templates/user_competency_summary_in_course.mustache b/admin/tool/lp/templates/user_competency_summary_in_course.mustache index ce80bbbd5a4..90916b1757a 100644 --- a/admin/tool/lp/templates/user_competency_summary_in_course.mustache +++ b/admin/tool/lp/templates/user_competency_summary_in_course.mustache @@ -81,7 +81,7 @@ {{#usercompetencycourse}}
{{#str}}proficient, tool_lp{{/str}}
- + {{proficiencyname}}
diff --git a/admin/tool/lp/templates/user_competency_summary_in_plan.mustache b/admin/tool/lp/templates/user_competency_summary_in_plan.mustache index 7253af1dc39..2daf5e2f89e 100644 --- a/admin/tool/lp/templates/user_competency_summary_in_plan.mustache +++ b/admin/tool/lp/templates/user_competency_summary_in_plan.mustache @@ -68,7 +68,7 @@
{{#str}}proficient, tool_lp{{/str}}
- + {{proficiencyname}}
@@ -101,7 +101,7 @@
{{gradename}} - {{#str}}plancompleted, tool_lp{{/str}}
{{#str}}proficient, tool_lp{{/str}}
- + {{proficiencyname}}
diff --git a/admin/tool/policy/classes/output/page_managedocs_list.php b/admin/tool/policy/classes/output/page_managedocs_list.php index 1bb0dceb371..d69680789cf 100644 --- a/admin/tool/policy/classes/output/page_managedocs_list.php +++ b/admin/tool/policy/classes/output/page_managedocs_list.php @@ -152,9 +152,9 @@ class page_managedocs_list implements renderable, templatable { $version->statustext = get_string('status' . $status, 'tool_policy'); if ($status == policy_version::STATUS_ACTIVE) { - $version->statustext = html_writer::span($version->statustext, 'label label-success'); + $version->statustext = html_writer::span($version->statustext, 'badge badge-success'); } else if ($status == policy_version::STATUS_DRAFT) { - $version->statustext = html_writer::span($version->statustext, 'label label-warning'); + $version->statustext = html_writer::span($version->statustext, 'badge badge-warning'); } else { $version->statustext = html_writer::span($version->statustext, 'label'); } diff --git a/admin/tool/policy/templates/acceptances.mustache b/admin/tool/policy/templates/acceptances.mustache index 14470e8e6b0..339f513bf63 100644 --- a/admin/tool/policy/templates/acceptances.mustache +++ b/admin/tool/policy/templates/acceptances.mustache @@ -110,8 +110,8 @@ {{{revision}}} - {{#iscurrent}}{{#str}} status1, tool_policy {{/str}}{{/iscurrent}} - {{#isoptional}}{{#str}} policydocoptionalyes, tool_policy {{/str}}{{/isoptional}} + {{#iscurrent}}{{#str}} status1, tool_policy {{/str}}{{/iscurrent}} + {{#isoptional}}{{#str}} policydocoptionalyes, tool_policy {{/str}}{{/isoptional}} {{>tool_policy/user_agreement}} diff --git a/lib/templates/availability_info.mustache b/lib/templates/availability_info.mustache index 56cf9c37528..53b9bf2b910 100644 --- a/lib/templates/availability_info.mustache +++ b/lib/templates/availability_info.mustache @@ -52,10 +52,10 @@ {{#text}}
{{^isrestricted}} - {{{text}}} + {{{text}}} {{/isrestricted}} {{#isrestricted}} - {{#str}}restricted, core{{/str}} {{{text}}} + {{#str}}restricted, core{{/str}} {{{text}}} {{/isrestricted}}
{{/text}} diff --git a/lib/templates/form_autocomplete_selection.mustache b/lib/templates/form_autocomplete_selection.mustache index 5413dc33a9a..c3053112a48 100644 --- a/lib/templates/form_autocomplete_selection.mustache +++ b/lib/templates/form_autocomplete_selection.mustache @@ -40,7 +40,7 @@
{{#str}}selecteditems, form{{/str}} {{#items}} - + {{#multiple}}{{/multiple}}{{{label}}} {{/items}} diff --git a/message/output/popup/templates/message_content_item.mustache b/message/output/popup/templates/message_content_item.mustache index 8af83b262d7..f24a8aeb424 100644 --- a/message/output/popup/templates/message_content_item.mustache +++ b/message/output/popup/templates/message_content_item.mustache @@ -69,7 +69,7 @@

- {{unreadcount}} + {{unreadcount}}
diff --git a/mod/lesson/essay.php b/mod/lesson/essay.php index 19382e9d8fa..eedcc010cd3 100644 --- a/mod/lesson/essay.php +++ b/mod/lesson/essay.php @@ -409,13 +409,13 @@ switch ($mode) { // Different colors for all the states of an essay (graded, if sent, not graded) if (!$essayinfo->graded) { - $class = "label label-warning"; + $class = "badge badge-warning"; $status = get_string('notgraded', 'lesson'); } elseif (!$essayinfo->sent) { - $class = "label label-success"; + $class = "badge badge-success"; $status = get_string('graded', 'lesson'); } else { - $class = "label label-success"; + $class = "badge badge-success"; $status = get_string('sent', 'lesson'); } $attributes = array('tabindex' => 0); diff --git a/mod/lti/templates/tool_card.mustache b/mod/lti/templates/tool_card.mustache index dba58633cdb..9905ea5e2d2 100644 --- a/mod/lti/templates/tool_card.mustache +++ b/mod/lti/templates/tool_card.mustache @@ -55,10 +55,10 @@
+ {{#state.pending}}badge-info{{/state.pending}} + {{#state.configured}}badge-success{{/state.configured}} + {{#state.rejected}}badge-danger{{/state.rejected}} + {{#state.unknown}}badge-warning{{/state.unknown}}"> {{state.text}}
diff --git a/mod/lti/templates/tool_proxy_card.mustache b/mod/lti/templates/tool_proxy_card.mustache index 8c59b9807f1..f671876c8fb 100644 --- a/mod/lti/templates/tool_proxy_card.mustache +++ b/mod/lti/templates/tool_proxy_card.mustache @@ -55,10 +55,10 @@
+ {{#state.pending}}badge-info{{/state.pending}} + {{#state.configured}}badge-success{{/state.configured}} + {{#state.rejected}}badge-danger{{/state.rejected}} + {{#state.unknown}}badge-warning{{/state.unknown}}"> {{state.text}}
diff --git a/tag/templates/taglist.mustache b/tag/templates/taglist.mustache index 68d1da8864d..72975fd8068 100644 --- a/tag/templates/taglist.mustache +++ b/tag/templates/taglist.mustache @@ -52,7 +52,7 @@
    {{#tags}}
  • - + {{#flag}} {{name}} {{/flag}} diff --git a/theme/boost/scss/moodle/bs2-compat.scss b/theme/boost/scss/moodle/bs2-compat.scss index 4e7bc0afccf..8e48384c252 100644 --- a/theme/boost/scss/moodle/bs2-compat.scss +++ b/theme/boost/scss/moodle/bs2-compat.scss @@ -18,8 +18,6 @@ @extend .btn-secondary; } -// Labels and badges. - .label { @extend .tag; @include tag-variant($tag-default-bg); @@ -41,28 +39,6 @@ @include tag-variant($tag-danger-bg); } -.badge { - @extend .tag; - @include tag-variant($tag-default-bg); - @include border-radius($font-size-root / 2); -} - -.badge-success { - @include tag-variant($tag-success-bg); -} - -.badge-info { - @include tag-variant($tag-info-bg); -} - -.badge-warning { - @include tag-variant($tag-warning-bg); -} - -.badge-important { - @include tag-variant($tag-danger-bg); -} - // Floats. .pull-left { @include pull-left(); diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index b2e68c25580..9e8e705b191 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -8520,7 +8520,7 @@ a.dimmed_text:visited, /* stylelint-disable function-url-scheme-blacklist */ /* stylelint-enable function-url-scheme-blacklist */ .tag, .statusok, .statuswarning, .statusserious, -.statuscritical, .que .correctness, .label, .badge { +.statuscritical, .que .correctness { display: inline-block; padding: 0.25rem 0.4em; font-size: 75%; @@ -8531,7 +8531,7 @@ a.dimmed_text:visited, white-space: nowrap; vertical-align: baseline; } .tag:empty, .statusok:empty, .statuswarning:empty, .statusserious:empty, - .statuscritical:empty, .que .correctness:empty, .label:empty, .badge:empty { + .statuscritical:empty, .que .correctness:empty { display: none; } .form-control-success, @@ -16606,56 +16606,6 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont margin-left: -15px; width: 275px; } -.label { - background-color: #868e96; } - .label[href]:hover, .label[href]:focus { - background-color: #6c757d; } - -.label-success { - background-color: #5cb85c; } - .label-success[href]:hover, .label-success[href]:focus { - background-color: #449d44; } - -.label-info { - background-color: #5bc0de; } - .label-info[href]:hover, .label-info[href]:focus { - background-color: #31b0d5; } - -.label-warning { - background-color: #ff7518; } - .label-warning[href]:hover, .label-warning[href]:focus { - background-color: #e45c00; } - -.label-important { - background-color: #d9534f; } - .label-important[href]:hover, .label-important[href]:focus { - background-color: #c9302c; } - -.badge { - background-color: #868e96; } - .badge[href]:hover, .badge[href]:focus { - background-color: #6c757d; } - -.badge-success { - background-color: #5cb85c; } - .badge-success[href]:hover, .badge-success[href]:focus { - background-color: #449d44; } - -.badge-info { - background-color: #5bc0de; } - .badge-info[href]:hover, .badge-info[href]:focus { - background-color: #31b0d5; } - -.badge-warning { - background-color: #ff7518; } - .badge-warning[href]:hover, .badge-warning[href]:focus { - background-color: #e45c00; } - -.badge-important { - background-color: #d9534f; } - .badge-important[href]:hover, .badge-important[href]:focus { - background-color: #c9302c; } - .pull-left { float: left !important; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 49db17236c7..998d450a9dc 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -8753,7 +8753,7 @@ a.dimmed_text:visited, /* stylelint-disable function-url-scheme-blacklist */ /* stylelint-enable function-url-scheme-blacklist */ .tag, .statusok, .statuswarning, .statusserious, -.statuscritical, .que .correctness, .label, .badge { +.statuscritical, .que .correctness { display: inline-block; padding: 0.25rem 0.4em; font-size: 75%; @@ -8765,7 +8765,7 @@ a.dimmed_text:visited, vertical-align: baseline; border-radius: 0.25rem; } .tag:empty, .statusok:empty, .statuswarning:empty, .statusserious:empty, - .statuscritical:empty, .que .correctness:empty, .label:empty, .badge:empty { + .statuscritical:empty, .que .correctness:empty { display: none; } .form-control-success, @@ -16871,57 +16871,6 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont margin-left: -15px; width: 275px; } -.label { - background-color: #868e96; } - .label[href]:hover, .label[href]:focus { - background-color: #6c757d; } - -.label-success { - background-color: #5cb85c; } - .label-success[href]:hover, .label-success[href]:focus { - background-color: #449d44; } - -.label-info { - background-color: #5bc0de; } - .label-info[href]:hover, .label-info[href]:focus { - background-color: #31b0d5; } - -.label-warning { - background-color: #ff7518; } - .label-warning[href]:hover, .label-warning[href]:focus { - background-color: #e45c00; } - -.label-important { - background-color: #d9534f; } - .label-important[href]:hover, .label-important[href]:focus { - background-color: #c9302c; } - -.badge { - background-color: #868e96; - border-radius: 0.46875rem; } - .badge[href]:hover, .badge[href]:focus { - background-color: #6c757d; } - -.badge-success { - background-color: #5cb85c; } - .badge-success[href]:hover, .badge-success[href]:focus { - background-color: #449d44; } - -.badge-info { - background-color: #5bc0de; } - .badge-info[href]:hover, .badge-info[href]:focus { - background-color: #31b0d5; } - -.badge-warning { - background-color: #ff7518; } - .badge-warning[href]:hover, .badge-warning[href]:focus { - background-color: #e45c00; } - -.badge-important { - background-color: #d9534f; } - .badge-important[href]:hover, .badge-important[href]:focus { - background-color: #c9302c; } - .pull-left { float: left !important; } diff --git a/user/templates/status_details.mustache b/user/templates/status_details.mustache index 571798e42c4..0e8ac02d372 100644 --- a/user/templates/status_details.mustache +++ b/user/templates/status_details.mustache @@ -35,7 +35,7 @@ "coursename": "TC 1", "enrolinstancename": "Manual enrolment", "status": "Active", - "statusclass": "label label-success", + "statusclass": "badge badge-success", "timestart": "1 January 2017", "timeend": "31 January 2018", "timeenrolled": "31 December 2016" diff --git a/user/templates/status_field.mustache b/user/templates/status_field.mustache index 4235fc56381..0a7df742aa9 100644 --- a/user/templates/status_field.mustache +++ b/user/templates/status_field.mustache @@ -61,7 +61,7 @@ }}