Show lang in admin
This commit is contained in:
parent
e0e1782067
commit
adec98c198
|
@ -56,7 +56,7 @@
|
|||
<span data-toggle="children" data-hint="Something" class="hint--bottom js__comments-list-toggle">
|
||||
<i class="page-icon fa fa-fw fa-circle-o children-closed"></i>
|
||||
</span>
|
||||
<a href="#" class="page-edit">{{ file.data.title ?: file.fileName }}</a>
|
||||
<a href="#" class="page-edit">{{ file.data.title ?: file.fileName }}</a> <span class="badge lang info">{{file.data.lang}}</span>
|
||||
<!-- <span class="page-home"><i class="fa fa-home"></i></span> -->
|
||||
<p class="page-route">{% if file.data.hasUnread %}<span class="gpm-version">Has {{file.data.unreadCount}} unread comments</span>{% else %}<span class="gpm-version">{{file.data.comments|length}} comments</span>{% endif %}</p>
|
||||
|
||||
|
|
|
@ -68,7 +68,6 @@ class CommentsPlugin extends Plugin
|
|||
$email = filter_var(urldecode($post['email']), FILTER_SANITIZE_STRING);
|
||||
$title = filter_var(urldecode($post['title']), FILTER_SANITIZE_STRING);
|
||||
|
||||
|
||||
$filename = DATA_DIR . 'comments';
|
||||
$filename .= ($lang ? '/' . $lang : '');
|
||||
$filename .= $path . '.yaml';
|
||||
|
@ -86,6 +85,7 @@ class CommentsPlugin extends Plugin
|
|||
} else {
|
||||
$data = array(
|
||||
'title' => $title,
|
||||
'lang' => $lang,
|
||||
'comments' => array([
|
||||
'text' => $text,
|
||||
'date' => gmdate('D, d M Y H:i:s', time()),
|
||||
|
@ -102,6 +102,7 @@ class CommentsPlugin extends Plugin
|
|||
|
||||
private function getFilesOrderedByModifiedDate($path = '') {
|
||||
$files = [];
|
||||
|
||||
$dirItr = new \RecursiveDirectoryIterator(DATA_DIR . 'comments' . $path, \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||
$filterItr = new RecursiveFolderFilterIterator($dirItr);
|
||||
$itr = new \RecursiveIteratorIterator($filterItr, \RecursiveIteratorIterator::SELF_FIRST);
|
||||
|
|
Loading…
Reference in New Issue