Skip to content
Snippets Groups Projects
Commit b497817c authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

fix calculation of week offset when semester does not start on Monday, fixes #472

parent d9b4e497
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ $room_request_filter = function ($date) { ...@@ -33,7 +33,7 @@ $room_request_filter = function ($date) {
<? endif ?> <? endif ?>
</header> </header>
<? if (!empty($single_dates)): ?> <? if (!empty($single_dates)): ?>
<form class="default collapsable" action="<?= $controller->url_for('course/timesrooms/stack', $linkAttributes) ?>" <form class="collapsable" action="<?= $controller->url_for('course/timesrooms/stack', $linkAttributes) ?>"
<?= Request::isXhr() ? 'data-dialog="size=big"' : ''?> method="post"> <?= Request::isXhr() ? 'data-dialog="size=big"' : ''?> method="post">
<?= CSRFProtection::tokenTag() ?> <?= CSRFProtection::tokenTag() ?>
<? foreach ($single_dates as $semester_id => $termine) : ?> <? foreach ($single_dates as $semester_id => $termine) : ?>
...@@ -70,7 +70,7 @@ $room_request_filter = function ($date) { ...@@ -70,7 +70,7 @@ $room_request_filter = function ($date) {
</section> </section>
</header> </header>
<section> <section>
<table class="default nohover"> <table class="default">
<colgroup> <colgroup>
<? if (!$locked) :?> <? if (!$locked) :?>
<col width="30px"> <col width="30px">
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<? if (!empty($cycle_dates)) : ?> <? if (!empty($cycle_dates)) : ?>
<? foreach ($cycle_dates as $metadate_id => $cycle) : ?> <? foreach ($cycle_dates as $metadate_id => $cycle) : ?>
<form class="default collapsable" action="<?= $controller->url_for('course/timesrooms/stack/' . $metadate_id, $linkAttributes) ?>" <form class="collapsable" action="<?= $controller->url_for('course/timesrooms/stack/' . $metadate_id, $linkAttributes) ?>"
method="post" <?= Request::isXhr() ? 'data-dialog="size=big"' : ''?>> method="post" <?= Request::isXhr() ? 'data-dialog="size=big"' : ''?>>
<?= CSRFProtection::tokenTag() ?> <?= CSRFProtection::tokenTag() ?>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
'clickable', 'clickable',
[ [
'title' => _('Raumanfrage erstellen'), 'title' => _('Raumanfrage erstellen'),
'class' => 'text-align' 'style' => 'vertical-align: middle;'
] ]
), ),
['data-dialog' => 'size=big'] ['data-dialog' => 'size=big']
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<? endif ?> <? endif ?>
</header> </header>
<section> <section>
<table class="default nohover"> <table class="default">
<colgroup> <colgroup>
<? if (!$locked) : ?> <? if (!$locked) : ?>
<col width="30px"> <col width="30px">
......
...@@ -722,7 +722,7 @@ class SeminarCycleDate extends SimpleORMap ...@@ -722,7 +722,7 @@ class SeminarCycleDate extends SimpleORMap
{ {
$date = new DateTime(); $date = new DateTime();
$date->setTimestamp($base); $date->setTimestamp($base);
$date->modify(sprintf('%s days', $days)); $date->modify(sprintf('this week monday +%s days', $days));
return $date->getTimestamp(); return $date->getTimestamp();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment