Fixed subject in MaintenanceNotification Index
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
</tr>
|
||||
<?php foreach($notifications as $notification): ?>
|
||||
<tr>
|
||||
<td><?=$notification->subject?></td>
|
||||
<td><?=$notification->subject->subject?></td>
|
||||
<td><?=($notification->plz) ? implode(", ", $notification->plzs) : ""?></td>
|
||||
<td><?=($notification->send_ts) ? date("d.m.Y H:i", $notification->send_ts) : ""?></td>
|
||||
<td><?=($notification->sent) ? "Ja" : "nein"?></td>
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
<?php
|
||||
|
||||
class MaintenanceNotification extends mfBaseModel {
|
||||
private $subject;
|
||||
private $plzs;
|
||||
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
if($name == "subject") {
|
||||
$subject = new MaintenanceNotificationTemplate($this->subject_id);
|
||||
if($subject) {
|
||||
$this->subject = $subject;
|
||||
}
|
||||
return $this->subject;
|
||||
}
|
||||
|
||||
if($name == "plzs") {
|
||||
if(!$this->plz) return [];
|
||||
$plzs = json_decode($this->plz);
|
||||
|
||||
Reference in New Issue
Block a user