MDL-75669 theme_boost: Fix list-group usages for BS5

- The .list-group-item elements in BS5 require an outer .list-group container.
  Some uses in core were missing the outer group item and need fixing.
This commit is contained in:
Mikel Martín
2025-01-28 08:53:56 +01:00
parent 66c8eb19e1
commit ba30b66e19
2 changed files with 7 additions and 7 deletions
@@ -36,7 +36,7 @@
]
}
}}
<div role="list">
<div class="list-group" role="list">
{{#courses}}
<div class="course-summaryitem list-group-item course-listitem border-start-0 border-end-0 border-top-0 px-2 rounded-0" role="listitem"
data-region="course-content"
+6 -6
View File
@@ -119,11 +119,11 @@ class core_course_management_renderer extends plugin_renderer_base {
$listing = core_course_category::top()->get_children();
$attributes = array(
'class' => 'ms-1 list-unstyled',
'role' => 'tree',
'aria-labelledby' => 'category-listing-title'
);
$attributes = [
'class' => 'ms-1 list-unstyled list-group',
'role' => 'tree',
'aria-labelledby' => 'category-listing-title',
];
$html = html_writer::start_div('category-listing card w-100');
$html .= html_writer::tag('h3', get_string('categories'),
@@ -525,7 +525,7 @@ class core_course_management_renderer extends plugin_renderer_base {
$html .= html_writer::start_div('card-body');
$html .= $this->course_listing_actions($category, $course, $perpage);
$html .= $this->listing_pagination($category, $page, $perpage, false, $viewmode);
$html .= html_writer::start_tag('ul', array('class' => 'ml course-list'));
$html .= html_writer::start_tag('ul', ['class' => 'course-list list-group', 'role' => 'list']);
foreach ($category->get_courses($options) as $listitem) {
$html .= $this->course_listitem($category, $listitem, $courseid);
}