2018-03-10
This commit is contained in:
parent
49db0094d4
commit
e05ec6cf3a
12 changed files with 103 additions and 77 deletions
|
@ -72,7 +72,7 @@ class Routing
|
|||
$r->add('GET', '/search/advanced[/{keywords}/{author}/{forums}/{serch_in:\d}/{sort_by:\d}/{sort_dir:\d}/{show_as:\d}[/{page:[1-9]\d*}]]', 'Search:viewAdvanced', 'SearchAdvanced');
|
||||
$r->add('POST', '/search/advanced', 'Search:viewAdvanced');
|
||||
|
||||
$r->add('GET', '/search/{action:last|unanswered}[/{page:[1-9]\d*}]', 'Search:action', 'SearchAction');
|
||||
$r->add('GET', '/search/{action:latest|unanswered}[/{page:[1-9]\d*}]', 'Search:action', 'SearchAction');
|
||||
}
|
||||
// юзеры
|
||||
if ($user->g_view_users == '1') {
|
||||
|
|
|
@ -59,44 +59,50 @@ class Page extends Model
|
|||
$r = $this->c->Router;
|
||||
|
||||
$nav = [
|
||||
'index' => [$r->link('Index'), \ForkBB\__('Index')]
|
||||
'index' => [$r->link('Index'), 'Index']
|
||||
];
|
||||
|
||||
if ($this->user->g_read_board == '1' && $this->user->viewUsers) {
|
||||
$nav['userlist'] = [$r->link('Userlist'), \ForkBB\__('User list')];
|
||||
$nav['userlist'] = [$r->link('Userlist'), 'User list'];
|
||||
}
|
||||
|
||||
if ($this->c->config->o_rules == '1'
|
||||
&& (! $this->user->isGuest || $this->user->g_read_board == '1' || $this->c->config->o_regs_allow == '1')
|
||||
) {
|
||||
$nav['rules'] = [$r->link('Rules'), \ForkBB\__('Rules')];
|
||||
$nav['rules'] = [$r->link('Rules'), 'Rules'];
|
||||
}
|
||||
|
||||
if ($this->user->g_read_board == '1' && $this->user->g_search == '1') {
|
||||
$nav['search'] = [$r->link('Search'), \ForkBB\__('Search')];
|
||||
$sub = [];
|
||||
if (! $this->user->isGuest) {
|
||||
$sub['with-your-posts'] = [$r->link('SearchAction', ['action' => '???']), 'Topics with your posts', 'Find topics with your posts'];
|
||||
}
|
||||
$sub['latest'] = [$r->link('SearchAction', ['action' => 'latest']), 'Latest active topics', 'Find latest active topics'];
|
||||
$sub['unanswered'] = [$r->link('SearchAction', ['action' => 'unanswered']), 'Unanswered topics', 'Find unanswered topics'];
|
||||
$nav['search'] = [$r->link('Search'), 'Search', null, $sub];
|
||||
}
|
||||
|
||||
if ($this->user->isGuest) {
|
||||
$nav['register'] = [$r->link('Register'), \ForkBB\__('Register')];
|
||||
$nav['login'] = [$r->link('Login'), \ForkBB\__('Login')];
|
||||
$nav['register'] = [$r->link('Register'), 'Register'];
|
||||
$nav['login'] = [$r->link('Login'), 'Login'];
|
||||
} else {
|
||||
$nav['profile'] = [$r->link('User', [
|
||||
'id' => $this->user->id,
|
||||
'name' => $this->user->username,
|
||||
]), \ForkBB\__('Profile')];
|
||||
]), 'Profile'];
|
||||
// New PMS
|
||||
if ($this->c->config->o_pms_enabled == '1' && ($this->user->isAdmin || $this->user->messages_new > 0)) { //????
|
||||
$nav['pmsnew'] = ['pmsnew.php', \ForkBB\__('PM')]; //'<li id="nav"'.((PUN_ACTIVE_PAGE == 'pms_new' || $user['messages_new'] > 0) ? ' class="isactive"' : '').'><a href="pmsnew.php">'.\ForkBB\__('PM').(($user['messages_new'] > 0) ? ' (<span'.((empty($this->c->config->o_pms_flasher) || PUN_ACTIVE_PAGE == 'pms_new') ? '' : ' class="remflasher"' ).'>'.$user['messages_new'].'</span>)' : '').'</a></li>';
|
||||
$nav['pmsnew'] = ['pmsnew.php', 'PM']; //'<li id="nav"'.((PUN_ACTIVE_PAGE == 'pms_new' || $user['messages_new'] > 0) ? ' class="isactive"' : '').'><a href="pmsnew.php">'.\ForkBB\__('PM').(($user['messages_new'] > 0) ? ' (<span'.((empty($this->c->config->o_pms_flasher) || PUN_ACTIVE_PAGE == 'pms_new') ? '' : ' class="remflasher"' ).'>'.$user['messages_new'].'</span>)' : '').'</a></li>';
|
||||
}
|
||||
// New PMS
|
||||
|
||||
if ($this->user->isAdmMod) {
|
||||
$nav['admin'] = [$r->link('Admin'), \ForkBB\__('Admin')];
|
||||
$nav['admin'] = [$r->link('Admin'), 'Admin'];
|
||||
}
|
||||
|
||||
$nav['logout'] = [$r->link('Logout', [
|
||||
'token' => $this->c->Csrf->create('Logout'),
|
||||
]), \ForkBB\__('Logout')];
|
||||
]), 'Logout'];
|
||||
}
|
||||
|
||||
if ($this->user->g_read_board == '1' && $this->c->config->o_additional_navlinks != '') {
|
||||
|
|
|
@ -408,7 +408,7 @@ class Search extends Page
|
|||
$model->linkMarker = $advanced ? 'SearchAdvanced' : 'Search';
|
||||
$model->linkArgs = $args;
|
||||
break;
|
||||
case 'last':
|
||||
case 'latest':
|
||||
case 'unanswered':
|
||||
$list = $model->actionT($action);
|
||||
$model->name = \ForkBB\__('Quick search show_' . $action);
|
||||
|
|
|
@ -31,7 +31,7 @@ class ActionT extends Method
|
|||
case 'search':
|
||||
$list = $this->model->queryIds;
|
||||
break;
|
||||
case 'last':
|
||||
case 'latest':
|
||||
$sql = 'SELECT t.id
|
||||
FROM ::topics AS t
|
||||
WHERE t.forum_id IN (?ai:forums) AND t.moved_to IS NULL
|
||||
|
|
|
@ -352,7 +352,7 @@ msgid "Menu items label"
|
|||
msgstr "Additional menu items"
|
||||
|
||||
msgid "Menu items help"
|
||||
msgstr "You can add any number of new items in the menu. Each line specifies one item in the format: <b>Position</b>|<b>Name</b>|<b>Link</b><i>[|<b>Identifier</b>]</i>."
|
||||
msgstr "You can add any number of new items in the menu. Each line specifies one item in the format: <b>Position</b><wbr>|<b>Name</b><wbr>|<b>Link</b><wbr><i>[|<b>Identifier</b>]</i>."
|
||||
|
||||
msgid "Feed subhead"
|
||||
msgstr "Syndication"
|
||||
|
|
|
@ -319,33 +319,6 @@ msgstr "Administration"
|
|||
msgid "Last visit"
|
||||
msgstr "Last visit: %s"
|
||||
|
||||
msgid "Topic searches"
|
||||
msgstr "Topics:"
|
||||
|
||||
msgid "New posts header"
|
||||
msgstr "New"
|
||||
|
||||
msgid "Active topics"
|
||||
msgstr "Active"
|
||||
|
||||
msgid "Unanswered topics"
|
||||
msgstr "Unanswered"
|
||||
|
||||
msgid "Posted topics"
|
||||
msgstr "Posted"
|
||||
|
||||
msgid "Show new posts"
|
||||
msgstr "Find topics with new posts since your last visit."
|
||||
|
||||
msgid "Show active topics"
|
||||
msgstr "Find topics with recent posts."
|
||||
|
||||
msgid "Show unanswered topics"
|
||||
msgstr "Find topics with no replies."
|
||||
|
||||
msgid "Show posted topics"
|
||||
msgstr "Find topics you have posted to."
|
||||
|
||||
msgid "Title separator"
|
||||
msgstr " - "
|
||||
|
||||
|
@ -492,3 +465,21 @@ msgstr "%s PiB"
|
|||
|
||||
msgid "%s EiB"
|
||||
msgstr "%s EiB"
|
||||
|
||||
msgid "Latest active topics"
|
||||
msgstr "Latest active topics"
|
||||
|
||||
msgid "Find latest active topics"
|
||||
msgstr "Find latest active topics"
|
||||
|
||||
msgid "Unanswered topics"
|
||||
msgstr "Unanswered topics"
|
||||
|
||||
msgid "Find unanswered topics"
|
||||
msgstr "Find unanswered topics"
|
||||
|
||||
msgid "Topics with your posts"
|
||||
msgstr "Topics with your posts"
|
||||
|
||||
msgid "Find topics with your posts"
|
||||
msgstr "Find topics with your posts"
|
||||
|
|
|
@ -102,8 +102,8 @@ msgstr "Search results"
|
|||
msgid "Quick search show_new"
|
||||
msgstr "New"
|
||||
|
||||
msgid "Quick search show_recent"
|
||||
msgstr "Active"
|
||||
msgid "Quick search show_latest"
|
||||
msgstr "Latest active"
|
||||
|
||||
msgid "Quick search show_unanswered"
|
||||
msgstr "Unanswered"
|
||||
|
|
|
@ -352,7 +352,7 @@ msgid "Menu items label"
|
|||
msgstr "Дополнительные пункты меню"
|
||||
|
||||
msgid "Menu items help"
|
||||
msgstr "Можно добавить любое количество пунктов в меню. Каждая строка задает один пункт в формате: <b>Позиция</b>|<b>Наименование</b>|<b>Ссылка</b><i>[|<b>Идентификатор</b>]</i>."
|
||||
msgstr "Можно добавить любое количество пунктов в меню. Каждая строка задает один пункт в формате: <b>Позиция</b><wbr>|<b>Наименование</b><wbr>|<b>Ссылка</b><wbr><i>[|<b>Идентификатор</b>]</i>."
|
||||
|
||||
msgid "Feed subhead"
|
||||
msgstr "Ленты"
|
||||
|
|
|
@ -321,33 +321,6 @@ msgstr "Админка"
|
|||
msgid "Last visit"
|
||||
msgstr "Последний визит: %s"
|
||||
|
||||
msgid "Topic searches"
|
||||
msgstr "Темы:"
|
||||
|
||||
msgid "New posts header"
|
||||
msgstr "Новые"
|
||||
|
||||
msgid "Active topics"
|
||||
msgstr "Активные"
|
||||
|
||||
msgid "Unanswered topics"
|
||||
msgstr "Без ответа"
|
||||
|
||||
msgid "Posted topics"
|
||||
msgstr "С вашим участием"
|
||||
|
||||
msgid "Show new posts"
|
||||
msgstr "Найти темы с новыми сообщениями."
|
||||
|
||||
msgid "Show active topics"
|
||||
msgstr "Найти темы с недавними сообщениями."
|
||||
|
||||
msgid "Show unanswered topics"
|
||||
msgstr "Найти темы без ответов."
|
||||
|
||||
msgid "Show posted topics"
|
||||
msgstr "Найти темы с вашим участием."
|
||||
|
||||
msgid "Title separator"
|
||||
msgstr " - "
|
||||
|
||||
|
@ -494,3 +467,21 @@ msgstr "%s Пбайт"
|
|||
|
||||
msgid "%s EiB"
|
||||
msgstr "%s Эбайт"
|
||||
|
||||
msgid "Latest active topics"
|
||||
msgstr "Последние активные темы"
|
||||
|
||||
msgid "Find latest active topics"
|
||||
msgstr "Найти последние активные темы"
|
||||
|
||||
msgid "Unanswered topics"
|
||||
msgstr "Темы без ответа"
|
||||
|
||||
msgid "Find unanswered topics"
|
||||
msgstr "Найти темы без ответа"
|
||||
|
||||
msgid "Topics with your posts"
|
||||
msgstr "Темы с вашим участием"
|
||||
|
||||
msgid "Find topics with your posts"
|
||||
msgstr "Найти темы с вашим участием"
|
||||
|
|
|
@ -102,8 +102,8 @@ msgstr "Результаты поиска"
|
|||
msgid "Quick search show_new"
|
||||
msgstr "Темы с новыми сообщениями"
|
||||
|
||||
msgid "Quick search show_recent"
|
||||
msgstr "Активные темы"
|
||||
msgid "Quick search show_latest"
|
||||
msgstr "Последние активные темы"
|
||||
|
||||
msgid "Quick search show_unanswered"
|
||||
msgstr "Темы без ответа"
|
||||
|
|
|
@ -22,12 +22,27 @@
|
|||
@endif
|
||||
</div>
|
||||
@if ($p->fNavigation)
|
||||
<nav class="f-main-nav f-menu">
|
||||
<nav class="f-main-nav f-menu @if (isset($p->fNavigation['search'])) f-main-nav-search @endif">
|
||||
<input id="id-mn-checkbox" class="f-menu-checkbox" type="checkbox" style="display: none;">
|
||||
<label class="f-menu-toggle" for="id-mn-checkbox"></label>
|
||||
<ul class="f-menu-items">
|
||||
@foreach ($p->fNavigation as $key => $val)
|
||||
<li id="id-nav-{{ $key }}" class="f-menu-item"><a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{!! $val[0] !!}">{!! $val[1] !!}</a></li>
|
||||
<li id="id-nav-{!! $key !!}" class="f-menu-item"><!-- inline -->
|
||||
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{!! __($val[0]) !!}">{!! __($val[1]) !!}</a>
|
||||
@if (isset($val[3]))
|
||||
<ul class="f-submenu-items">
|
||||
@foreach ($val[3] as $key => $val)
|
||||
<li id="id-nav-{!! $key !!}" class="f-menu-item">
|
||||
@if (isset($val[0]))
|
||||
<a class="f-menu-a" href="{!! __($val[0]) !!}" title="{!! __($val[2]) !!}">{!! __($val[1]) !!}</a>
|
||||
@else
|
||||
<span class="f-menu-span">{!! __($val[1]) !!}</span>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</li><!-- endinline -->
|
||||
@endforeach
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.color-primary-1 { color: #583200 }
|
||||
.color-primary-2 { color: #814A00 }
|
||||
.color-primary-3 { color: #D3B58D }
|
||||
.color-primary-4 { color: #FCFCFC } /* #FEFCF2 #F8F4E3 */
|
||||
.color-primary-4 { color: #FCFCFC } /* #FEFCF2 #F8F4E3 #FFEBCD */
|
||||
|
||||
/****************/
|
||||
/* Сброс стилей */
|
||||
|
@ -53,7 +53,6 @@ article {
|
|||
ul,
|
||||
ol {
|
||||
list-style: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*******************/
|
||||
|
@ -327,6 +326,15 @@ select {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
.f-main-nav .f-submenu-items {
|
||||
background-color: #FFEBCD; /* #D3B58D; */
|
||||
}
|
||||
|
||||
.f-main-nav .f-submenu-items .f-menu-a {
|
||||
text-transform: none;
|
||||
padding: 0.3125rem 0.625rem;
|
||||
}
|
||||
|
||||
.f-main-nav .f-menu-a:hover,
|
||||
.f-main-nav .f-menu-a:focus {
|
||||
background-color: #583200;
|
||||
|
@ -356,6 +364,20 @@ select {
|
|||
.f-main-nav .f-menu-a {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.f-main-nav-search {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
#id-nav-search .f-submenu-items {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
} /* @media screen and (min-width: 50rem) */
|
||||
|
||||
/*********/
|
||||
|
@ -473,6 +495,7 @@ select {
|
|||
.f-fdiv .f-child6 {
|
||||
display: block;
|
||||
width: 100%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.f-fdiv .f-child1 {
|
||||
|
|
Loading…
Reference in a new issue