2018-01-26

This commit is contained in:
Visman 2018-01-26 23:31:16 +07:00
parent c75f487e38
commit 68cf3b9a2a
21 changed files with 342 additions and 136 deletions

View file

@ -10,7 +10,7 @@ use RuntimeException;
class Delete extends Action
{
/**
* Удаляет раздел(ы)
* Удаляет раздел(ы)
*
* @param mixed ...$args
*
@ -47,7 +47,7 @@ class Delete extends Action
$this->c->topics->delete(...$args);
//???? подписки, опросы, предупреждения, поисковый индекс, метки посещения тем
//???? подписки, опросы, предупреждения, метки посещения тем
foreach ($forums as $forum) {
$this->c->groups->Perm->reset($forum);
@ -56,11 +56,11 @@ class Delete extends Action
$vars = [
':forums' => array_keys($forums),
];
$sql = 'DELETE FROM ::mark_of_forum
$sql = 'DELETE FROM ::mark_of_forum
WHERE fid IN (?ai:forums)';
$this->c->DB->exec($sql, $vars);
$sql = 'DELETE FROM ::forums
$sql = 'DELETE FROM ::forums
WHERE id IN (?ai:forums)';
$this->c->DB->exec($sql, $vars);
}

View file

@ -396,22 +396,17 @@ class Search extends Page
switch ($action) {
case 'search':
if (1 === $model->showAs) {
if ('*' === $args['author']) {
$model->name = \ForkBB\__('By keywords show as topics', $args['keywords']);
} else {
$model->name = \ForkBB\__('By both show as topics', $args['keywords'], $args['author']);
}
$list = $model->actionT($action);
} else {
if ('*' === $args['author']) {
$model->name = \ForkBB\__('By keywords show as posts', $args['keywords']);
} else {
$model->name = \ForkBB\__('By both show as posts', $args['keywords'], $args['author']);
}
$list = $model->actionP($action);
$asTopicsList = false;
}
$model->linkMarker = $advanced ? 'SearchAdvanced' : 'Search';;
if ('*' === $args['author']) {
$model->name = \ForkBB\__('Search query: %s', $args['keywords']);
} else {
$model->name = \ForkBB\__('Search query: %1$s and Author: %2$s', $args['keywords'], $args['author']);
}
$model->linkMarker = $advanced ? 'SearchAdvanced' : 'Search';
$model->linkArgs = $args;
break;
case 'last':
@ -440,12 +435,11 @@ class Search extends Page
} else {
$this->c->Lang->load('topic');
$this->nameTpl = 'topic';
$this->nameTpl = 'topic_in_search';
$this->posts = $list;
}
$this->fIndex = 'search';
$this->nameTpl = $asTopicsList ? 'forum' : 'topic';
$this->onlinePos = 'search';
$this->robots = 'noindex';
$this->model = $model;

View file

@ -12,7 +12,7 @@ use RuntimeException;
class Delete extends Action
{
/**
* Удаляет тему(ы)
* Удаляет тему(ы)
*
* @param mixed ...$args
*
@ -56,7 +56,9 @@ class Delete extends Action
throw new InvalidArgumentException('Expected only forum, topic or post');
}
//???? подписки, опросы, предупреждения, поисковый индекс, метки посещения тем
$this->c->search->delete(...$args);
//???? подписки, опросы, предупреждения метки посещения тем
$users = [];
@ -88,9 +90,9 @@ class Delete extends Action
$vars = [
':topics' => array_keys($topics),
];
$sql = 'SELECT p.poster_id
$sql = 'SELECT p.poster_id
FROM ::posts AS p
WHERE p.topic_id IN (?ai:topics)
WHERE p.topic_id IN (?ai:topics)
GROUP BY p.poster_id';
$users = $this->c->DB->query($sql, $vars)->fetchAll(\PDO::FETCH_COLUMN);
@ -101,16 +103,16 @@ class Delete extends Action
$vars = [
':forums' => array_keys($forums),
];
$sql = 'SELECT p.poster_id
$sql = 'SELECT p.poster_id
FROM ::posts AS p
INNER JOIN ::topics AS t ON t.id=p.topic_id
WHERE t.forum_id IN (?ai:forums)
WHERE t.forum_id IN (?ai:forums)
GROUP BY p.poster_id';
$users = $this->c->DB->query($sql, $vars)->fetchAll(\PDO::FETCH_COLUMN);
$sql = 'DELETE FROM ::posts
WHERE topic_id IN (
SELECT id
SELECT id
FROM ::topics
WHERE forum_id IN (?ai:forums)
)';

View file

@ -186,9 +186,15 @@ class View extends Action
$timeMax = $post->posted;
}
if ($post->id === $arg->first_post_id && $offset > 0) {
if (empty($post->id)) {
continue;
}
$post->__postNumber = 1;
} else {
++$postCount;
if (empty($post->id)) {
continue;
}
$post->__postNumber = $offset + $postCount;
}
}
@ -196,6 +202,9 @@ class View extends Action
} else {
foreach ($result as $post) {
++$postCount;
if (empty($post->id)) {
continue;
}
$post->__postNumber = $offset + $postCount; //????
}
}

View file

@ -0,0 +1,89 @@
<?php
namespace ForkBB\Models\Search;
use ForkBB\Models\Method;
use ForkBB\Models\Forum\Model as Forum;
use ForkBB\Models\Post\Model as Post;
use ForkBB\Models\Topic\Model as Topic;
use PDO;
use InvalidArgumentException;
use RuntimeException;
class Delete extends Method
{
/**
* Удаление индекса
*
* @param mixed ...$args
*
* @throws InvalidArgumentException
* @throws RuntimeException
*/
public function delete(...$args)
{
if (empty($args)) {
throw new InvalidArgumentException('No arguments, expected forum, topic or post');
}
$posts = [];
$parents = [];
$topics = [];
$forums = [];
// ?????
foreach ($args as $arg) {
if ($arg instanceof Post) {
if (! $arg->parent instanceof Topic || ! $arg->parent->parent instanceof Forum) {
throw new RuntimeException('Parents unavailable');
}
$posts[$arg->id] = $arg;
} elseif ($arg instanceof Topic) {
if (! $arg->parent instanceof Forum) {
throw new RuntimeException('Parent unavailable');
}
$topics[$arg->id] = $arg;
} elseif ($arg instanceof Forum) {
if (! $this->c->forums->get($arg->id) instanceof Forum) {
throw new RuntimeException('Forum unavailable');
}
$forums[$arg->id] = $arg;
} else {
throw new InvalidArgumentException('Expected forum, topic or post');
}
}
if (! empty($posts) + ! empty($topics) + ! empty($forums) > 1) {
throw new InvalidArgumentException('Expected only forum, topic or post');
}
if ($posts) {
$vars = [
':posts' => array_keys($posts),
];
$sql = 'DELETE FROM ::search_matches
WHERE post_id IN (?ai:posts)';
} elseif ($topics) {
$vars = [
':topics' => array_keys($topics),
];
$sql = 'DELETE FROM ::search_matches
WHERE post_id IN (
SELECT p.id
FROM ::posts AS p
WHERE p.topic_id IN (?ai:topics)
)';
} elseif ($forums) {
$vars = [
':forums' => array_keys($forums),
];
$sql = 'DELETE FROM ::search_matches
WHERE post_id IN (
SELECT p.id
FROM ::posts AS p
INNER JOIN ::topics AS t ON t.id=p.topic_id
WHERE t.forum_id IN (?ai:forums)
)';
}
$this->c->DB->exec($sql, $vars);
}
}

View file

@ -172,19 +172,6 @@ class Prepare extends Method
return null === $error;
}
/**
* Замена в строке по массиву шаблонов
*
* @param string $str
* @param array $repl
*
* @return string
*/
protected function repl($str, array $repl)
{
return preg_replace(array_keys($repl), array_values($repl), $str);
}
/**
* Восстановление текста запроса по массиву слов
*

View file

@ -11,7 +11,7 @@ use RuntimeException;
class Delete extends Action
{
/**
* Удаляет тему(ы)
* Удаляет тему(ы)
*
* @param mixed ...$args
*
@ -48,20 +48,20 @@ class Delete extends Action
if (! empty($topics) + ! empty($forums) > 1) {
throw new InvalidArgumentException('Expected only forum or topic');
}
$this->c->posts->delete(...$args);
//???? подписки, опросы, предупреждения, поисковый индекс, метки посещения тем
//???? подписки, опросы, предупреждения, метки посещения тем
if ($topics) {
$vars = [
':topics' => array_keys($topics),
];
$sql = 'DELETE FROM ::mark_of_topic
$sql = 'DELETE FROM ::mark_of_topic
WHERE tid IN (?ai:topics)';
$this->c->DB->exec($sql, $vars);
$sql = 'DELETE FROM ::topics
$sql = 'DELETE FROM ::topics
WHERE id IN (?ai:topics)';
$this->c->DB->exec($sql, $vars);
@ -72,15 +72,15 @@ class Delete extends Action
$vars = [
':forums' => array_keys($forums),
];
$sql = 'DELETE FROM ::mark_of_topic
$sql = 'DELETE FROM ::mark_of_topic
WHERE tid IN (
SELECT id
SELECT id
FROM ::topics
WHERE forum_id IN (?ai:forums)
)';
$this->c->DB->exec($sql, $vars);
$sql = 'DELETE FROM ::topics
$sql = 'DELETE FROM ::topics
WHERE forum_id IN (?ai:forums)';
$this->c->DB->exec($sql, $vars);
}

View file

@ -44,3 +44,6 @@ msgstr "Unsubscribe"
msgid "Subscribe"
msgstr "Subscribe to this forum"
msgid "Topic %s was not found in the database"
msgstr "Topic №%s was not found in the database"

View file

@ -132,23 +132,11 @@ msgstr "Warnings for %s"
msgid "Quick search show_last"
msgstr "Last posts"
msgid "By keywords show as topics"
msgstr "Topics with posts containing \'%s\'"
msgid "Search query: %s"
msgstr "Search query: «%s»"
msgid "By keywords show as posts"
msgstr "Posts containing \'%s\'"
msgid "By user show as topics"
msgstr "Topics with posts by %s"
msgid "By user show as posts"
msgstr "Posts by %s"
msgid "By both show as topics"
msgstr "Topics with posts containing \'%s\', by %s"
msgid "By both show as posts"
msgstr "Posts containing \'%s\', by %s"
msgid "Search query: %1$s and Author: %2$s"
msgstr "Search query: «%1$s» - Author: «%2$s»"
msgid "No terms"
msgstr "You have to enter at least one keyword and/or an author to search for."
@ -180,6 +168,9 @@ msgstr "Go to post"
msgid "Go to topic"
msgstr "Go to topic"
msgid "Go to forum"
msgstr "Go to forum"
msgid "Search btn"
msgstr "Serach"

View file

@ -112,3 +112,6 @@ msgstr "Topic information"
msgid "Merge posts"
msgstr "Merge with previous if it yours"
msgid "Message %s was not found in the database"
msgstr "Message №%s was not found in the database"

View file

@ -44,3 +44,6 @@ msgstr "Отказаться от подписки"
msgid "Subscribe"
msgstr "Подписаться на этот раздел"
msgid "Topic %s was not found in the database"
msgstr "Тема №%s не найдена в базе данных"

View file

@ -132,23 +132,11 @@ msgstr "Предупреждения для %s"
msgid "Quick search show_last"
msgstr "Последние сообщения"
msgid "By keywords show as topics"
msgstr "Ключевые слова "%s" (темы)"
msgid "Search query: %s"
msgstr "Запрос: «%s»"
msgid "By keywords show as posts"
msgstr "Ключевые слова "%s" (сообщения)"
msgid "By user show as topics"
msgstr "Автор %s (темы)"
msgid "By user show as posts"
msgstr "Автор %s (сообщения)"
msgid "By both show as topics"
msgstr "Ключевые слова "%s" и автор %s (темы)"
msgid "By both show as posts"
msgstr "Ключевые слова "%s" и автор %s (сообщения)"
msgid "Search query: %1$s and Author: %2$s"
msgstr "Запрос: «%1$s» - Автор: «%2$s»"
msgid "No terms"
msgstr "Необходимо ввести хотя бы одно ключевое слово или автора для проведения поиска."
@ -180,6 +168,9 @@ msgstr "Перейти к сообщению"
msgid "Go to topic"
msgstr "Перейти к теме"
msgid "Go to forum"
msgstr "Перейти к разделу"
msgid "Search btn"
msgstr "Найти"

View file

@ -113,3 +113,6 @@ msgstr "Информация о теме"
msgid "Merge posts"
msgstr "Соединить с предыдущим сообщением, если оно ваше"
msgid "Message %s was not found in the database"
msgstr "Сообщение №%s не найдено в базе данных"

View file

@ -79,8 +79,12 @@
<div class="f-hcell f-cstats">{!! __('Stats') !!}</div>
<div class="f-hcell f-clast">{!! __('Last post') !!}</div>
</li>
@foreach ($p->topics as $topic)
@if ($topic->moved_to)
@foreach ($p->topics as $id => $topic)
@if (empty($topic->id) && $iswev = ['e' => [__('Topic %s was not found in the database', $id)]])
<li id="topic-{!! $id !!}" class="f-row">
@include ('layouts/iswev')
</li>
@elseif ($topic->moved_to)
<li id="topic-{!! $topic->id !!}" class="f-row f-fredir">
<div class="f-cell f-cmain">
<div class="f-ficon"></div>

View file

@ -20,7 +20,7 @@
<p class="f-description">{!! __('Welcome') !!}</p>
</div>
</header>
@if ($p->fIswev)
@if ($iswev = $p->fIswev)
@include ('layouts/iswev')
@endif
@if ($form = $p->form1)

View file

@ -1,48 +1,48 @@
@if (isset($p->fIswev['i']))
@if (! empty($iswev['i']))
<section class="f-iswev f-info">
<h2>Info message</h2>
<ul>
@foreach ($p->fIswev['i'] as $cur)
@foreach ($iswev['i'] as $cur)
<li class="f-icontent">{!! $cur !!}</li>
@endforeach
</ul>
</section>
@endif
@if (isset($p->fIswev['s']))
@if (! empty($iswev['s']))
<section class="f-iswev f-success">
<h2>Successful operation message</h2>
<ul>
@foreach ($p->fIswev['s'] as $cur)
@foreach ($iswev['s'] as $cur)
<li class="f-scontent">{!! $cur !!}</li>
@endforeach
</ul>
</section>
@endif
@if (isset($p->fIswev['w']))
@if (! empty($iswev['w']))
<section class="f-iswev f-warning">
<h2>Warning message</h2>
<ul>
@foreach ($p->fIswev['w'] as $cur)
@foreach ($iswev['w'] as $cur)
<li class="f-wcontent">{!! $cur !!}</li>
@endforeach
</ul>
</section>
@endif
@if (isset($p->fIswev['e']))
@if (! empty($iswev['e']))
<section class="f-iswev f-error">
<h2>Error message</h2>
<ul>
@foreach ($p->fIswev['e'] as $cur)
@foreach ($iswev['e'] as $cur)
<li class="f-econtent">{!! $cur !!}</li>
@endforeach
</ul>
</section>
@endif
@if (isset($p->fIswev['v']))
@if (! empty($iswev['v']))
<section class="f-iswev f-validation">
<h2>Validation message</h2>
<ul>
@foreach ($p->fIswev['v'] as $cur)
@foreach ($iswev['v'] as $cur)
<li class="f-vcontent">{!! $cur !!}</li>
@endforeach
</ul>

View file

@ -39,7 +39,7 @@
<p class="f-ancontent">{!! $p->fAnnounce !!}</p>
</section>
@endif
@if ($p->fIswev)
@if ($iswev = $p->fIswev)
@include ('layouts/iswev')
@endif
@yield ('content')

View file

@ -33,10 +33,11 @@
</div>
</section>
@endif
@if ($p->posts)
@if ($p->posts)
<section class="f-view-posts">
<h2>{!! $p->postsTitle !!}</h2>
@foreach ($p->posts as $post)
@if (! empty($post->id))
<article id="p{!! $post->id !!}" class="clearfix f-post">
<header class="f-post-header clearfix">
<span class="f-post-posted"><time datetime="{{ utc($post->posted) }}">{{ dt($post->posted) }}</time></span>
@ -53,6 +54,7 @@
</div>
</div>
</article>
@endif
@endforeach
</section>
@endif

View file

@ -54,79 +54,61 @@
@endif
</div>
<section class="f-main f-topic">
@if ($p->searchMode)
<h2>{{ $p->model->name }}</h2>
@else
<h2>{{ cens($p->model->subject) }}</h2>
@endif
@foreach ($p->posts as $post)
<article id="p{!! $post->id !!}" class="clearfix f-post @if ($post->user->gender == 1) f-user-male @elseif ($post->user->gender == 2) f-user-female @endif @if ($post->user->online) f-user-online @endif @if (1 === $post->postNumber && ! $p->searchMode) f-post-first @endif">
<header class="f-post-header clearfix">
@if ($p->searchMode)
<h3>@if ($post->id !== $post->parent->first_post_id) {!! __('Re') !!} @endif {{ cens($post->parent->subject) }}</h3>
@foreach ($p->posts as $id => $post)
@if (empty($post->id) && $iswev = ['e' => [__('Message %s was not found in the database', $id)]])
@include ('layouts/iswev')
@else
<article id="p{!! $post->id !!}" class="clearfix f-post @if ($post->user->gender == 1) f-user-male @elseif ($post->user->gender == 2) f-user-female @endif @if ($post->user->online) f-user-online @endif @if (1 === $post->postNumber) f-post-first @endif">
<header class="f-post-header clearfix">
<h3>@if ($post->postNumber > 1) {!! __('Re') !!} @endif {{ cens($p->model->subject) }}</h3>
@endif
<span class="f-post-posted"><a href="{!! $post->link !!}" rel="bookmark"><time datetime="{{ utc($post->posted) }}">{{ dt($post->posted) }}</time></a></span>
@if ($post->edited)
@if ($post->edited)
<span class="f-post-edited" title="{!! __('Last edit', $post->edited_by, dt($post->edited)) !!}">{!! __('Edited') !!}</span>
@endif
@endif
<span class="f-post-number">#{!! $post->postNumber !!}</span>
</header>
<div class="f-post-body clearfix">
<address class="f-post-left clearfix">
<ul class="f-user-info">
@if ($post->showUserLink && $post->user->link)
@if ($post->showUserLink && $post->user->link)
<li class="f-username"><a href="{!! $post->user->link !!}">{{ $post->user->username }}</a></li>
@else
@else
<li class="f-username">{{ $post->user->username }}</li>
@endif
@if (! $p->searchMode && $post->showUserAvatar && $post->user->avatar)
@endif
@if ($post->showUserAvatar && $post->user->avatar)
<li class="f-avatar">
<img alt="{{ $post->user->username }}" src="{!! $post->user->avatar !!}">
</li>
@endif
<li class="f-usertitle"><span>{{ $post->user->title() }}</span></li>
@if (! $p->searchMode && $post->showPostCount && $post->user->num_posts)
<li class="f-postcount"><span>{!! __('%s post', $post->user->num_posts, num($post->user->num_posts)) !!}</span></li>
@endif
@endif
<li class="f-usertitle">{{ $post->user->title() }}</li>
@if ($post->showPostCount && $post->user->num_posts)
<li class="f-postcount">{!! __('%s post', $post->user->num_posts, num($post->user->num_posts)) !!}</li>
@endif
</ul>
@if (! $p->searchMode && $post->showUserInfo)
@if ($post->showUserInfo)
<ul class="f-user-info-add">
<li><span>{!! __('Registered:') !!} {{ dt($post->user->registered, true) }}</span></li>
@if ($post->user->location)
<li><span>{!! __('From') !!} {{ cens($post->user->location) }}</span></li>
@endif
<li><span></span></li>
<li>{!! __('Registered:') !!} {{ dt($post->user->registered, true) }}</li>
@if ($post->user->location)
<li>{!! __('From') !!} {{ cens($post->user->location) }}</li>
@endif
</ul>
@endif
@if ($p->searchMode)
<ul class="f-post-search-info">
<li class="f-psiforum"><span>{!! __('Forum') !!}: <a href="{!! $post->parent->parent->link !!}">{{ $post->parent->parent->forum_name }}</a></span></li>
<li class="f-psitopic"><span>{!! __('Topic') !!}: <a href="{!! $post->parent->link !!}">{{ cens($post->parent->subject) }}</a></span></li>
<li class="f-psireply"><span>{!! __('%s Reply', $post->parent->num_replies, num($post->parent->num_replies)) !!}</span></li>
@if ($post->parent->showViews)
<li class="f-psireply"><span>{!! __('%s View', $post->parent->num_views, num($post->parent->num_views)) !!}</span></li>
@endif
</ul>
@endif
</address>
<div class="f-post-right f-post-main">
{!! $post->html() !!}
</div>
@if (! $p->searchMode && $post->showSignature && $post->user->signature)
@if ($post->showSignature && $post->user->signature)
<div class="f-post-right f-post-signature">
<hr>
{!! $post->user->htmlSign !!}
</div>
@endif
@endif
</div>
<footer class="f-post-footer clearfix">
<div class="f-post-left">
<span></span>
</div>
@if ($p->searchMode)
@else
@if ($post->canReport || $post->canDelete || $post->canEdit || $post->canQuote)
<div class="f-post-right clearfix">
<ul>
@ -145,9 +127,9 @@
</ul>
</div>
@endif
@endif
</footer>
</article>
@endif
@endforeach
</section>
<div class="f-nav-links">

View file

@ -0,0 +1,104 @@
@section ('crumbs')
<ul class="f-crumbs">
@foreach ($p->crumbs as $cur)
<li class="f-crumb"><!-- inline -->
@if ($cur[0])
<a href="{!! $cur[0] !!}" @if ($cur[2]) class="active" @endif>{{ $cur[1] }}</a>
@else
<span @if ($cur[2]) class="active" @endif>{{ $cur[1] }}</span>
@endif
</li><!-- endinline -->
@endforeach
</ul>
@endsection
@section ('pagination')
@if ($p->model->pagination)
<nav class="f-pages">
@foreach ($p->model->pagination as $cur)
@if ($cur[2])
<a class="f-page active" href="{!! $cur[0] !!}">{{ $cur[1] }}</a>
@elseif ('info' === $cur[1])
<span class="f-pinfo">{!! $cur[0] !!}</span>
@elseif ('space' === $cur[1])
<span class="f-page f-pspacer">{!! __('Spacer') !!}</span>
@elseif ('prev' === $cur[1])
<a rel="prev" class="f-page f-pprev" href="{!! $cur[0] !!}">{!! __('Previous') !!}</a>
@elseif ('next' === $cur[1])
<a rel="next" class="f-page f-pnext" href="{!! $cur[0] !!}">{!! __('Next') !!}</a>
@else
<a class="f-page" href="{!! $cur[0] !!}">{{ $cur[1] }}</a>
@endif
@endforeach
</nav>
@endif
@endsection
@extends ('layouts/main')
<div class="f-nav-links">
@yield ('crumbs')
@if ($p->model->pagination)
<div class="f-links-b clearfix">
@yield ('pagination')
</div>
@endif
</div>
<section class="f-main f-topic">
<h2>{{ $p->model->name }}</h2>
@foreach ($p->posts as $id => $post)
@if (empty($post->id) && $iswev = ['e' => [__('Message %s was not found in the database', $id)]])
@include ('layouts/iswev')
@else
<article id="p{!! $post->id !!}" class="clearfix f-post f-post-search @if ($post->user->gender == 1) f-user-male @elseif ($post->user->gender == 2) f-user-female @endif @if ($post->user->online) f-user-online @endif">
<header class="f-post-header clearfix">
<h3>
<span class="f-psh-forum"><a href="{!! $post->parent->parent->link !!}" title="{!! __('Go to forum') !!}">{{ $post->parent->parent->forum_name }}</a></span>
<span class="f-psh-topic"><a href="{!! $post->parent->link !!}" title="{!! __('Go to topic') !!}">@if ($post->id !== $post->parent->first_post_id) {!! __('Re') !!} @endif {{ cens($post->parent->subject) }}</a></span>
<span class="f-post-posted"><a href="{!! $post->link !!}" title="{!! __('Go to post') !!}" rel="bookmark"><time datetime="{{ utc($post->posted) }}">{{ dt($post->posted) }}</time></a></span>
</h3>
<span class="f-post-number">#{!! $post->postNumber !!}</span>
</header>
<div class="f-post-body clearfix">
<address class="f-post-left clearfix">
<ul class="f-user-info">
@if ($post->showUserLink && $post->user->link)
<li class="f-username"><a href="{!! $post->user->link !!}">{{ $post->user->username }}</a></li>
@else
<li class="f-username">{{ $post->user->username }}</li>
@endif
<li class="f-usertitle">{{ $post->user->title() }}</li>
</ul>
<ul class="f-post-search-info">
<li class="f-psi-forum">{!! __('Forum') !!}: <a href="{!! $post->parent->parent->link !!}">{{ $post->parent->parent->forum_name }}</a></li>
<li class="f-psi-topic">{!! __('Topic') !!}: <a href="{!! $post->parent->link !!}">{{ cens($post->parent->subject) }}</a></li>
<li class="f-psi-reply">{!! __('%s Reply', $post->parent->num_replies, num($post->parent->num_replies)) !!}</li>
@if ($post->parent->showViews)
<li class="f-psi-view">{!! __('%s View', $post->parent->num_views, num($post->parent->num_views)) !!}</li>
@endif
</ul>
</address>
<div class="f-post-right f-post-main">
{!! $post->html() !!}
</div>
</div>
<footer class="f-post-footer clearfix">
<div class="f-post-left">
<span></span>
</div>
<div class="f-post-right clearfix">
<ul>
<li class="f-posttotopic"><a class="f-btn" href="{!! $post->parent->link !!}">{!! __('Go to topic') !!}</a></li>
<li class="f-posttopost"><a class="f-btn" href="{!! $post->link !!}">{!! __('Go to post') !!}</a></li>
</ul>
</div>
</footer>
</article>
@endif
@endforeach
</section>
<div class="f-nav-links">
@if ($p->model->pagination)
<div class="f-links-a clearfix">
@yield ('pagination')
</div>
@endif
@yield ('crumbs')
</div>

View file

@ -949,6 +949,10 @@ select {
}
.f-phpinfo {
word-break: break-all;
}
@media screen and (min-width: 36rem) {
.f-admin dt {
float: left;
@ -1282,8 +1286,8 @@ select {
opacity: 0.4;
}
.f-tpages:hover .f-page,
.f-tpages .f-page:focus,
.f-tpages .f-page:hover,
.f-cmforum > a:focus,
.f-cmforum > a:hover {
opacity: 1;
@ -1350,6 +1354,15 @@ select {
padding-bottom: 0.625rem;
}
.f-post-footer .f-post-right .f-btn {
opacity: 0.4;
}
.f-post-footer .f-post-right:hover .f-btn,
.f-post-footer .f-post-right .f-btn:focus {
opacity: 1;
}
.f-post-footer .f-post-left {
display: none;
}
@ -1498,6 +1511,7 @@ li + li .f-btn {
.f-user-info-add {
display: block;
font-size: 0.875rem;
word-break: break-all;
}
.f-username, .f-avatar {
@ -1816,8 +1830,26 @@ li + li .f-btn {
}
.f-post-search-info {
display: none;
}
.f-post-search .f-post-header > h3 {
font-size: 0.875rem;
padding-top: 0.625rem;
font-weight: normal;
display: inline-block;
/* float: left; */
word-break: break-all;
}
.f-post-search .f-post-posted {
float: none;
}
.f-psh-topic:before,
.f-post-search .f-post-posted:before {
content: "»";
padding-left: 0.3125rem;
padding-right: 0.3125rem;
}
@media screen and (min-width: 50rem) {
@ -1842,4 +1874,11 @@ li + li .f-btn {
.f-field-w4 + .f-field-w4 {
padding-left: 0.625rem;
}
.f-post-search-info {
display: block;
font-size: 0.875rem;
padding-top: 0.625rem;
word-break: break-all;
}
}