DEV: Редакторинг (Route)

+ FIX: локализация
+ Упростим шаблоны
This commit is contained in:
Evg 2022-05-11 12:29:37 +03:00
parent 92a01f7d49
commit 1ce4cab724
94 changed files with 413 additions and 365 deletions

View file

@ -19,7 +19,7 @@ class AnswerController extends MainController
// All answers
// Все ответы
public function index($sheet, $type)
public function index($sheet)
{
$pageNumber = Tpl::pageNumber();
@ -39,7 +39,7 @@ class AnswerController extends MainController
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'sheet' => $sheet,
'type' => $type,
'type' => 'answers',
'answers' => $answers,
]
]

View file

@ -5,7 +5,7 @@ namespace App\Controllers\Answer;
use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\{AnswerModel, PostModel};
use Content, Validation, Tpl, Meta, Html, UserData;
use Validation, Tpl, Meta, Html, UserData;
class EditAnswerController extends MainController
{

View file

@ -5,7 +5,7 @@ namespace App\Controllers;
use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\{ContentModel, ActionModel, AuditModel, NotificationModel, PostModel};
use Config, UserData, Html, Validation;
use UserData, Html, Validation;
class AuditController extends MainController
{
@ -95,7 +95,7 @@ class AuditController extends MainController
public static function infoMsg($tl, $content)
{
Validation::Returns(__('validation.limit_day', ['tl' => '«'. __('app.trust_level') .'» '. $tl, 'name' => __('app.' . $content)]), 'error', '/');
Validation::Returns(__('validation.limit_day', ['tl' => '«' . __('app.trust_level') . '» ' . $tl, 'name' => __('app.' . $content)]), 'error', '/');
}
// For URL trigger

View file

@ -18,7 +18,7 @@ class CommentController extends MainController
}
// Все комментарии
public function index($sheet, $type)
public function index($sheet)
{
$pageNumber = Tpl::pageNumber();
@ -38,7 +38,7 @@ class CommentController extends MainController
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'sheet' => $sheet,
'type' => $type,
'type' => 'comments',
'comments' => $comments,
]
]

View file

@ -5,7 +5,7 @@ namespace App\Controllers\Comment;
use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\{CommentModel, PostModel};
use Content, Tpl, Html, UserData;
use Tpl, Html, UserData;
class EditCommentController extends MainController
{
@ -51,7 +51,7 @@ class EditCommentController extends MainController
// If the user is frozen
(new \App\Controllers\AuditController())->stopContentQuietМode($this->user['limiting_mode']);
$post = PostModel::getPost($comment['comment_post_id'], 'id', $this->user);
Html::pageRedirection($post, '/');

View file

@ -4,7 +4,7 @@ namespace App\Controllers;
use Hleb\Scheme\App\Controllers\MainController;
use App\Models\HomeModel;
use Config, Tpl, UserData, Meta, Language, Translate;
use Tpl, UserData, Meta;
class HomeController extends MainController
{
@ -17,8 +17,8 @@ class HomeController extends MainController
$this->user = UserData::get();
}
public function index($sheet, $type)
{
public function index($sheet)
{
$pageNumber = Tpl::pageNumber();
if ($sheet == 'main.deleted' && !UserData::checkAdmin()) {
@ -35,8 +35,8 @@ class HomeController extends MainController
$topics = \App\Models\FacetModel::advice($this->user['id']);
}
$title = __('meta-main.' . $sheet . '.title', ['name' => config('meta.name')]);
$description = __('meta-main.' . $sheet . '.desc', ['name' => config('meta.name')]);
$title = __('meta-main.' . $sheet . '_title', ['name' => config('meta.name')]);
$description = __('meta-main.' . $sheet . '_desc', ['name' => config('meta.name')]);
$m = [
'main' => 'main',
@ -53,7 +53,7 @@ class HomeController extends MainController
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'sheet' => $sheet,
'type' => $type,
'type' => 'main',
'latest_answers' => $latest_answers,
'topics_user' => $topics_user,
'posts' => $posts,

View file

@ -6,7 +6,7 @@ use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\User\UserModel;
use App\Models\{MessagesModel, NotificationModel};
use Content, Config, Validation, Tpl, Html, Meta, UserData;
use Content, Validation, Tpl, Html, Meta, UserData;
class MessagesController extends MainController
{
@ -27,7 +27,7 @@ class MessagesController extends MainController
} else {
$dialog_ids = null;
}
$result = [];
if ($messages_dialog) {

View file

@ -6,7 +6,7 @@ use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\User\UserModel;
use App\Models\{FacetModel, PostModel};
use Content, UploadImage, Validation, Tpl, Meta, Html, UserData;
use UploadImage, Validation, Tpl, Meta, Html, UserData;
class EditPostController extends MainController
{

View file

@ -5,7 +5,7 @@ namespace App\Controllers;
use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\RssModel;
use Content, Config, Tpl, Html;
use Content, Tpl, Html;
class RssController extends MainController
{

View file

@ -5,7 +5,7 @@ namespace App\Controllers\User;
use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\User\{InvitationModel, UserModel};
use Validation, SendEmail, Tpl, Meta, Html, Config, UserData;
use Validation, SendEmail, Tpl, Meta, Html, UserData;
class InvitationsController extends MainController
{

View file

@ -6,7 +6,7 @@ use Hleb\Scheme\App\Controllers\MainController;
use Hleb\Constructor\Handlers\Request;
use App\Models\User\{UserModel, BadgeModel};
use App\Models\{FacetModel, PostModel, FeedModel, AnswerModel, CommentModel};
use Config, Tpl, Meta, Html, UserData;
use Tpl, Meta, Html, UserData;
class ProfileController extends MainController
{
@ -21,7 +21,7 @@ class ProfileController extends MainController
// Member page (profile)
// Страница участника (профиль)
function index($sheet, $type)
function index()
{
$pageNumber = Tpl::pageNumber();
$profile = self::profile();
@ -30,8 +30,8 @@ class ProfileController extends MainController
$profile['about'] = __('app.riddle') . '...';
}
$posts = FeedModel::feed($pageNumber, $this->limit, $this->user, $sheet, $profile['id']);
$pagesCount = FeedModel::feedCount($this->user, $sheet, $profile['id']);
$posts = FeedModel::feed($pageNumber, $this->limit, $this->user, 'profile.posts', $profile['id']);
$pagesCount = FeedModel::feedCount($this->user, 'profile.posts', $profile['id']);
$count = UserModel::contentCount($profile['id']);
if (($count['count_answers'] + $count['count_comments']) < 3) {
@ -41,7 +41,7 @@ class ProfileController extends MainController
return Tpl::LaRender(
'/user/profile/index',
[
'meta' => self::metadata($sheet, $profile),
'meta' => self::metadata('profile.posts', $profile),
'data' => [
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
@ -51,9 +51,7 @@ class ProfileController extends MainController
'blogs' => FacetModel::getOwnerFacet($profile['id'], 'blog'),
'badges' => BadgeModel::getBadgeUserAll($profile['id']),
'profile' => $profile,
'type' => $type,
'posts' => $posts,
'sheet' => $sheet,
'participation' => FacetModel::participation($profile['id']),
'post' => PostModel::getPost($profile['my_post'], 'id', $this->user),
'button_pm' => $this->accessPm($profile['id']),
@ -62,23 +60,21 @@ class ProfileController extends MainController
);
}
public function posts($sheet, $type)
public function posts()
{
$pageNumber = Tpl::pageNumber();
$profile = self::profile();
$posts = FeedModel::feed($pageNumber, $this->limit, $this->user, $sheet, $profile['id']);
$pagesCount = FeedModel::feedCount($this->user, $sheet, $profile['id']);
$posts = FeedModel::feed($pageNumber, $this->limit, $this->user, 'profile.posts', $profile['id']);
$pagesCount = FeedModel::feedCount($this->user, 'profile.posts', $profile['id']);
return Tpl::LaRender(
'/user/profile/post',
[
'meta' => self::metadata($sheet . '.all', $profile),
'meta' => self::metadata('profile.posts.all', $profile),
'data' => [
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'sheet' => $sheet,
'type' => $type,
'posts' => $posts,
'profile' => $profile,
'count' => UserModel::contentCount($profile['id']),
@ -92,7 +88,7 @@ class ProfileController extends MainController
);
}
public function answers($sheet, $type)
public function answers()
{
$pageNumber = Tpl::pageNumber();
$profile = self::profile();
@ -103,12 +99,10 @@ class ProfileController extends MainController
return Tpl::LaRender(
'/user/profile/answer',
[
'meta' => self::metadata($sheet, $profile),
'meta' => self::metadata('profile.answers', $profile),
'data' => [
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'sheet' => $sheet,
'type' => $type,
'answers' => $answers,
'profile' => $profile,
'count' => UserModel::contentCount($profile['id']),
@ -123,7 +117,7 @@ class ProfileController extends MainController
}
// Комментарии участника
public function comments($sheet, $type)
public function comments()
{
$pageNumber = Tpl::pageNumber();
$profile = self::profile();
@ -134,12 +128,10 @@ class ProfileController extends MainController
return Tpl::LaRender(
'/user/profile/comment',
[
'meta' => self::metadata($sheet, $profile),
'meta' => self::metadata('profile.comments', $profile),
'data' => [
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'sheet' => $sheet,
'type' => $type,
'comments' => $comments,
'profile' => $profile,
'count' => UserModel::contentCount($profile['id']),

View file

@ -11,6 +11,7 @@ return [
'all' => 'All',
'deleted' => 'Remote',
'other' => 'Other',
'number' => 'Quantity',
'website' => 'Website',
'being_developed' => 'Being developed',
'schemas' => 'Scheme',

View file

@ -174,6 +174,7 @@ return [
'add_post' => 'Add post',
'add_topic' => 'Add Topic',
'add_blog' => 'Add blog',
'add_category' => 'Add category',
'edit_post' => 'Edit post',
'edit_topic' => 'Edit Topic',
'edit_blog' => 'Edit blog',

View file

@ -27,6 +27,7 @@ return [
'add_topic' => 'A topic is a node (for navigation) used by the system to organize content. The theme is a single point of view, the interpretation of various things, phenomena and other concepts.',
'add_blog' => 'Add a blog (in development).',
'add_category' => 'Add category (in development).',
'edit_topic' => 'Change theme (in development).',
'edit_blog' => 'Edit blog (in development).',
];

View file

@ -9,15 +9,15 @@
*/
return [
'main.feed.title' => '{name} — community (topics, blogs of interest)',
'main.top.title' => '{name} — popular posts',
'main.all.title' => '{name} — all posts ',
'main.feed.desc' => 'Interest topics, feed, blogs. Conversations, questions and answers, interesting facts. Scripts CMS and social networks, Frameworks. Script {name}.',
'main.top.desc' => 'List of popular posts in the community feed (by number of replies). Topics by interest. Conversations, questions and answers, comments. Script {name}.',
'main.all.desc' => 'List of all posts in the community feed. Script {name}.',
'feed_title' => '{name} — community (topics, blogs of interest)',
'top_title' => '{name} — popular posts',
'all_title' => '{name} — all posts ',
'feed_desc' => 'Interest topics, feed, blogs. Conversations, questions and answers, interesting facts. Scripts CMS and social networks, Frameworks. Script {name}.',
'top_desc' => 'List of popular posts in the community feed (by number of replies). Topics by interest. Conversations, questions and answers, comments. Script {name}.',
'all_desc' => 'List of all posts in the community feed. Script {name}.',
'main.feed.info' => 'Posts in chronological order...',
'main.all.info' => 'All posts in the community feed...',
'main.top.info' => 'Recently active posts...',
'main.deleted.title' => 'Deleted posts',
'feed_info' => 'Posts in chronological order...',
'all_info' => 'All posts in the community feed...',
'top_info' => 'Recently active posts...',
'deleted_title' => 'Deleted posts',
];

View file

@ -11,6 +11,7 @@ return [
'all' => 'Toate',
'deleted' => 'la distanta',
'other' => 'Alte',
'number' => 'Cantitate',
'website' => 'Site-ul web',
'being_developed' => 'In dezvoltare',
'schemas' => 'Sistem',

View file

@ -174,6 +174,7 @@ return [
'add_post' => 'Adaugă postare',
'add_topic' => 'Adaugă subiect',
'add_blog' => 'Adaugă blog',
'add_category' => 'Adăugați o categorie',
'edit_post' => 'Editează postarea',
'edit_topic' => 'Editați subiectul',
'edit_blog' => 'Editează blogul',

View file

@ -27,6 +27,7 @@ return [
'add_topic' => 'Un subiect este un nod (pentru navigare) folosit de sistem pentru a organiza conținutul. Tema este un singur punct de vedere, interpretarea diferitelor lucruri, fenomene și alte concepte.',
'add_blog' => 'Adăugați un blog (în dezvoltare).',
'add_category' => 'Adăugați categorie (în dezvoltare).',
'edit_topic' => 'Schimbați tema (în dezvoltare).',
'edit_blog' => 'Изменить блог (в разработке).',
];

View file

@ -9,15 +9,15 @@
*/
return [
'main.feed.title' => '{name} — comunitate (subiecte, bloguri de interes)',
'main.top.title' => '{name} — postari populare',
'main.all.title' => '{name} — toate postările',
'main.feed.desc' => 'Subiecte de interes, feed, bloguri. Conversații, întrebări și răspunsuri, fapte interesante. Scripturi CMS și rețele sociale, Framework. Scenariul {name}.',
'main.top.desc' => 'Lista postărilor populare din feedul comunității (după numărul de răspunsuri). Subiecte după interes. Conversații, întrebări și răspunsuri, comentarii. Scenariul {name}.',
'main.all.desc' => 'Lista tuturor postărilor din feedul comunității. Scenariul {name}.',
'feed_title' => '{name} — comunitate (subiecte, bloguri de interes)',
'top_title' => '{name} — postari populare',
'all_title' => '{name} — toate postările',
'feed_desc' => 'Subiecte de interes, feed, bloguri. Conversații, întrebări și răspunsuri, fapte interesante. Scripturi CMS și rețele sociale, Framework. Scenariul {name}.',
'top_desc' => 'Lista postărilor populare din feedul comunității (după numărul de răspunsuri). Subiecte după interes. Conversații, întrebări și răspunsuri, comentarii. Scenariul {name}.',
'all_desc' => 'Lista tuturor postărilor din feedul comunității. Scenariul {name}.',
'main.feed.info' => 'Postări în ordine cronologică...',
'main.all.info' => 'Toate postările din feedul comunității...',
'main.top.info' => 'Postări active recent...',
'main.deleted.title' => 'Postări șterse',
'feed_info' => 'Postări în ordine cronologică...',
'all_info' => 'Toate postările din feedul comunității...',
'top_info' => 'Postări active recent...',
'deleted_title' => 'Postări șterse',
];

View file

@ -11,6 +11,7 @@ return [
'all' => 'Все',
'deleted' => 'Удаленные',
'other' => 'Другое',
'number' => 'Количество',
'website' => 'Сайт',
'being_developed' => 'В стадии разработки',
'schemas' => 'Схемы',

View file

@ -174,6 +174,7 @@ return [
'add_post' => 'Добавить пост',
'add_topic' => 'Добавить тему',
'add_blog' => 'Добавить блог',
'add_category' => 'Добавить категорию',
'edit_post' => 'Изменить пост',
'edit_topic' => 'Изменить тему',
'edit_blog' => 'Изменить блог',

View file

@ -27,6 +27,7 @@ return [
'add_topic' => 'Тема — то узел (для навигации), используемый системой для организации контента. Тема является единой точкой взода, интерпретацией различных вещей, явлений и других понятий.',
'add_blog' => 'Добавить блог (в разработке).',
'add_category' => 'Добавить категорию (в разработке).',
'edit_topic' => 'Изменить тему (в разработке).',
'edit_blog' => 'Изменить блог (в разработке).',
];

View file

@ -9,15 +9,15 @@
*/
return [
'main.feed.title' => '{name} — сообщество (темы, блоги по интересам)',
'main.top.title' => '{name} — популярные посты',
'main.all.title' => '{name} — все посты ',
'main.feed.desc' => 'Темы по интересам, лента, блоги. Беседы, вопросы и ответы, интересные факты. Скрипты CMS и социальных сетей, Фреймворки. Скрипт {name}.',
'main.top.desc' => 'Список популярных постов в ленте сообщества (по количеству ответов). Темы по интересам. Беседы, вопросы и ответы, комментарии. Скрипт {name}.',
'main.all.desc' => 'Список всех постов в ленте сообщества. Скрипт {name}.',
'feed_title' => '{name} — сообщество (темы, блоги по интересам)',
'top_title' => '{name} — популярные посты',
'all_title' => '{name} — все посты ',
'feed_desc' => 'Темы по интересам, лента, блоги. Беседы, вопросы и ответы, интересные факты. Скрипты CMS и социальных сетей, Фреймворки. Скрипт {name}.',
'top_desc' => 'Список популярных постов в ленте сообщества (по количеству ответов). Темы по интересам. Беседы, вопросы и ответы, комментарии. Скрипт {name}.',
'all_desc' => 'Список всех постов в ленте сообщества. Скрипт {name}.',
'main.feed.info' => 'Посты в хронологическом порядке...',
'main.all.info' => 'Все посты в ленте сообщества...',
'main.top.info' => 'Активные посты за последнее время...',
'main.deleted.title' => 'Удаленные посты',
'feed_info' => 'Посты в хронологическом порядке...',
'all_info' => 'Все посты в ленте сообщества...',
'top_info' => 'Активные посты за последнее время...',
'deleted_title' => 'Удаленные посты',
];

View file

@ -159,10 +159,10 @@ class Html
if (UserData::getAccount()) {
$blue = $tid ? 'sky' : 'gray-600';
$my = $tid ? 'bi-bookmark-dash' : 'bi-bookmark-plus';
$html .= '<span id="favorite_' . $content_id . '" class="add-favorite fav-' . $ind . ' ' . $blue . ' ' . $css . '" data-ind="' . $ind . '" data-id="' . $content_id . '" data-type="' . $type . '"><i class="' . $my . ' middle"></i></span>';
$html .= '<span id="favorite_' . $content_id . '" class="add-favorite fav-' . $ind . ' ' . $blue . ' ' . $css . '" data-ind="' . $ind . '" data-id="' . $content_id . '" data-type="' . $type . '"><i class="' . $my . '"></i></span>';
} else {
$html .= '<span class="click-no-auth gray-600 ' . $css . '">
<i class="bi-bookmark-plus middle"></i>
<i class="bi-bookmark-plus"></i>
</span>';
}

View file

@ -104,10 +104,10 @@ class AnswerModel extends \Hleb\Scheme\App\Models\MainModel
public static function sorts($sheet)
{
switch ($sheet) {
case 'answers.all':
case 'all':
$sort = "WHERE answer_is_deleted = 0 AND post_tl = 0 AND post_is_deleted = 0";
break;
case 'answers.deleted':
case 'deleted':
$sort = "WHERE answer_is_deleted = 1";
break;
}

View file

@ -135,10 +135,10 @@ class CommentModel extends \Hleb\Scheme\App\Models\MainModel
public static function sorts($user, $sheet)
{
switch ($sheet) {
case 'comments.all':
case 'all':
$sort = "WHERE comment_is_deleted = 0";
break;
case 'comments.deleted':
case 'deleted':
$sort = "WHERE comment_is_deleted = 1";
break;
}

View file

@ -17,7 +17,7 @@ class HomeModel extends \Hleb\Scheme\App\Models\MainModel
}
$string = "";
if ($type != 'main.all' && $type != 'main.top') {
if ($type != 'all' && $type != 'top') {
if (!$user['id']) {
$string = "";
} else {
@ -29,7 +29,7 @@ class HomeModel extends \Hleb\Scheme\App\Models\MainModel
$display = self::display($type, $user['trust_level']);
$sort = "ORDER BY post_top DESC, post_date DESC";
if ($type == 'main.top') $sort = "ORDER BY post_votes and post_date > CURDATE()-INTERVAL 3 WEEK DESC";
if ($type == 'top') $sort = "ORDER BY post_votes and post_date > CURDATE()-INTERVAL 3 WEEK DESC";
$start = ($page - 1) * $limit;
$sql = "SELECT DISTINCT
@ -139,7 +139,7 @@ class HomeModel extends \Hleb\Scheme\App\Models\MainModel
if ($trust_level == 10) {
$display = "AND post_is_deleted = 0";
if ($type == 'main.deleted') {
if ($type == 'deleted') {
$display = "AND post_is_deleted = 1";
}
} elseif ($trust_level > 0) {

View file

@ -37,3 +37,15 @@ function config(string $key = null)
return Config::get($key);
}
function is_current($url)
{
if ($url == Request::getUri()) return true;
/* $segments = explode('/', Request::getUri());
foreach ($segments as $key => $segment) {
if ($url == '/' . $segment) return 'active';
} */
return false;
}

View file

@ -46,7 +46,6 @@ class Audits
[
'meta' => Meta::get('admin.' . __($type)),
'data' => [
'sheet' => $sheet,
'type' => $type,
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
@ -56,47 +55,6 @@ class Audits
);
}
// Member activity log
// Журнал логов действий участников
public function logs($sheet, $type)
{
$pageNumber = Tpl::pageNumber();
$logs = LogModel::getLogs($pageNumber, $this->limit);
$pagesCount = LogModel::getLogsCount();
return view(
'/view/default/audit/logs',
[
'meta' => Meta::get(__('admin.logs')),
'data' => [
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'type' => $type,
'sheet' => $sheet,
'logs' => $logs,
]
]
);
}
// Search log
// Журнал логов поиска
public function logsSearch($sheet, $type)
{
return view(
'/view/default/audit/logs-search',
[
'meta' => Meta::get(__('admin.logs')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'logs' => (new \Modules\Search\App\Search())->getLogs(100),
]
]
);
}
// Approve audit
// Одобрить аудит
public function status()

View file

@ -8,17 +8,18 @@ use Validation, Meta, Html;
class Badges
{
protected $type = 'badges';
// All awards
// Все награды
public function index($sheet, $type)
public function index()
{
return view(
'/view/default/badge/badges',
[
'meta' => Meta::get(__('admin.badges')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'type' => $this->type,
'badges' => BadgeModel::getAll(),
]
]
@ -27,15 +28,14 @@ class Badges
// Form for adding an award
// Форма добавления награды
public function addPage($sheet, $type)
public function add()
{
return view(
'/view/default/badge/add',
[
'meta' => Meta::get(__('admin.badges')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'type' => $this->type,
]
]
);
@ -43,7 +43,7 @@ class Badges
// Reward change form
// Форма изменения награды
public function editPage($sheet, $type)
public function edit()
{
$badge_id = Request::getInt('id');
$badge = BadgeModel::getId($badge_id);
@ -55,8 +55,7 @@ class Badges
'meta' => Meta::get(__('admin.edit')),
'data' => [
'badge' => $badge,
'sheet' => $sheet,
'type' => $type,
'type' => $this->type,
]
]
);
@ -90,7 +89,7 @@ class Badges
// Participant award form
// Форма награждения участника
public function addUserPage($sheet, $type)
public function addUser()
{
$user_id = Request::getInt('id');
$user = UserModel::getUser($user_id, 'id');
@ -100,8 +99,7 @@ class Badges
[
'meta' => Meta::get(__('admin.badges')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'type' => $this->type,
'user' => $user ?? null,
'badges' => BadgeModel::getAll(),
]
@ -109,7 +107,7 @@ class Badges
);
}
public function addUser()
public function rewarding()
{
$uid = Request::getPostInt('user_id');
BadgeModel::badgeUserAdd(
@ -122,7 +120,7 @@ class Badges
Validation::ComeBack('msg.successfully', 'success', url('admin.user.edit', ['id' => $uid]));
}
public function edit()
public function change()
{
$badge_id = Request::getInt('id');
$badge = BadgeModel::getId($badge_id);

View file

@ -17,7 +17,7 @@ class Console
}
self::$choice();
}
public static function topic()
{
ConsoleModel::recalculateTopic();
@ -39,9 +39,9 @@ class Console
// Если пользователь имеет нулевой уровень доверия (tl) но ему UP >=3, то повышаем до 1
// If the user has a zero level of trust (tl) but he has UP >=3, then we raise it to 1
public static function tl()
{
{
$users = ConsoleModel::getTrustLevel(0);
foreach ($users as $row) {
foreach ($users as $row) {
if ($row['up_count'] > 2) {
ConsoleModel::setTrustLevel($row['id'], 1);
}
@ -51,7 +51,7 @@ class Console
}
public static function indexer()
{
{
(new \Modules\Admin\App\Search\Indexer)->indexerAll();
self::consoleRedirect();
@ -75,7 +75,7 @@ class Console
}
public static function consoleRedirect()
{
{
if (PHP_SAPI != 'cli') {
Html::addMsg(__('admin.completed'), 'success');
}

View file

@ -0,0 +1,52 @@
<?php
namespace Modules\Admin\App;
use Modules\Admin\App\Models\LogModel;
use Meta, Tpl;
class Logs
{
protected $type = 'logs';
protected $limit = 55;
// Member activity log
// Журнал логов действий участников
public function index()
{
$pageNumber = Tpl::pageNumber();
$logs = LogModel::getLogs($pageNumber, $this->limit);
$pagesCount = LogModel::getLogsCount();
return view(
'/view/default/logs/index',
[
'meta' => Meta::get(__('admin.logs')),
'data' => [
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'type' => 'logs',
'logs' => $logs,
]
]
);
}
// Search log
// Журнал логов поиска
public function logsSearch()
{
return view(
'/view/default/logs/search',
[
'meta' => Meta::get(__('admin.logs')),
'data' => [
'type' => $this->type,
'logs' => (new \Modules\Search\App\Search())->getLogs(100),
]
]
);
}
}

View file

@ -36,7 +36,7 @@ class LogModel extends \Hleb\Scheme\App\Models\MainModel
public static function getAuditsAll($page, $limit, $sheet, $type)
{
$sort = $sheet == 'audits.ban' ? 'AND a.read_flag = 1' : 'AND a.read_flag = 0';
$sort = $sheet == 'ban' ? 'AND a.read_flag = 1' : 'AND a.read_flag = 0';
$type = $type == 'audits' ? 'audit' : 'report';
$sort = $type == 'report' ? '' : $sort;
@ -60,7 +60,7 @@ class LogModel extends \Hleb\Scheme\App\Models\MainModel
public static function getAuditsAllCount($sheet, $type)
{
$sort = "read_flag = 0";
if ($sheet == 'audits.ban') {
if ($sheet == 'ban') {
$sort = "read_flag = 1";
}

View file

@ -11,7 +11,7 @@ class UserModel extends \Hleb\Scheme\App\Models\MainModel
public static function getUsers($page, $limit, $sheet)
{
$string = "ORDER BY id DESC LIMIT";
if ($sheet == 'users.ban') {
if ($sheet == 'ban') {
$string = "WHERE ban_list > 0 ORDER BY id DESC LIMIT";
}
@ -47,7 +47,7 @@ class UserModel extends \Hleb\Scheme\App\Models\MainModel
public static function getUsersCount($sheet)
{
$string = "";
if ($sheet == 'users.ban') {
if ($sheet == 'ban') {
$string = "WHERE ban_list > 0";
}

View file

@ -6,15 +6,14 @@ use Meta;
class Tools
{
public function index($sheet, $type)
public function index()
{
return view(
'/view/default/tools/tools',
[
'meta' => Meta::get(__('admin.tools')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'type' => 'tools',
]
]
);

View file

@ -9,9 +9,11 @@ use Validation, Meta, Html, Tpl;
class Users
{
protected $type = 'users';
protected $limit = 50;
public function index($sheet, $type)
public function index($sheet)
{
$pageNumber = Tpl::pageNumber();
$pagesCount = UserModel::getUsersCount($sheet);
@ -34,8 +36,7 @@ class Users
'pagesCount' => ceil($pagesCount / $this->limit),
'pNum' => $pageNumber,
'alluser' => $result,
'sheet' => $sheet,
'type' => $type,
'type' => $this->type,
'users_count' => $pagesCount,
]
]
@ -65,8 +66,7 @@ class Users
'data' => [
'results' => $results,
'option' => $option,
'type' => 'users',
'sheet' => ''
'type' => $this->type,
]
]
);
@ -83,7 +83,7 @@ class Users
}
// Страница редактирование участника
public function userEditPage($sheet, $type)
public function edit()
{
$user_id = Request::getInt('id');
if (!$user = UserModel::getUser($user_id, 'id')) redirect(url('admin'));
@ -98,8 +98,7 @@ class Users
[
'meta' => Meta::get(__('admin.edit')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'type' => $this->type,
'count' => UserModel::contentCount($user_id),
'user' => $user,
]
@ -108,7 +107,7 @@ class Users
}
// Редактировать участника
public function edit()
public function change()
{
$login = Request::getPost('login');
$user_id = Request::getInt('id');

View file

@ -8,7 +8,9 @@ use Meta, Validation;
class Words
{
public function index($sheet, $type)
protected $type = 'words';
public function index()
{
return view(
'/view/default/word/words',
@ -16,23 +18,21 @@ class Words
'meta' => Meta::get(__('admin.words')),
'data' => [
'words' => ContentModel::getStopWords(),
'sheet' => $sheet,
'type' => $type,
'type' => $this->type,
]
]
);
}
// Форма добавления стоп-слова
public function addPage($sheet, $type)
public function add()
{
return view(
'/view/default/word/add',
[
'meta' => Meta::get(__('admin.word')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'type' => $this->type,
]
]
);

View file

@ -19,7 +19,7 @@
'url' => url('admin.reports'),
'name' => __('admin.reports'),
'icon' => 'bi-record-circle',
]
]
]
]
); ?>
@ -57,7 +57,7 @@
<i class="bi-pencil"></i>
</a>
<span class="mr5 ml5"> &#183; </span>
<?= $audit['content'][$audit['action_type'] . '_date']; ?>
<?= $audit['content'][$audit['action_type'] . '_date']; ?>
<span class="mr5 ml5"> &#183; </span>
<?= __('admin.type'); ?>: <i><?= $audit['action_type']; ?></i>
@ -90,23 +90,23 @@
</td>
<td class="center">
<?php if ($audit['type_belonging'] == 'audit') : ?>
<?php if ($audit['read_flag'] == 1) : ?>
id:
<a href="<?= url('admin.user.edit', ['id' => $audit['audit_id']]); ?>">
<?= $audit['user_id']; ?>
</a>
<?php else : ?>
<a data-status="<?= $audit['action_type']; ?>" data-id="<?= $audit['content'][$audit['action_type'] . '_id']; ?>" class="audit-status text-sm">
<?= __('admin.approve'); ?>
</a>
<div class="text-xs"><?= __('admin.off_mode'); ?></div>
<?php endif; ?>
<?php if ($audit['read_flag'] == 1) : ?>
id:
<a href="<?= url('admin.user.edit', ['id' => $audit['audit_id']]); ?>">
<?= $audit['user_id']; ?>
</a>
<?php else : ?>
<a data-status="<?= $audit['action_type']; ?>" data-id="<?= $audit['content'][$audit['action_type'] . '_id']; ?>" class="audit-status text-sm">
<?= __('admin.approve'); ?>
</a>
<div class="text-xs"><?= __('admin.off_mode'); ?></div>
<?php endif; ?>
<?php else : ?>
<div class="<?php if ($audit['read_flag'] == 0) : ?> bg-red-200<?php endif; ?>">
<span class="report-saw" data-id="<?= $audit['audit_id']; ?>">
<i class="bi-record-circle gray text-2xl"></i>
</span>
</div>
</div>
<?php endif; ?>
</td>
</tr>

View file

@ -6,7 +6,7 @@
'menus' => [
[
'id' => 'add',
'url' => url($data['type'] . '.add'),
'url' => url('admin.badges.add'),
'name' => __('admin.add'),
'icon' => 'bi-plus-lg'
]

View file

@ -20,15 +20,15 @@ Request::getHead()->addStyles('/assets/css/style.css?09');
</a>
</div>
<div class="relative w-90">
<a class="gray-600" href="<?= url('admin.users'); ?>">
<a class="ml0<?= is_current(url('admin.users')) ? ' active' : ' gray-600'; ?>" href="<?= url('admin.users'); ?>">
<i class="bi-people middle mr5"></i>
<span class="mb-none middle"><?= __('admin.users'); ?></span>
</a>
<a class="gray-600 ml30" href="<?= url('admin.facets.all'); ?>">
<a class="ml30<?= is_current(url('admin.facets.all')) ? ' active' : ' gray-600'; ?>" href="<?= url('admin.facets.all'); ?>">
<i class="bi-columns-gap middle mr5"></i>
<span class="mb-none middle text-sm"><?= __('admin.facets'); ?></span>
</a>
<a class="gray-600 ml30" href="<?= url('admin.tools'); ?>">
<a class="ml30<?= is_current(url('admin.tools')) ? ' active' : ' gray-600'; ?>" href="<?= url('admin.tools'); ?>">
<i class="bi-tools middle mr5"></i>
<span class="mb-none middle text-sm"><?= __('admin.tools'); ?></span>
</a>

View file

@ -5,6 +5,11 @@
'meta' => $meta,
'menus' => [
[
'id' => 'audits.all',
'url' => url('admin.logs'),
'name' => __('admin.logs'),
'icon' => 'bi-record-circle',
], [
'id' => 'audits.all',
'url' => url('admin.logs.search'),
'name' => __('admin.search'),

View file

@ -5,6 +5,11 @@
'meta' => $meta,
'menus' => [
[
'id' => 'audits.all',
'url' => url('admin.logs'),
'name' => __('admin.logs'),
'icon' => 'bi-record-circle',
], [
'id' => 'logssearch.all',
'url' => url('admin.logs.search'),
'name' => __('admin.search'),
@ -18,9 +23,9 @@
<?php if ($data['logs']) : ?>
<table>
<thead>
<th><?= __('admin.request'); ?></th>
<th><?= __('admin.query'); ?></th>
<th><?= __('admin.time'); ?></th>
<th class="w60"><?= __('admin.results'); ?></th>
<th class="w60"><?= __('admin.number'); ?></th>
</thead>
<?php foreach ($data['logs'] as $log) : ?>
<tr>

View file

@ -24,7 +24,7 @@
<?php if (!empty($data['users_count'])) : ?><?= $data['users_count'] ?><?php endif; ?>
<ul class="flex flex-row list-none m0 p0 center">
<?php foreach ($menus as $menu) : ?>
<a class="ml30 mb-mr5 mb-ml10 gray<?php if ($menu['id'] == $data['sheet']) : ?> sky<?php endif; ?>" href="<?= $menu['url']; ?>" <?php if ($menu['id'] == $data['sheet']) { ?> aria-current="page" <?php } ?>>
<a class="ml30 mb-mr5 mb-ml10<?= is_current($menu['url']) ? ' active' : ' gray'; ?>" href="<?= $menu['url']; ?>">
<i class="<?= $menu['icon']; ?> mr5"></i>
<span><?= $menu['name']; ?></span>
</a>

View file

@ -3,7 +3,8 @@
namespace Modules\Catalog\App;
use Modules\Catalog\App\Models\{WebModel, UserAreaModel};
use Domain, UserData, Html;
use Utopia\Domains\Domain;
use UserData, Html;
class Checks
{

View file

@ -29,7 +29,7 @@ class Home
return view(
'/view/default/home',
[
'meta' => Meta::get(__('web.' . $sheet. '_title'), __('web.' . $sheet . '_desc'), $m),
'meta' => Meta::get(__('web.' . $sheet . '_title'), __('web.' . $sheet . '_desc'), $m),
'data' => [
'screening' => 'all',
'items' => WebModel::getItemsAll(1, $this->limit, $this->user, $sheet),

View file

@ -5,7 +5,7 @@ namespace Modules\Catalog\App;
use Hleb\Constructor\Handlers\Request;
use Modules\Catalog\App\Models\{WebModel, ReplyModel};
use App\Models\{ActionModel, NotificationModel};
use UserData, Html, Validation, Content;
use UserData, Html, Validation;
class Reply
{

View file

@ -16,17 +16,17 @@ class UserArea
$this->user = UserData::get();
}
public function index($sheet, $type)
public function index()
{
$pageNumber = Tpl::pageNumber();
$pagesCount = UserAreaModel::getUserSitesCount($this->user['id']);
$items = UserAreaModel::getUserSites($pageNumber, $this->limit, $this->user['id']);
$count_site = UserData::checkAdmin() ? 0 : $pagesCount;
$m = [
'og' => true,
'imgurl' => config('meta.img_path_web'),
'url' => url($sheet),
];
return view(
@ -40,9 +40,8 @@ class UserArea
'count' => $pagesCount,
'pNum' => $pageNumber,
'items' => $items,
'user_count_site' => $pagesCount,
'type' => $type,
'sheet' => $sheet,
'user_count_site' => $count_site,
'sheet' => 'sites',
]
]
);
@ -50,7 +49,7 @@ class UserArea
// Bookmarks by sites
// Закладки по сайтам
public function bookmarks($sheet, $type)
public function bookmarks()
{
$pageNumber = Tpl::pageNumber();
@ -66,8 +65,7 @@ class UserArea
'user' => $this->user,
'data' => [
'screening' => 'cat',
'sheet' => $sheet,
'type' => $type,
'sheet' => 'web.bookmarks',
'count' => $pagesCount,
'pagesCount' => ceil($pagesCount / $this->limit),
'user_count_site' => $count_site,

View file

@ -1,28 +0,0 @@
<?php if (UserData::checkAdmin()) : ?>
<li>
<a href="<?= url('web.audits'); ?>">
<i class="bi bi-exclamation-diamond"></i>
<?= __('web.audits'); ?>
<?php if (!empty($data['audit_count'])) : ?><span class="red ml5">(<?= $data['audit_count']; ?>)</span><?php endif; ?>
</a>
</li>
<?php endif; ?>
<li>
<a href="<?= url('web.user.sites'); ?>">
<i class="bi-plus-lg"></i>
<?= __('web.my_website'); ?>
<?php if ($data['user_count_site'] != 0) : ?>
(<?= $data['user_count_site']; ?>)
<?php endif; ?>
</a>
</li>
<?php if (UserData::getRegType(config('trust-levels.tl_add_site'))) : ?>
<?php if (config('trust-levels.count_add_site') > $data['user_count_site']) : ?>
<li>
<a href="<?= url('web.add'); ?>">
<i class="bi-plus-lg"></i>
<?= __('web.add_website'); ?>
</a>
</li>
<?php endif; ?>
<?php endif; ?>

View file

@ -23,7 +23,7 @@
try {
const fetchResponse = await fetch('/search/category', settings);
return await fetchResponse.json();
} catch (e) {
} catch (e) {
return e;
}
};
@ -70,6 +70,6 @@
<?php else : ?>
tagify.addTags([])
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
});
</script>

View file

@ -0,0 +1,52 @@
<li>
<a <?= is_current(url('web.user.sites')) ? 'class="active"' : ''; ?> href="<?= url('web.user.sites'); ?>">
<i class="bi-plus-lg"></i> <?= __('web.my_website'); ?>
<?php if ($data['user_count_site'] != 0) : ?>
(<?= $data['user_count_site']; ?>)
<?php endif; ?>
</a>
</li>
<?php if (UserData::getRegType(config('trust-levels.tl_add_site'))) : ?>
<?php if (config('trust-levels.count_add_site') > $data['user_count_site']) : ?>
<li>
<a href="<?= url('web.add'); ?>">
<i class="bi-plus-lg"></i> <?= __('web.add_website'); ?>
</a>
</li>
<?php endif; ?>
<?php endif; ?>
<li>
<a <?= is_current(url('web.bookmarks')) ? 'class="active"' : ''; ?> href="<?= url('web.bookmarks'); ?>">
<i class="bi-bookmark"></i> <?= __('web.bookmarks'); ?>
</a>
</li>
<?php if (UserData::checkAdmin()) : ?>
<li class="uppercase-box mt15"><?= __('admin.home'); ?></li>
<li>
<a href="<?= url('content.add', ['type' => 'category']); ?>">
<i class="bi-plus-lg"></i> <?= __('web.add_category'); ?>
</a>
</li>
<li>
<a <?= is_current(url('web.audits')) ? 'class="active"' : ''; ?> href="<?= url('web.audits'); ?>">
<i class="bi bi-exclamation-diamond"></i> <?= __('web.audits'); ?>
<?php if (!empty($data['audit_count'])) : ?><span class="red ml5">(<?= $data['audit_count']; ?>)</span><?php endif; ?>
</a>
</li>
<li>
<a <?= is_current(url('web.deleted')) ? 'class="active"' : ''; ?> href="<?= url('web.deleted'); ?>">
<i class="bi-circle"></i> <?= __('web.deleted'); ?>
</a>
</li>
<li>
<a href="<?= url('admin.facets.type', ['type' => 'category']); ?>">
<i class="bi-columns-gap"></i> <?= __('web.facets'); ?>
</a>
</li>
<?php endif; ?>

View file

@ -43,8 +43,7 @@
<div class="box text-sm bg-violet mt15">
<h3 class="uppercase-box"><?= __('web.menu'); ?></h3>
<ul class="menu">
<?= includeTemplate('/view/default/_block/add-site', ['data' => $data]); ?>
<?= Tpl::insert('/_block/navigation/menu', ['type' => $data['sheet'], 'list' => config('catalog/menu.user')]); ?>
<?= includeTemplate('/view/default/_block/menu', ['data' => $data]); ?>
</ul>
</div>
<?php endif; ?>

View file

@ -20,8 +20,7 @@
<div class="box text-sm bg-violet mt15">
<h3 class="uppercase-box"><?= __('web.menu'); ?></h3>
<ul class="menu">
<?= includeTemplate('/view/default/_block/add-site', ['data' => $data]); ?>
<?= Tpl::insert('/_block/navigation/menu', ['type' => $data['sheet'], 'list' => config('catalog/menu.user')]); ?>
<?= includeTemplate('/view/default/_block/menu', ['data' => $data]); ?>
</ul>
</div>
<?php endif; ?>

View file

@ -70,8 +70,7 @@
<div class="box text-sm bg-violet mt15">
<h3 class="uppercase-box"><?= __('web.menu'); ?></h3>
<ul class="menu">
<?= includeTemplate('/view/default/_block/add-site', ['data' => $data]); ?>
<?= Tpl::insert('/_block/navigation/menu', ['type' => $data['sheet'], 'list' => config('catalog/menu.user')]); ?>
<?= includeTemplate('/view/default/_block/menu', ['data' => $data]); ?>
</ul>
</div>
<?php endif; ?>

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
<?php
$type = $type ?? '';
foreach ($list as $key => $item) :
$tl = $item['tl'] ?? 0; ?>
<?php if (!empty($item['hr'])) : ?>

View file

@ -3,7 +3,7 @@
foreach ($list as $key => $item) :
$tl = $item['tl'] ?? 0; ?>
<?php if (UserData::getRegType($tl)) :
$isActive = $item['id'] == $type ? ' aria-current="page" class="active" ' : ''; ?>
$isActive = is_current($item['url']) ? ' aria-current="page" class="active" ' : ''; ?>
<li><a <?= $isActive; ?> href="<?= $item['url']; ?>">
<i class="text-sm <?= $item['icon']; ?>"></i>

View file

@ -1,7 +1,7 @@
<main>
<div class="box-flex justify-between">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.answers')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.answers')]); ?>
</ul>
<div class="trigger">
<i class="bi-info-square gray-600"></i>

View file

@ -3,24 +3,26 @@ $form = new Forms();
$form->html_form(UserData::getUserTl(), config('form/auth.login'));
?>
<main class="max-w780 mr-auto box">
<h1 class="center"><?= __('app.authorization'); ?></h1>
<form class="max-w300" action="<?= url('login'); ?>" method="post">
<?php csrf_field(); ?>
<main class="box w-100">
<div class="pl20">
<h1><?= __('app.authorization'); ?></h1>
<form class="max-w300" action="<?= url('login'); ?>" method="post">
<?php csrf_field(); ?>
<?= $form->build_form(); ?>
<?= $form->build_form(); ?>
<fieldset>
<?= Html::sumbit(__('app.sign_in')); ?>
<?php if (config('general.invite') == false) : ?>
<a class="ml20 text-sm" href="<?= url('register'); ?>"><?= __('app.registration'); ?></a>
<?php endif; ?>
<a class="ml20 text-sm" href="<?= url('recover'); ?>"><?= __('app.forgot_password'); ?>?</a>
</fieldset>
</form>
<?php if (config('general.invite') == 1) : ?>
<?= __('app.invate_text'); ?>
<?php endif; ?>
<p><?= __('app.agree_rules'); ?>.</p>
<p><?= __('app.login_info'); ?></p>
<fieldset>
<?= Html::sumbit(__('app.sign_in')); ?>
<?php if (config('general.invite') == false) : ?>
<a class="ml20 text-sm" href="<?= url('register'); ?>"><?= __('app.registration'); ?></a>
<?php endif; ?>
<a class="ml20 text-sm" href="<?= url('recover'); ?>"><?= __('app.forgot_password'); ?>?</a>
</fieldset>
</form>
<?php if (config('general.invite') == 1) : ?>
<?= __('app.invate_text'); ?>
<?php endif; ?>
<p><?= __('app.agree_rules'); ?>.</p>
<p><?= __('help.login_info'); ?></p>
</div>
</main>

View file

@ -1,6 +1,6 @@
<main class="max-w780 mr-auto box">
<h1 class="center"><?= __('app.password_recovery'); ?></h1>
<div class="box wide">
<main class="box w-100">
<div class="pl20">
<h1><?= __('app.password_recovery'); ?></h1>
<form action="<?= url('recover'); ?>/send/pass" method="post">
<?php csrf_field(); ?>
<fieldset>

View file

@ -1,23 +1,25 @@
<main class="max-w780 mr-auto box">
<h1 class="center"><?= __('app.' . $data['sheet']); ?></h1>
<form class="form max-w300" action="<?= url('recover.send'); ?>" method="post">
<?php csrf_field(); ?>
<main class="box w-100">
<div class="pl20">
<h1><?= __('app.' . $data['sheet']); ?></h1>
<form class="form max-w300" action="<?= url('recover.send'); ?>" method="post">
<?php csrf_field(); ?>
<fieldset>
<label for="post_title"><?= __('app.email'); ?></label>
<input type="email" required="" name="email">
</fieldset>
<fieldset>
<label for="post_title"><?= __('app.email'); ?></label>
<input type="email" required="" name="email">
</fieldset>
<?= Tpl::insert('/_block/captcha'); ?>
<?= Tpl::insert('/_block/captcha'); ?>
<fieldset>
<?= Html::sumbit(__('app.reset')); ?>
<?php if (config('general.invite') == false) : ?>
<span class="mr5 ml15 text-sm"><a href="<?= url('register'); ?>"><?= __('app.registration'); ?></a></span>
<?php endif; ?>
<span class="mr5 ml15 text-sm"><a href="<?= url('login'); ?>"><?= __('app.sign_in'); ?></a></span>
</fieldset>
</form>
<p><?= __('app.agree_rules'); ?>.</p>
<p><?= __('app.recover_info'); ?></p>
<fieldset>
<?= Html::sumbit(__('app.reset')); ?>
<?php if (config('general.invite') == false) : ?>
<span class="mr5 ml15 text-sm"><a href="<?= url('register'); ?>"><?= __('app.registration'); ?></a></span>
<?php endif; ?>
<span class="mr5 ml15 text-sm"><a href="<?= url('login'); ?>"><?= __('app.sign_in'); ?></a></span>
</fieldset>
</form>
<p><?= __('app.agree_rules'); ?>.</p>
<p><?= __('help.recover_info'); ?></p>
</div>
</main>

View file

@ -4,16 +4,18 @@ $form->adding(['name' => 'email', 'type' => 'value', 'var' => $data['invate']['i
$form->html_form(UserData::getUserTl(), config('form/auth.register'));
?>
<main class="box w-100">
<h1><?= __('app.reg_invite'); ?></h1>
<form class="max-w300" action="<?= url('register'); ?>/add" method="post">
<?php csrf_field(); ?>
<div class="pl20">
<h1><?= __('app.reg_invite'); ?></h1>
<form class="max-w300" action="<?= url('register'); ?>/add" method="post">
<?php csrf_field(); ?>
<?= $form->build_form(); ?>
<?= $form->build_form(); ?>
<fieldset>
<input type="hidden" name="invitation_code" value="<?= $data['invate']['invitation_code']; ?>">
<input type="hidden" name="invitation_id" value="<?= $data['invate']['uid']; ?>">
<?= Html::sumbit(__('app.registration')); ?>
</fieldset>
</form>
<fieldset>
<input type="hidden" name="invitation_code" value="<?= $data['invate']['invitation_code']; ?>">
<input type="hidden" name="invitation_id" value="<?= $data['invate']['uid']; ?>">
<?= Html::sumbit(__('app.registration')); ?>
</fieldset>
</form>
</div>
</main>

View file

@ -2,20 +2,22 @@
$form = new Forms();
$form->html_form(UserData::getUserTl(), config('form/auth.register'));
?>
<main class="max-w780 mr-auto box">
<h1 class="center"><?= __('app.' . $data['sheet']); ?></h1>
<form class="max-w300" action="<?= url('register.add'); ?>" method="post">
<?php csrf_field(); ?>
<main class="box w-100">
<div class="pl20">
<h1><?= __('app.' . $data['sheet']); ?></h1>
<form class="max-w300" action="<?= url('register.add'); ?>" method="post">
<?php csrf_field(); ?>
<?= $form->build_form(); ?>
<?= $form->build_form(); ?>
<?= Tpl::insert('/_block/captcha'); ?>
<?= Tpl::insert('/_block/captcha'); ?>
<fieldset>
<?= Html::sumbit(__('app.registration')); ?>
<a class="ml15 text-sm" href="<?= url('login'); ?>"><?= __('app.sign_in'); ?></a>
</fieldset>
</form>
<p><?= __('app.agree_rules'); ?>.</p>
<p><?= __('app.security_info'); ?></p>
<fieldset>
<?= Html::sumbit(__('app.registration')); ?>
<a class="ml15 text-sm" href="<?= url('login'); ?>"><?= __('app.sign_in'); ?></a>
</fieldset>
</form>
<p><?= __('app.agree_rules'); ?>.</p>
<p><?= __('help.security_info'); ?></p>
</div>
</main>

View file

@ -1,7 +1,7 @@
<main>
<div class="box-flex justify-between">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.comments')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.comments')]); ?>
</ul>
<div class="trigger">
<i class="bi-info-square gray-600"></i>

View file

@ -12,7 +12,6 @@
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => $data['type'] . 's.all',

View file

@ -11,7 +11,6 @@ $url = $fs['facet_type'] == 'category' ? url('web.dir', ['cat' => 'cat', 'slug'
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => 'all',

View file

@ -36,7 +36,6 @@
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => 'facet.feed',

View file

@ -1,13 +1,13 @@
<main>
<div class="box-flex justify-between">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.home')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.home')]); ?>
</ul>
<div class="trigger">
<i class="bi-info-square gray-600"></i>
</div>
<div class="dropdown tooltip"><?= __('meta-main.' . $data['sheet'] . '.info'); ?></div>
<div class="dropdown tooltip"><?= __('meta-main.' . $data['sheet'] . '_info'); ?></div>
</div>
<?= Tpl::insert('/content/post/post', ['data' => $data]); ?>

View file

@ -7,7 +7,7 @@
<?php endif; ?>
<?php $post_url = url('post', ['id' => $post['post_id'], 'slug' => $post['post_slug']]); ?>
<div class="box article_<?= $post['post_id']; ?>">
<?php if ($data['sheet'] == 'subscribed') : ?>
<?php if (Request::getMainUrl() == '/subscribed') : ?>
<div data-id="<?= $post['post_id']; ?>" data-type="post" class="focus-id bg-violet text-sm right">
<?= __('app.unsubscribe'); ?>
</div>

View file

@ -12,7 +12,6 @@
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => $data['type'] . 's.all',

View file

@ -1,7 +1,7 @@
<main>
<div class="box-flex">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.favorites')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.favorites')]); ?>
</ul>
</div>

View file

@ -1,6 +1,6 @@
<div class="box-flex justify-between">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.favorites')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.favorites')]); ?>
</ul>
<div class="text-sm">

View file

@ -9,7 +9,7 @@
<div class="box">
<?= Tpl::insert('/content/answer/answer', ['data' => $data]); ?>
</div>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/answers'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/answers'); ?>
<?php else : ?>
<?= Tpl::insert('/_block/no-content', ['type' => 'small', 'text' => __('app.no_answers'), 'icon' => 'bi-info-lg']); ?>
<?php endif; ?>

View file

@ -9,7 +9,7 @@
<div class="box">
<?= Tpl::insert('/content/comment/comment', ['answer' => $data['comments']]); ?>
</div>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/comments'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/comments'); ?>
<?php else : ?>
<?= Tpl::insert('/_block/no-content', ['type' => 'small', 'text' => __('app.no_comments'), 'icon' => 'bi-info-lg']); ?>
<?php endif; ?>

View file

@ -3,7 +3,7 @@
<div class="flex gap">
<main class="col-two">
<?= Tpl::insert('/content/post/post', ['data' => $data]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/posts'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/posts'); ?>
</main>
<aside>
<?= Tpl::insert('/content/user/profile/sidebar', ['data' => $data]); ?>

View file

@ -7,7 +7,7 @@
</div>
<?= Tpl::insert('/content/post/post', ['data' => $data]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/posts'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/posts'); ?>
</main>
<aside>
<?= Tpl::insert('/content/user/profile/sidebar', ['data' => $data]); ?>

View file

@ -1,5 +1,5 @@
<div class="box-flex">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.settings')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.settings')]); ?>
</ul>
</div>

View file

@ -1,13 +1,14 @@
<?php
$css = '';
$type = $data['type'] ?? '';
$arr = ['register', 'login', 'recover', 'post'];
if (in_array($data['type'], $arr)) {
if (in_array($type, $arr)) {
$css = ' none';
}
?>
<nav class="menu__left<?= $css; ?> mb-none">
<ul class="menu sticky top-sm">
<?= Tpl::insert('/_block/navigation/menu', ['type' => $data['type'], 'list' => config('navigation/menu.left')]); ?>
<?= Tpl::insert('/_block/navigation/menu', ['type' => $type, 'list' => config('navigation/menu.left')]); ?>
</ul>
</nav>

View file

@ -38,6 +38,7 @@ font-display: swap;
.bi-layout-split::before { content: "\f460"; }
.bi-house::before { content: "\f425"; }
.bi-bezier2::before { content: "\f18c"; }
.bi-trophy::before { content: "\f5e7"; }
.bi-arrow-return-right::before { content: "\f132"; }
.bi-sort-down::before { content: "\f575"; }
.bi-circle::before { content: "\f28a"; }

View file

@ -12,7 +12,6 @@
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => $data['type'] . 's.all',

View file

@ -11,7 +11,6 @@ $url = $fs['facet_type'] == 'category' ? url('web.dir', ['cat' => 'cat', 'slug'
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => 'all',

View file

@ -36,7 +36,6 @@
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => 'facet.feed',

View file

@ -1,7 +1,7 @@
<main class="col-two">
<div class="box-flex ml10">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.home')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.home')]); ?>
</ul>
</div>

View file

@ -55,7 +55,7 @@
</div>
</div>
<?php if ($data['sheet'] == 'subscribed') : ?>
<?php if (Request::getMainUrl() == '/subscribed') : ?>
<div data-id="<?= $post['post_id']; ?>" data-type="post" class="focus-id bg-violet text-sm right">
<?= __('app.unsubscribe'); ?>
</div>

View file

@ -11,7 +11,6 @@
<?= Tpl::insert(
'/_block/navigation/nav',
[
'type' => $data['sheet'],
'list' => [
[
'id' => $data['type'] . 's.all',

View file

@ -1,7 +1,7 @@
<main class="col-two">
<div class="box bg-violet">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.favorites')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.favorites')]); ?>
</ul>
</div>
<?php if (!empty($data['drafts'])) : ?>

View file

@ -1,6 +1,6 @@
<div class="box-flex justify-between">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.favorites')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.favorites')]); ?>
</ul>
<div class="text-sm">
<i class="bi-plus-lg gray-600 mr5"></i>

View file

@ -7,7 +7,7 @@
</div>
<?php if (!empty($data['answers'])) : ?>
<?= Tpl::insert('/content/answer/answer', ['data' => $data]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/answers'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/answers'); ?>
<?php else : ?>
<?= Tpl::insert('/_block/no-content', ['type' => 'small', 'text' => __('app.no_answers'), 'icon' => 'bi-info-lg']); ?>
<?php endif; ?>

View file

@ -8,7 +8,7 @@
</div>
<?php if (!empty($data['comments'])) : ?>
<?= Tpl::insert('/content/comment/comment', ['answer' => $data['comments']]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/comments'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/comments'); ?>
<?php else : ?>
<?= Tpl::insert('/_block/no-content', ['type' => 'small', 'text' => __('app.no_comments'), 'icon' => 'bi-info-lg']); ?>
<?php endif; ?>

View file

@ -5,7 +5,7 @@
<main class="col-two">
<?= Tpl::insert('/content/post/post', ['data' => $data]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/posts'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/posts'); ?>
</main>
<aside>
<?= Tpl::insert('/content/user/profile/sidebar', ['data' => $data]); ?>

View file

@ -8,7 +8,7 @@
</div>
<?= Tpl::insert('/content/post/post', ['data' => $data]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/@' . $data['profile']['login'] . '/posts'); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, '/@' . $data['profile']['login'] . '/posts'); ?>
</main>
<aside>
<?= Tpl::insert('/content/user/profile/sidebar', ['data' => $data]); ?>

View file

@ -1,5 +1,5 @@
<div class="box-flex bg-violet">
<ul class="nav">
<?= Tpl::insert('/_block/navigation/nav', ['type' => $data['sheet'], 'list' => config('navigation/nav.settings')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.settings')]); ?>
</ul>
</div>

View file

@ -20,7 +20,7 @@ $facet = $data['facet'] ?? false; ?>
<ul class="nav ml30">
<?php $sheet = $data['sheet'] ?? false; ?>
<?= Tpl::insert('/_block/navigation/nav', ['type' => $sheet, 'list' => config('navigation/nav.home')]); ?>
<?= Tpl::insert('/_block/navigation/nav', ['list' => config('navigation/nav.home')]); ?>
</ul>
</div>

View file

@ -23,51 +23,50 @@ Route::before('Designator', [UserData::REGISTERED_ADMIN, '='])->getGroup();
Route::get('/badge/user/create')->module('admin', 'App\Badges@addUser')->name('admin.user.badge.create');
Route::get('/badge/create')->module('admin', 'App\Badges@create')->name('admin.badge.create');
Route::get('/badge/edit/{id}')->module('admin', 'App\Badges@edit')->where(['id' => '[0-9]+'])->name('admin.badge.change');
Route::get('/badge/edit/{id}')->module('admin', 'App\Badges@change')->name('admin.badge.change');
Route::get('/word/create')->module('admin', 'App\Words@create')->name('admin.word.create');
Route::get('/user/edit/{id}')->module('admin', 'App\Users@edit')->where(['id' => '[0-9]+'])->name('admin.user.change');
Route::get('/user/edit/{id}')->module('admin', 'App\Users@change')->name('admin.user.change');
Route::endProtect();
Route::endType();
Route::get('/tools')->module('admin', 'App\Tools', ['tools.all', 'tools'])->name('admin.tools');
Route::get('/tools')->module('admin', 'App\Tools')->name('admin.tools');
Route::get('/search')->module('admin', 'App\Search\Search')->name('admin.search');
Route::get('/search/query')->module('admin', 'App\Search\Search@query')->name('admin.search.query');
Route::get('/search/edit/{id}')->module('admin', 'App\Search\Search@editForm')->where(['ip' => '[0-9].+'])->name('admin.search.edit.form');
Route::get('/search/schemas')->module('admin', 'App\Search\Search@schemas')->name('admin.search.schemas');
Route::get('/users/ban')->module('admin', 'App\Users', ['users.ban', 'users'])->name('admin.users.ban');
Route::get('/users/{id}/edit')->module('admin', 'App\Users@userEditPage', ['users.edit', 'users'])->where(['id' => '[0-9]+'])->name('admin.user.edit');
Route::get('/users/{page?}')->module('admin', 'App\Users', ['users.all', 'users'])->name('admin.users');
Route::get('/users/ban')->module('admin', 'App\Users', ['ban'])->name('admin.users.ban');
Route::get('/users/{id}/edit')->module('admin', 'App\Users@edit', ['edit'])->name('admin.user.edit');
Route::get('/users/{page?}')->module('admin', 'App\Users', ['all'])->name('admin.users');
Route::get('/logip/{ip}')->module('admin', 'App\Users@logsIp', ['logip'])->where(['ip' => '[0-9].+'])->name('admin.logip');
Route::get('/regip/{ip}')->module('admin', 'App\Users@logsIp', ['regip'])->where(['ip' => '[0-9].+'])->name('admin.regip');
Route::get('/logip/{ip}')->module('admin', 'App\Users@logsIp', ['users.logip', 'users'])->where(['ip' => '[0-9].+'])->name('admin.logip');
Route::get('/regip/{ip}')->module('admin', 'App\Users@logsIp', ['users.regip', 'users'])->where(['ip' => '[0-9].+'])->name('admin.regip');
Route::get('/audits')->module('admin', 'App\Audits', ['audits.all', 'audits'])->name('admin.audits');
Route::get('/audits/approved')->module('admin', 'App\Audits', ['audits.ban', 'audits'])->name('admin.audits.ban');
Route::get('/report')->module('admin', 'App\Audits', ['reports.all', 'reports'])->name('admin.reports');
Route::get('/audits')->module('admin', 'App\Audits', ['all', 'audits'])->name('admin.audits');
Route::get('/audits/approved')->module('admin', 'App\Audits', ['ban', 'audits'])->name('admin.audits.ban');
Route::get('/report')->module('admin', 'App\Audits', ['all', 'reports'])->name('admin.reports');
Route::get('/invitations')->module('admin', 'App\Invitations')->name('admin.invitations');
Route::get('/answers/deleted/{page?}')->controller('Answer\AnswerController', ['answers.deleted', 'answers'])->name('answers.deleted');
Route::get('/comments/deleted/{page?}')->controller('Comment\CommentController', ['comments.deleted', 'comments'])->name('comments.deleted');
Route::get('/answers/deleted/{page?}')->controller('Answer\AnswerController', ['deleted'])->name('answers.deleted');
Route::get('/comments/deleted/{page?}')->controller('Comment\CommentController', ['deleted'])->name('comments.deleted');
Route::get('/web/deleted/{page?}')->module('catalog', 'App\Home', ['deleted'])->name('web.deleted');
Route::get('/web/audits/{page?}')->module('catalog', 'App\Home', ['audits'])->name('web.audits');
Route::get('/badges')->module('admin', 'App\Badges', ['badges.all', 'badges'])->name('admin.badges');
Route::get('/badges/add')->module('admin', 'App\Badges@addPage', ['add', 'badges'])->name('badges.add');
Route::get('/badges/{id}/edit')->module('admin', 'App\Badges@editPage', ['badges.edit', 'badges'])->where(['id' => '[0-9]+'])->name('admin.badges.edit');
Route::get('/badges/user/add/{id}')->module('admin', 'App\Badges@addUserPage', ['add', 'badges'])->where(['id' => '[0-9]+'])->name('admin.badges.user.add');
Route::get('/badges')->module('admin', 'App\Badges')->name('admin.badges');
Route::get('/badges/add')->module('admin', 'App\Badges@add')->name('admin.badges.add');
Route::get('/badges/{id}/edit')->module('admin', 'App\Badges@edit')->name('admin.badges.edit');
Route::get('/badges/user/add/{id}')->module('admin', 'App\Badges@addUser')->name('admin.badges.user.add');
Route::get('/words/add')->module('admin', 'App\Words@addPage', ['add', 'words'])->name('words.add');
Route::get('/words')->module('admin', 'App\Words', ['words.all', 'words'])->name('admin.words');
Route::get('/words/add')->module('admin', 'App\Words@add')->name('words.add');
Route::get('/words')->module('admin', 'App\Words')->name('admin.words');
Route::get('/facets')->module('admin', 'App\Facets')->name('admin.facets.all');
Route::get('/facets/{type}')->module('admin', 'App\Facets@type')->where(['type' => '[a-z]+'])->name('admin.facets.type');
Route::get('/facets/ban/{type}')->module('admin', 'App\Facets@ban')->where(['type' => '[a-z]+'])->name('admin.facets.ban.type');
Route::get('/css')->module('admin', 'App\Home@css')->name('admin.css');
Route::get('/logs/search')->module('admin', 'App\Audits@logsSearch', ['logssearch.all', 'logs'])->name('admin.logs.search');
Route::get('/logs/{page?}')->module('admin', 'App\Audits@logs', ['logs.all', 'logs'])->name('admin.logs');
Route::get('/logs/search')->module('admin', 'App\Logs@logsSearch')->name('admin.logs.search');
Route::get('/logs/{page?}')->module('admin', 'App\Logs')->name('admin.logs');
Route::endGroup();

View file

@ -50,8 +50,8 @@ Route::before('Designator', [UserData::USER_FIRST_LEVEL, '>='])->getGroup();
Route::get('/@{login}/delete/cover')->controller('User\SettingController@coverRemove')->where(['login' => '[A-Za-z0-9]+'])->name('delete.cover');
Route::get('/@{login}/messages')->controller('MessagesController@messages')->where(['login' => '[A-Za-z0-9]+'])->name('send.messages');
Route::get('/web/bookmarks')->module('catalog', 'App\UserArea@bookmarks', ['web.bookmarks', 'web'])->name('web.bookmarks');
Route::get('/web/my/{page?}')->module('catalog', 'App\UserArea', ['web.user.sites', 'sites'])->name('web.user.sites');
Route::get('/web/bookmarks')->module('catalog', 'App\UserArea@bookmarks')->name('web.bookmarks');
Route::get('/web/my/{page?}')->module('catalog', 'App\UserArea')->name('web.user.sites');
Route::get('/teams')->module('teams', 'App\Teams')->name('teams');
Route::get('/team/add')->module('teams', 'App\Teams@add')->name('team.add');
@ -80,9 +80,9 @@ Route::before('Designator', [UserData::USER_FIRST_LEVEL, '>='])->getGroup();
Route::get('/blogs/my')->controller('Facets\AllFacetController', ['blogs.my', 'blog'])->name('blogs.my');
Route::get('/all/{page?}')->controller('HomeController', ['main.all', 'main'])->name('main.all');
Route::get('/all/{page?}')->controller('HomeController', ['all'])->name('main.all');
Route::get('/deleted/{page?}')->controller('HomeController', ['main.deleted', 'main'])->name('main.deleted');
Route::get('/deleted/{page?}')->controller('HomeController', ['deleted'])->name('main.deleted');
Route::endGroup();
Route::before('Designator', [UserData::USER_ZERO_LEVEL, '='])->getGroup();
@ -130,15 +130,13 @@ Route::get('/{facet_slug}/article/{slug}')->controller('Post\PostController', ['
Route::get('/users/new/{page?}')->controller('User\UserController', ['users.new', 'user'])->name('users.new');
Route::get('/users/{page?}')->controller('User\UserController', ['users.all', 'user'])->name('users.all');
Route::get('/@{login}')->controller('User\ProfileController', ['profile.posts', 'user'])->where(['login' => '[A-Za-z0-9]+'])->name('profile');
Route::get('/@{login}/posts/{page?}')->controller('User\ProfileController@posts', ['profile.posts', 'user'])->where(['login' => '[A-Za-z0-9]+'])->name('profile.posts');
Route::get('/@{login}')->controller('User\ProfileController')->where(['login' => '[A-Za-z0-9]+'])->name('profile');
Route::get('/@{login}/posts/{page?}')->controller('User\ProfileController@posts')->where(['login' => '[A-Za-z0-9]+'])->name('profile.posts');
Route::get('/@{login}/answers/{page?}')->controller('User\ProfileController@answers')->where(['login' => '[A-Za-z0-9]+'])->name('profile.answers');
Route::get('/@{login}/comments/{page?}')->controller('User\ProfileController@comments')->where(['login' => '[A-Za-z0-9]+'])->name('profile.comments');
Route::get('/@{login}/answers/{page?}')->controller('User\ProfileController@answers', ['profile.answers', 'user'])->where(['login' => '[A-Za-z0-9]+'])->name('profile.answers');
Route::get('/@{login}/comments/{page?}')->controller('User\ProfileController@comments', ['profile.comments', 'users'])->where(['login' => '[A-Za-z0-9]+'])->name('profile.comments');
Route::get('/comments/{page?}')->controller('Comment\CommentController', ['comments.all', 'comments'])->name('comments');
Route::get('/answers/{page?}')->controller('Answer\AnswerController', ['answers.all', 'answers'])->name('answers');
Route::get('/comments/{page?}')->controller('Comment\CommentController', ['all'])->name('comments');
Route::get('/answers/{page?}')->controller('Answer\AnswerController', ['all'])->name('answers');
Route::get('/topics/new/{page?}')->controller('Facets\AllFacetController', ['topics.new', 'topic'])->name('topics.new');
Route::get('/topic/{slug}/recommend')->controller('Facets\TopicFacetController', ['facet.recommend', 'topic'])->where(['slug' => '[a-z0-9-]+'])->name('recommend');
@ -162,12 +160,12 @@ Route::get('/web/dir/{grouping}/{slug}/top')->module('catalog', 'App\Catalog', [
Route::type(['get', 'post'])->get('/cleek')->module('catalog', 'App\Catalog@cleek');
Route::get('/top/{page?}')->controller('HomeController', ['main.top', 'main'])->name('main.top');
Route::get('/top/{page?}')->controller('HomeController', ['top'])->name('main.top');
Route::get('/sitemap.xml')->controller('RssController');
Route::get('/turbo-feed/topic/{slug}')->controller('RssController@turboFeed')->where(['slug' => '[A-Za-z0-9-]+']);
Route::get('/rss-feed/topic/{slug}')->controller('RssController@rssFeed')->where(['slug' => '[A-Za-z0-9-]+']);
Route::get('/{page?}')->controller('HomeController', ['main.feed', 'main'])->name('main');
Route::get('/{page?}')->controller('HomeController', ['feed'])->name('main');
require 'admin.php';