#723: i8n date formats on news page

This commit is contained in:
msquare 2020-04-03 10:40:23 +02:00
parent 557261b688
commit fd2a644a24
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ function admin_news()
$html .= form( $html .= form(
[ [
form_info(__('Date'), $news->created_at->format('Y-m-d H:i')), form_info(__('Date'), $news->created_at->format(__('Y-m-d H:i'))),
form_info(__('Author'), User_Nick_render($user_source)), form_info(__('Author'), User_Nick_render($user_source)),
form_text('eBetreff', __('Subject'), $news->title), form_text('eBetreff', __('Subject'), $news->title),
form_textarea('eText', __('Message'), $news->text), form_textarea('eText', __('Message'), $news->text),

View File

@ -105,7 +105,7 @@ function display_news(News $news): string
) )
. '</div>'; . '</div>';
} }
$html .= '<span class="glyphicon glyphicon-time"></span> ' . $news->created_at->format('Y-m-d H:i') . '&emsp;'; $html .= '<span class="glyphicon glyphicon-time"></span> ' . $news->created_at->format(__('Y-m-d H:i')) . '&emsp;';
$html .= User_Nick_render($news->user); $html .= User_Nick_render($news->user);
if (current_page() != 'news_comments') { if (current_page() != 'news_comments') {
@ -154,7 +154,7 @@ function user_news_comments()
$html .= '<div class="panel panel-default">'; $html .= '<div class="panel panel-default">';
$html .= '<div class="panel-body">' . nl2br(htmlspecialchars($comment->text)) . '</div>'; $html .= '<div class="panel-body">' . nl2br(htmlspecialchars($comment->text)) . '</div>';
$html .= '<div class="panel-footer text-muted">'; $html .= '<div class="panel-footer text-muted">';
$html .= '<span class="glyphicon glyphicon-time"></span> ' . $comment->created_at->format('Y-m-d H:i') . '&emsp;'; $html .= '<span class="glyphicon glyphicon-time"></span> ' . $comment->created_at->format(__('Y-m-d H:i')) . '&emsp;';
$html .= User_Nick_render($comment->user); $html .= User_Nick_render($comment->user);
$html .= '</div>'; $html .= '</div>';
$html .= '</div>'; $html .= '</div>';