wikipoints/ground/views/user/notification.php

16 lines
714 B
PHP

<?php
setlocale(LC_ALL, 'ru_RU.UTF-8');
switch ($notification->type) {
case Notifications::typePointConfirmed:
print strftime('%d %b %H:%M', $notification->date).' — Ваша точка <a href="/point/'.$notification->objectId.'">"'.$notification->RefPoint->name.'"</a> прошла модерацию.';
break;
case Notifications::typeNewCommentPoint:
$comment = $notification->RefComment;
$point = Point::model()->getByPK($comment->parentId);
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/point/'.$point->id.'#comment'.$comment->id.'">комментарий</a> к точке <a href="/point/'.$point->id.'">"'.$point->name.'"</a>.';
break;
default:
break;
}