aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2026-03-22 16:13:59 +0100
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2026-03-22 16:13:59 +0100
commit1620fc15d1d21989fb38d9f3596cdf03f8535ff5 (patch)
treefe16b79cba4b1105ccbc9c4ab16b4b606dd10950 /templates
parentdda96cbbdf9237d90297ed1559f0a4d27713b2ec (diff)
implement logic that may collapse list, fixes #6380biest-6380
Diffstat (limited to 'templates')
-rw-r--r--templates/dates/course_date_list.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/templates/dates/course_date_list.php b/templates/dates/course_date_list.php
index bcc9eb7..5f2fd56 100644
--- a/templates/dates/course_date_list.php
+++ b/templates/dates/course_date_list.php
@@ -3,14 +3,25 @@
* @var CourseDateList $collection
* @var bool $with_room_names
* @var bool $with_cancelled_dates
+ * @var bool $as_collapsible_list
*
* @var SeminarCycleDate $regular_date
* @var CourseDate $single_date
* @var CourseExDate $cancelled_date
*/
?>
+<?php
+$html_attributes = HTMLAttributes::from([
+ 'class' => 'list-unstyled',
+]);
+
+if ($as_collapsible_list) {
+ $html_attributes['class'] = 'collapsible-list';
+ $html_attributes['data-label'] = _('Termine');
+}
+?>
<? if (!$collection->isEmpty()) : ?>
- <ul class="list-unstyled">
+ <ul <?= $html_attributes ?>>
<? foreach ($collection->getRegularDates() as $regular_date) : ?>
<li>
<?= $regular_date->toString($with_room_names ? 'long-start' : 'long-start-without-room', true) ?>