Skip to content
Snippets Groups Projects
Commit e63b493f authored by Felix Pahlow's avatar Felix Pahlow Committed by André Noack
Browse files

Resolve #3195 "Name der Veranstaltung in Terminlöschungs-Nachricht"

Closes #3195

Merge request studip/studip!2162
parent 3e5e9db2
No related branches found
No related tags found
No related merge requests found
...@@ -1892,6 +1892,10 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen ...@@ -1892,6 +1892,10 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen
$booking_resource = Resource::find($this->resource_id); $booking_resource = Resource::find($this->resource_id);
$booking_user = User::find($this->booking_user_id); $booking_user = User::find($this->booking_user_id);
$booking_course = null;
if ($this->course_id) {
$booking_course = Course::find($this->course_id);
}
if (!$booking_resource || !$booking_user) { if (!$booking_resource || !$booking_user) {
//Nothing we can do here. //Nothing we can do here.
return; return;
...@@ -1913,6 +1917,7 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen ...@@ -1913,6 +1917,7 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen
$template->set_attribute('begin', $this->begin); $template->set_attribute('begin', $this->begin);
$template->set_attribute('end', $this->end); $template->set_attribute('end', $this->end);
$template->set_attribute('deleting_user', User::findCurrent()); $template->set_attribute('deleting_user', User::findCurrent());
$template->set_attribute('booking_course', $booking_course);
$mail_text = $template->render(); $mail_text = $template->render();
......
...@@ -6,6 +6,10 @@ Ihre Buchung der Ressource <?= $resource->name ?> am <?= date('d.m.Y', $begin) ? ...@@ -6,6 +6,10 @@ Ihre Buchung der Ressource <?= $resource->name ?> am <?= date('d.m.Y', $begin) ?
von <?= date('H:i', $begin) ?> bis <?= date('H:i', $end) ?> Uhr wurde gelöscht. von <?= date('H:i', $begin) ?> bis <?= date('H:i', $end) ?> Uhr wurde gelöscht.
<? endif ?> <? endif ?>
<? if ($booking_course instanceof Course): ?>
Es handelte sich um eine Buchung für die Veranstaltung <?= $booking_course->getFullname() ?>.
<? endif ?>
<? if ($deleting_user instanceof User) : ?> <? if ($deleting_user instanceof User) : ?>
Die Löschung wurde von <?= $deleting_user->getFullName() ?> vorgenommen. Die Löschung wurde von <?= $deleting_user->getFullName() ?> vorgenommen.
<? endif ?> <? endif ?>
...@@ -6,6 +6,10 @@ Your booking of the resource <?= $resource->name ?> on <?= date('d.m.Y', $begin) ...@@ -6,6 +6,10 @@ Your booking of the resource <?= $resource->name ?> on <?= date('d.m.Y', $begin)
from <?= date('H:i', $begin) ?> to <?= date('H:i', $end) ?> has been deleted. from <?= date('H:i', $begin) ?> to <?= date('H:i', $end) ?> has been deleted.
<? endif ?> <? endif ?>
<? if ($booking_course instanceof Course): ?>
The booking deleted belonged to course <?= $booking_course->getFullname() ?>.
<? endif ?>
<? if ($deleting_user instanceof User) : ?> <? if ($deleting_user instanceof User) : ?>
The deletion has been made by <?= $deleting_user->getFullName() ?>. The deletion has been made by <?= $deleting_user->getFullName() ?>.
<? endif ?> <? endif ?>
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