diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2022-05-27 09:59:12 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-05-27 09:59:12 +0000 |
| commit | 74cde461f8dd1b0b83ea9e031822603e9c280b56 (patch) | |
| tree | 1b1da650263c78e5df9d3751c7d74d0b8919d1d2 /templates/dates | |
| parent | 956957c167dfc9675d1ec14a23e3fe75bf6c1a8d (diff) | |
fix for BIESt #971
Closes #971
Merge request studip/studip!578
Diffstat (limited to 'templates/dates')
| -rw-r--r-- | templates/dates/_seminar_rooms.php | 1 | ||||
| -rw-r--r-- | templates/dates/seminar_export.php | 3 | ||||
| -rw-r--r-- | templates/dates/seminar_html.php | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/templates/dates/_seminar_rooms.php b/templates/dates/_seminar_rooms.php index 58d940a..c10fa45 100644 --- a/templates/dates/_seminar_rooms.php +++ b/templates/dates/_seminar_rooms.php @@ -8,6 +8,7 @@ $hide_empty = $hide_empty ?? false; $limit = $limit ?? 3; $assigned = $assigned ?: []; $freetext = $freetext ?: []; +$plain = $plain ?? false; if ($assigned || $freetext) { if ($assigned) { diff --git a/templates/dates/seminar_export.php b/templates/dates/seminar_export.php index 944e02c..ae6fd1b 100644 --- a/templates/dates/seminar_export.php +++ b/templates/dates/seminar_export.php @@ -40,6 +40,9 @@ if (!empty($dates['regular']['turnus_data']) || !empty($dates['irregular'])) : if (is_array($dates['irregular'])): foreach ($dates['irregular'] as $date) : + if (!isset($irregular_rooms[$date['resource_id']])) { + $irregular_rooms[$date['resource_id']] = 0; + } $irregular[] = $date; $irregular_strings[] = $date['tostring']; if ($date['resource_id']) : diff --git a/templates/dates/seminar_html.php b/templates/dates/seminar_html.php index c59b5ce..2680287 100644 --- a/templates/dates/seminar_html.php +++ b/templates/dates/seminar_html.php @@ -43,9 +43,13 @@ if (!$dates['regular']['turnus_data'] && empty($dates['irregular'])) { echo $output ? '<br>' : ''; $freetext_rooms = []; + $irregular_rooms = []; if (is_array($dates['irregular'])) { foreach ($dates['irregular'] as $date) { + if (!isset($irregular_rooms[$date['resource_id']])) { + $irregular_rooms[$date['resource_id']] = 0; + } $irregular[] = $date; $irregular_strings[] = $date['tostring']; if ($date['resource_id']) { @@ -100,7 +104,7 @@ if (!$dates['regular']['turnus_data'] && empty($dates['irregular'])) { } } - if ($link_to_dates) { + if (!empty($link_to_dates)) { echo '<br>'; printf( _('Details zu allen Terminen im %sAblaufplan%s'), |
