DEV: Minor changes in the admin panel
This commit is contained in:
parent
8d06f42029
commit
3160ad3d69
47 changed files with 239 additions and 284 deletions
|
@ -9,15 +9,22 @@ use Content, Base, Translate;
|
|||
|
||||
class AnswersController extends MainController
|
||||
{
|
||||
public function index($sheet)
|
||||
private $uid;
|
||||
|
||||
protected $limit = 100;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uid = Base::getUid();
|
||||
}
|
||||
|
||||
public function index($sheet, $type)
|
||||
{
|
||||
$uid = Base::getUid();
|
||||
$page = Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
||||
$limit = 100;
|
||||
$pagesCount = AnswerModel::getAnswersAllCount($sheet);
|
||||
$answers = AnswerModel::getAnswersAll($page, $limit, $uid, $sheet);
|
||||
$answers = AnswerModel::getAnswersAll($page, $this->limit, $this->uid, $sheet);
|
||||
|
||||
$result = [];
|
||||
foreach ($answers as $ind => $row) {
|
||||
|
@ -30,10 +37,11 @@ class AnswersController extends MainController
|
|||
'/admin/answer/answers',
|
||||
[
|
||||
'meta' => meta($m = [], $sheet == 'ban' ? Translate::get('deleted answers') : Translate::get('answers')),
|
||||
'uid' => $uid,
|
||||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'all' ? 'answers' : 'answers-ban',
|
||||
'pagesCount' => ceil($pagesCount / $limit),
|
||||
'sheet' => $sheet,
|
||||
'type' => $type,
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'answers' => $result,
|
||||
]
|
||||
|
|
|
@ -12,7 +12,7 @@ class AuditsController extends MainController
|
|||
{
|
||||
protected $limit = 55;
|
||||
|
||||
public function index($sheet)
|
||||
public function index($sheet, $type)
|
||||
{
|
||||
$page = Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
@ -44,7 +44,9 @@ class AuditsController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('audit')),
|
||||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'approved' ? 'approved' : 'audits',
|
||||
'sheet' => $sheet,
|
||||
'type' => $type,
|
||||
'type' => 'audits',
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'audits' => $result,
|
||||
|
|
|
@ -18,7 +18,7 @@ class BadgesController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('badges')),
|
||||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'all' ? 'badges' : $sheet,
|
||||
'type' => 'badges',
|
||||
'badges' => BadgeModel::getBadgesAll(),
|
||||
]
|
||||
]
|
||||
|
@ -34,7 +34,7 @@ class BadgesController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('add badge')),
|
||||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'sheet' => 'badges',
|
||||
'type' => 'badges',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
@ -57,7 +57,7 @@ class BadgesController extends MainController
|
|||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'badge' => $badge,
|
||||
'sheet' => 'badges',
|
||||
'type' => 'badges',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
|
|
@ -9,15 +9,23 @@ use Content, Base, Translate;
|
|||
|
||||
class CommentsController extends MainController
|
||||
{
|
||||
public function index($sheet)
|
||||
private $uid;
|
||||
|
||||
protected $limit = 100;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uid = Base::getUid();
|
||||
}
|
||||
|
||||
public function index($sheet, $type)
|
||||
{
|
||||
$uid = Base::getUid();
|
||||
$page = Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
||||
$limit = 100;
|
||||
$pagesCount = CommentModel::getCommentsAllCount($sheet);
|
||||
$comments = CommentModel::getCommentsAll($page, $limit, $uid, $sheet);
|
||||
$comments = CommentModel::getCommentsAll($page, $this->limit, $this->uid, $sheet);
|
||||
|
||||
$result = [];
|
||||
foreach ($comments as $ind => $row) {
|
||||
|
@ -30,10 +38,11 @@ class CommentsController extends MainController
|
|||
'/admin/comment/comments',
|
||||
[
|
||||
'meta' => meta($m = [], $sheet == 'ban' ? Translate::get('deleted comments') : Translate::get('comments')),
|
||||
'uid' => $uid,
|
||||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'all' ? 'comments' : 'comments-ban',
|
||||
'pagesCount' => ceil($pagesCount / $limit),
|
||||
'sheet' => $sheet,
|
||||
'type' => $type,
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'comments' => $result,
|
||||
]
|
||||
|
|
|
@ -9,9 +9,15 @@ use Base, Translate;
|
|||
|
||||
class HomeController extends MainController
|
||||
{
|
||||
private $uid;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uid = Base::getUid();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$uid = Base::getUid();
|
||||
$size = disk_total_space(HLEB_GLOBAL_DIRECTORY);
|
||||
$bytes = number_format($size / 1048576, 2) . ' MB';
|
||||
|
||||
|
@ -19,10 +25,10 @@ class HomeController extends MainController
|
|||
'/admin/index',
|
||||
[
|
||||
'meta' => meta($m = [], Translate::get('admin')),
|
||||
'uid' => $uid,
|
||||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'topics_count' => FacetModel::getFacetsAllCount($uid['user_id'], 'all'),
|
||||
'posts_count' => HomeModel::feedCount([], $uid, 'all'),
|
||||
'topics_count' => FacetModel::getFacetsAllCount($this->uid['user_id'], 'all'),
|
||||
'posts_count' => HomeModel::feedCount([], $this->uid, 'all'),
|
||||
'posts_no_topic' => FacetModel::getNoTopic(),
|
||||
'users_count' => UserModel::getUsersAllCount('all'),
|
||||
'answers_count' => AnswerModel::getAnswersAllCount('all'),
|
||||
|
@ -30,7 +36,7 @@ class HomeController extends MainController
|
|||
'items_count' => WebModel::getItemsAllCount(),
|
||||
'last_visit' => AgentModel::getLastVisit(),
|
||||
'bytes' => $bytes,
|
||||
'sheet' => 'admin',
|
||||
'type' => 'admin',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
|
|
@ -25,7 +25,7 @@ class InvitationsController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('invites')),
|
||||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'all' ? 'invitations' : $sheet,
|
||||
'type' => 'invitations',
|
||||
'invitations' => $result,
|
||||
]
|
||||
]
|
||||
|
|
|
@ -18,7 +18,7 @@ class PostsController extends MainController
|
|||
$this->uid = Base::getUid();
|
||||
}
|
||||
|
||||
public function index($sheet)
|
||||
public function index($sheet, $type)
|
||||
{
|
||||
$page = Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
@ -40,7 +40,8 @@ class PostsController extends MainController
|
|||
'meta' => meta($m = [], $sheet == 'ban' ? Translate::get('deleted posts') : Translate::get('posts')),
|
||||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'all' ? 'posts' : 'posts-ban',
|
||||
'sheet' => $sheet,
|
||||
'type' => $type,
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'posts' => $result,
|
||||
|
|
|
@ -37,7 +37,7 @@ class ReportsController extends MainController
|
|||
'data' => [
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'sheet' => 'reports',
|
||||
'type' => 'reports',
|
||||
'reports' => $result,
|
||||
]
|
||||
]
|
||||
|
|
|
@ -10,6 +10,8 @@ use Base, Validation, Translate;
|
|||
|
||||
class UsersController extends MainController
|
||||
{
|
||||
protected $limit = 50;
|
||||
|
||||
private $uid;
|
||||
|
||||
public function __construct()
|
||||
|
@ -17,14 +19,13 @@ class UsersController extends MainController
|
|||
$this->uid = Base::getUid();
|
||||
}
|
||||
|
||||
public function index($sheet)
|
||||
public function index($sheet, $type)
|
||||
{
|
||||
$page = Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
||||
$limit = 50;
|
||||
$pagesCount = UserModel::getUsersAllCount($sheet);
|
||||
$user_all = UserModel::getUsersAll($page, $limit, $this->uid['user_id'], $sheet);
|
||||
$user_all = UserModel::getUsersAll($page, $this->limit, $this->uid['user_id'], $sheet);
|
||||
|
||||
$result = [];
|
||||
foreach ($user_all as $ind => $row) {
|
||||
|
@ -44,10 +45,11 @@ class UsersController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('users')),
|
||||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'pagesCount' => ceil($pagesCount / $limit),
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'alluser' => $result,
|
||||
'sheet' => $sheet == 'all' ? 'users' : 'users-ban',
|
||||
'sheet' => $sheet,
|
||||
'type' => $type,
|
||||
]
|
||||
]
|
||||
);
|
||||
|
@ -78,7 +80,7 @@ class UsersController extends MainController
|
|||
'data' => [
|
||||
'results' => $results,
|
||||
'option' => $option,
|
||||
'sheet' => 'users',
|
||||
'type' => 'users',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
@ -113,7 +115,7 @@ class UsersController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('edit user')),
|
||||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'sheet' => 'edit-user',
|
||||
'type' => 'users',
|
||||
'count' => UserModel::contentCount($user_id),
|
||||
'user' => $user,
|
||||
]
|
||||
|
|
|
@ -41,6 +41,7 @@ class WebsController extends MainController
|
|||
'uid' => $this->uid,
|
||||
'data' => [
|
||||
'sheet' => $sheet == 'all' ? 'domains' : $sheet,
|
||||
'type' => 'domains',
|
||||
'pagesCount' => ceil($pagesCount / $this->limit),
|
||||
'pNum' => $page,
|
||||
'domains' => $result,
|
||||
|
|
|
@ -23,7 +23,8 @@ class WordsController extends MainController
|
|||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'words' => ContentModel::getStopWords(),
|
||||
'sheet' => $sheet == 'all' ? 'words' : $sheet,
|
||||
'sheet' => $sheet,
|
||||
'type' => 'words',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
@ -38,7 +39,7 @@ class WordsController extends MainController
|
|||
'meta' => meta($m = [], Translate::get('add a stop word')),
|
||||
'uid' => Base::getUid(),
|
||||
'data' => [
|
||||
'sheet' => 'words',
|
||||
'type' => 'words',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
|
|
@ -33,6 +33,7 @@ $data = [
|
|||
'post deleted' => 'Post deleted',
|
||||
'answer deleted' => 'Answer deleted',
|
||||
'deleted' => 'Deleted',
|
||||
'remote' => 'Remote',
|
||||
'email activated' => 'Email activated',
|
||||
'not activated' => 'Not activated',
|
||||
'like' => 'Like',
|
||||
|
@ -204,11 +205,7 @@ $data = [
|
|||
'author' => 'Author',
|
||||
'characters' => 'Characters',
|
||||
'post added' => 'Post added',
|
||||
'deleted posts' => 'Deleted posts',
|
||||
'deleted answers' => 'Deleted answers',
|
||||
'last answer' => 'Last answer',
|
||||
'comments-ban' => 'Deleted',
|
||||
'answers-ban' => 'Deleted',
|
||||
'no answers' => 'Unfortunately, there are no answers. Write if you know the answer.',
|
||||
'comments-desc' => 'All comments (on answers) are in order of priority in the community',
|
||||
'answers-desc' => 'All responses (to posts) are in order of priority in the community',
|
||||
|
@ -371,7 +368,6 @@ $data = [
|
|||
'top-desc' => 'List of popular posts in the community feed (by the number of replies). Topics of interest. Conversations, questions and answers, comments. ',
|
||||
'all-title' => 'All posts. ',
|
||||
'all-desc' => 'List of all posts in the community feed (by number of replies). Conversations, questions and answers, comments. ',
|
||||
'deleted comments' => 'Deleted comments',
|
||||
'edit answer' => 'Change the answer',
|
||||
'no results' => 'No results',
|
||||
'no search results' => 'The search has not given any results.<br>Too short / long search term.',
|
||||
|
|
|
@ -24,9 +24,8 @@ $data = [
|
|||
'post deleted' => 'Postarea a fost ștearsă',
|
||||
'answer deleted' => 'Răspunsul a fost șters',
|
||||
'necessarily' => 'Necesar pentru a completa',
|
||||
'comments-ban' => 'Fost șters',
|
||||
'answers-ban' => 'Fost șters',
|
||||
'deleted' => 'Sters',
|
||||
'remote' => 'Remote',
|
||||
'email activated' => 'E-mail activat',
|
||||
'not activated' => 'Neactivat',
|
||||
'like' => 'Apreciez',
|
||||
|
@ -199,8 +198,6 @@ $data = [
|
|||
'author' => 'Autor',
|
||||
'characters' => 'simbol',
|
||||
'post added' => 'Postare adăugată',
|
||||
'deleted posts' => 'Postări șterse',
|
||||
'deleted answers' => 'Răspunsuri șterse',
|
||||
'last answer' => 'Ultimul răspuns',
|
||||
'no answers' => 'Din păcate, nu există răspunsuri. Scrie dacă știi răspunsul.',
|
||||
'comments-desc' => 'Toate comentariile (cu privire la răspunsuri) în ordinea priorității în comunitate',
|
||||
|
|
|
@ -33,7 +33,8 @@ $data = [
|
|||
'comment deleted' => 'Комментарий удален',
|
||||
'post deleted' => 'Пост удален',
|
||||
'answer deleted' => 'Ответ удален',
|
||||
'deleted' => 'Удалено',
|
||||
'deleted' => 'Удаленные',
|
||||
'remote' => 'Удаленный',
|
||||
'email activated' => 'Активирован e-mail',
|
||||
'not activated' => 'Не активирован',
|
||||
'like' => 'Нравится',
|
||||
|
@ -205,11 +206,7 @@ $data = [
|
|||
'author' => 'Автор',
|
||||
'characters' => 'символов',
|
||||
'post added' => 'Добавлен пост',
|
||||
'deleted posts' => 'Удаленные посты',
|
||||
'deleted answers' => 'Удаленные ответы',
|
||||
'last answer' => 'Последний ответ',
|
||||
'comments-ban' => 'Удаленные',
|
||||
'answers-ban' => 'Удаленные',
|
||||
'no answers' => 'К сожалению ответов нет. Напишите, если вы знаете ответ.',
|
||||
'comments-desc' => 'Все комментарии (на ответы) в порядке очередности в сообществе',
|
||||
'answers-desc' => 'Все ответы (на посты) в порядке очередности в сообществе',
|
||||
|
@ -372,7 +369,6 @@ $data = [
|
|||
'top-desc' => 'Список популярных постов в ленте сообщества (по количеству ответов). Темы по интересам. Беседы, вопросы и ответы, комментарии. ',
|
||||
'all-title' => 'Все посты. ',
|
||||
'all-desc' => 'Список всех постов в ленте сообщества (по количеству ответов). Беседы, вопросы и ответы, комментарии. ',
|
||||
'deleted comments' => 'Удаленные комментарии',
|
||||
'edit answer' => 'Изменим ответ',
|
||||
'no results' => 'Нет результатов',
|
||||
'no search results' => 'Поиск не дал никаких результатов. <br>Слишком короткий / длинный поисковый запрос',
|
||||
|
|
|
@ -33,6 +33,7 @@ $data = [
|
|||
'post deleted' => '帖子已刪除',
|
||||
'answer deleted' => '答案已刪除',
|
||||
'deleted' => '已刪除',
|
||||
'remote' => '偏僻的'
|
||||
'email activated' => '電子郵件已激活',
|
||||
'not activated' => '未激活',
|
||||
'like' => '喜歡',
|
||||
|
@ -204,11 +205,7 @@ $data = [
|
|||
'author' => '作者',
|
||||
'characters' => '人物',
|
||||
'post added' => '已添加帖子',
|
||||
'deleted posts' => '已刪除的帖子',
|
||||
'deleted answers' => '已刪除答案',
|
||||
'last answer' => '最後回答',
|
||||
'comments-ban' => '已刪除',
|
||||
'answers-ban' => '已刪除',
|
||||
'no answers' => '不幸的是,沒有答案。 知道答案就寫。',
|
||||
'comments-desc' => '所有評論(關於答案)都在社區中按優先級排序',
|
||||
'answers-desc' => '所有(對帖子的)回复都按社區中的優先級排序',
|
||||
|
@ -371,7 +368,6 @@ $data = [
|
|||
'top-desc' => 'List of popular posts in the community feed (by the number of replies). Topics of interest. Conversations, questions and answers, comments. ',
|
||||
'all-title' => 'All posts. ',
|
||||
'all-desc' => 'List of all posts in the community feed (by number of replies). Conversations, questions and answers, comments. ',
|
||||
'deleted comments' => 'Deleted comments',
|
||||
'edit answer' => 'Change the answer',
|
||||
'no results' => 'No results',
|
||||
'no search results' => 'The search has not given any results.<br>Too short / long search term.',
|
||||
|
|
|
@ -12,7 +12,7 @@ class AuditModel extends MainModel
|
|||
public static function getAuditsAll($page, $limit, $sheet)
|
||||
{
|
||||
$sort = "audit_read_flag = 0";
|
||||
if ($sheet == 'approved') {
|
||||
if ($sheet == 'audits.approved') {
|
||||
$sort = "audit_read_flag = 1";
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ class AuditModel extends MainModel
|
|||
public static function getAuditsAllCount($sheet)
|
||||
{
|
||||
$sort = "audit_read_flag = 0";
|
||||
if ($sheet == 'all') {
|
||||
if ($sheet == 'audits.approved') {
|
||||
$sort = "audit_read_flag = 1";
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class AnswerModel extends MainModel
|
|||
}
|
||||
} else {
|
||||
$sort = "WHERE answer_is_deleted = 0 AND post_is_deleted = 0";
|
||||
if ($sheet == 'ban') {
|
||||
if ($sheet == 'answers.ban') {
|
||||
$sort = "WHERE answer_is_deleted = 1 OR post_is_deleted = 1";
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ class AnswerModel extends MainModel
|
|||
public static function getAnswersAllCount($sheet)
|
||||
{
|
||||
$sort = "WHERE answer_is_deleted = 0";
|
||||
if ($sheet == 'ban') {
|
||||
if ($sheet == 'answers.ban') {
|
||||
$sort = "WHERE answer_is_deleted = 1";
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class CommentModel extends MainModel
|
|||
$sort = '';
|
||||
} else {
|
||||
$sort = "WHERE comment_is_deleted = 0 AND post_is_deleted = 0";
|
||||
if ($sheet == 'ban') {
|
||||
if ($sheet == 'comments.ban') {
|
||||
$sort = "WHERE comment_is_deleted = 1 OR post_is_deleted = 1";
|
||||
}
|
||||
$tl = '';
|
||||
|
@ -126,7 +126,7 @@ class CommentModel extends MainModel
|
|||
$sort = "WHERE comment_is_deleted = 0";
|
||||
} else {
|
||||
$sort = "WHERE comment_is_deleted = 0";
|
||||
if ($sheet == 'ban') {
|
||||
if ($sheet == 'comments.ban') {
|
||||
$sort = "WHERE comment_is_deleted = 1";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,12 @@ class FacetModel extends MainModel
|
|||
case 'topics.new':
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'topics.all':
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'topics.ban':
|
||||
$signet = "WHERE facet_type = 'topic' AND facet_is_deleted = 1 ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'blogs.all':
|
||||
$signet = "WHERE facet_type = 'blog' ORDER BY facet_count DESC";
|
||||
break;
|
||||
|
@ -28,18 +34,9 @@ class FacetModel extends MainModel
|
|||
case 'blogs.my':
|
||||
$signet = "WHERE facet_type = 'blog' AND signed_user_id = :user_id ORDER BY facet_count DESC";
|
||||
break;
|
||||
case 'admin.blogs.all':
|
||||
$signet = "WHERE facet_type = 'blog' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'admin.blogs.ban':
|
||||
case 'blogs.ban':
|
||||
$signet = "WHERE facet_type = 'blog' AND facet_is_deleted = 1 ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'admin.topics.all':
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'admin.topics.ban':
|
||||
$signet = "WHERE facet_type = 'topic' AND facet_is_deleted = 1 ORDER BY facet_id DESC";
|
||||
break;
|
||||
default:
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_count DESC";
|
||||
break;
|
||||
|
@ -78,6 +75,12 @@ class FacetModel extends MainModel
|
|||
case 'topics.new':
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'topics.all':
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'topics.ban':
|
||||
$signet = "WHERE facet_type = 'topic' AND facet_is_deleted = 1 ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'blogs.all':
|
||||
$signet = "WHERE facet_type = 'blog' ORDER BY facet_count DESC";
|
||||
break;
|
||||
|
@ -87,17 +90,8 @@ class FacetModel extends MainModel
|
|||
case 'blogs.my':
|
||||
$signet = "WHERE facet_type = 'blog' AND signed_user_id = :user_id ORDER BY facet_count DESC";
|
||||
break;
|
||||
case 'admin.blogs.all':
|
||||
$signet = "WHERE facet_type = 'blog' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'admin.blogs.ban':
|
||||
$signet = "WHERE facet_type = 'blog' AND facet_is_deleted = 21 ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'admin.topics.all':
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_id DESC";
|
||||
break;
|
||||
case 'admin.topics.ban':
|
||||
$signet = "WHERE facet_type = 'topic' AND facet_is_deleted = 1 ORDER BY facet_id DESC";
|
||||
case 'blogs.ban':
|
||||
$signet = "WHERE facet_type = 'blog' AND facet_is_deleted = 1 ORDER BY facet_id DESC";
|
||||
break;
|
||||
default:
|
||||
$signet = "WHERE facet_type = 'topic' ORDER BY facet_count DESC";
|
||||
|
|
|
@ -21,7 +21,7 @@ class FeedModel extends MainModel
|
|||
} elseif ($type == 'admin') {
|
||||
$selection = 0;
|
||||
$string = "WHERE post_user_id != :selection";
|
||||
if ($sheet == 'ban') {
|
||||
if ($sheet == 'posts.ban') {
|
||||
$string = "WHERE post_is_deleted = 1";
|
||||
}
|
||||
} elseif ($type == 'item') {
|
||||
|
@ -123,7 +123,7 @@ class FeedModel extends MainModel
|
|||
} elseif ($type == 'admin') {
|
||||
$selection = 0;
|
||||
$string = "WHERE post_user_id != :selection";
|
||||
if ($sheet == 'ban') {
|
||||
if ($sheet == 'posts.ban') {
|
||||
$string = "WHERE post_is_deleted = 1";
|
||||
}
|
||||
} elseif ($type == 'item') {
|
||||
|
|
|
@ -11,9 +11,9 @@ class UserModel extends MainModel
|
|||
// Страница участников
|
||||
public static function getUsersAll($page, $limit, $user_id, $sheet)
|
||||
{
|
||||
if ($sheet == 'all') {
|
||||
if ($sheet == 'users.all') {
|
||||
$string = "ORDER BY user_id DESC LIMIT";
|
||||
} elseif ($sheet == 'ban') {
|
||||
} elseif ($sheet == 'users.ban') {
|
||||
$string = "WHERE user_ban_list > 0 ORDER BY user_id DESC LIMIT";
|
||||
} else {
|
||||
$string = "WHERE user_is_deleted != 1 and user_ban_list != 1
|
||||
|
@ -48,9 +48,9 @@ class UserModel extends MainModel
|
|||
// Количество
|
||||
public static function getUsersAllCount($sheet)
|
||||
{
|
||||
$string = "WHERE user_ban_list > 0";
|
||||
if ($sheet == 'all') {
|
||||
$string = "";
|
||||
if ($sheet == 'users.ban') {
|
||||
$string = "WHERE user_ban_list > 0";
|
||||
}
|
||||
|
||||
$sql = "SELECT
|
||||
|
|
|
@ -29,12 +29,12 @@ return [
|
|||
'url' => getUrlByName('admin.topics'),
|
||||
'name' => Translate::get('topics'),
|
||||
'icon' => 'bi bi-columns-gap',
|
||||
'item' => 'topic',
|
||||
'item' => 'topics',
|
||||
], [
|
||||
'url' => getUrlByName('admin.blogs'),
|
||||
'name' => Translate::get('blogs'),
|
||||
'icon' => 'bi bi-journal-text',
|
||||
'item' => 'blog',
|
||||
'item' => 'blogs',
|
||||
], [
|
||||
'url' => getUrlByName('admin.invitations'),
|
||||
'name' => Translate::get('invites'),
|
||||
|
@ -49,12 +49,12 @@ return [
|
|||
'url' => getUrlByName('admin.comments'),
|
||||
'name' => Translate::get('comments'),
|
||||
'icon' => 'bi bi-chat-dots',
|
||||
'item' => 'comments-n',
|
||||
'item' => 'comments',
|
||||
], [
|
||||
'url' => getUrlByName('admin.answers'),
|
||||
'name' => Translate::get('answers'),
|
||||
'icon' => 'bi bi-chat-left-text',
|
||||
'item' => 'answers-n',
|
||||
'item' => 'answers',
|
||||
], [
|
||||
'url' => getUrlByName('admin.badges'),
|
||||
'name' => Translate::get('badges'),
|
||||
|
|
|
@ -14,12 +14,12 @@ return [
|
|||
'url' => getUrlByName('topics.all'),
|
||||
'name' => Translate::get('topics'),
|
||||
'icon' => 'bi bi-columns-gap',
|
||||
'item' => 'topic',
|
||||
'item' => 'topics',
|
||||
], [
|
||||
'url' => getUrlByName('blogs.all'),
|
||||
'name' => Translate::get('blogs'),
|
||||
'icon' => 'bi bi-journal-text',
|
||||
'item' => 'blog',
|
||||
'item' => 'blogs',
|
||||
], [
|
||||
'url' => getUrlByName('users'),
|
||||
'name' => Translate::get('users'),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<nav class="justify-between mt0 ml0 pl0 top80 sticky size-15 max-w170">
|
||||
<?php foreach (Config::get('menu-admin') as $menu) { ?>
|
||||
<a class="pt5 pr10 pb5 pl10 block gray bg-hover-light" title="<?= $menu['name']; ?>" href="<?= $menu['url']; ?>">
|
||||
<i class="<?= $menu['icon']; ?> middle mr5<?= $sheet == $menu['item'] ? ' blue' : ''; ?> size-18"></i>
|
||||
<span class="<?= $sheet == $menu['item'] ? 'blue' : ''; ?>">
|
||||
<i class="<?= $menu['icon']; ?> middle mr5<?= $type == $menu['item'] ? ' blue' : ''; ?> size-18"></i>
|
||||
<span class="<?= $type == $menu['item'] ? 'blue' : ''; ?>">
|
||||
<?= $menu['name']; ?>
|
||||
</span>
|
||||
</a>
|
||||
|
|
25
resources/views/default/_block/tabs-nav-admin.php
Normal file
25
resources/views/default/_block/tabs-nav-admin.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<div class="bg-white flex flex-row items-center justify-between br-box-gray p15 mb15">
|
||||
<p class="m0"><?= Translate::get($type); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
$user_id,
|
||||
$sheet,
|
||||
$pages = [
|
||||
[
|
||||
'id' => $type . '.all',
|
||||
'url' => getUrlByName('admin.' . $type),
|
||||
'content' => Translate::get('all'),
|
||||
'icon' => 'bi bi-record-circle'
|
||||
],
|
||||
[
|
||||
'id' => $type . '.ban',
|
||||
'url' => getUrlByName('admin.' . $type . '.ban'),
|
||||
'content' => Translate::get('deleted'),
|
||||
'icon' => 'bi bi-x-circle'
|
||||
],
|
||||
]
|
||||
); ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet'], 'uid' => $uid]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type'], 'uid' => $uid]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -11,32 +11,15 @@
|
|||
Translate::get('answers')
|
||||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray br-rd5 p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
$uid['user_id'],
|
||||
$data['sheet'],
|
||||
$pages = [
|
||||
<?= includeTemplate(
|
||||
'/_block/tabs-nav-admin',
|
||||
[
|
||||
'id' => 'answers',
|
||||
'url' => getUrlByName('admin.answers'),
|
||||
'content' => Translate::get('all'),
|
||||
'icon' => 'bi bi-record-circle'
|
||||
],
|
||||
[
|
||||
'id' => 'answers-ban',
|
||||
'url' => getUrlByName('admin.answers.ban'),
|
||||
'content' => Translate::get('deleted answers'),
|
||||
'icon' => 'bi bi-x-circle'
|
||||
],
|
||||
'type' => $data['type'],
|
||||
'sheet' => $data['sheet'],
|
||||
'user_id' => $uid['user_id']
|
||||
]
|
||||
); ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bg-white br-box-gray p15">
|
||||
<?php if (!empty($data['answers'])) { ?>
|
||||
<?php foreach ($data['answers'] as $answer) { ?>
|
||||
|
@ -66,7 +49,7 @@
|
|||
+ <?= $answer['answer_votes']; ?>
|
||||
<span id="cm_dell" class="right comment_link size-13">
|
||||
<a data-type="answer" data-id="<?= $answer['answer_id']; ?>" class="type-action">
|
||||
<?php if ($data['sheet'] == 'answers-ban') { ?>
|
||||
<?php if ($data['sheet'] == 'answers.ban') { ?>
|
||||
<?= Translate::get('recover'); ?>
|
||||
<?php } else { ?>
|
||||
<?= Translate::get('remove'); ?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray br-rd5 p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<p class="m0"><?= Translate::get($data['type']); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
|
@ -20,14 +20,14 @@
|
|||
$data['sheet'],
|
||||
$pages = [
|
||||
[
|
||||
'id' => 'audits',
|
||||
'url' => getUrlByName('admin.audits'),
|
||||
'id' => $data['type'] . '.new',
|
||||
'url' => getUrlByName('admin.' . $data['type']),
|
||||
'content' => Translate::get('new ones'),
|
||||
'icon' => 'bi bi-vinyl'
|
||||
],
|
||||
[
|
||||
'id' => 'approved',
|
||||
'url' => getUrlByName('admin.audits.approved'),
|
||||
'id' => $data['type'] . '.approved',
|
||||
'url' => getUrlByName('admin.' . $data['type'] . '.approved'),
|
||||
'content' => Translate::get('approved'),
|
||||
'icon' => 'bi bi-vinyl-fill'
|
||||
],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
<div class="white-box pt5 pr15 pb5 pl15">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -11,31 +11,15 @@
|
|||
Translate::get('comments')
|
||||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray br-rd5 p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
$uid['user_id'],
|
||||
$data['sheet'],
|
||||
$pages = [
|
||||
<?= includeTemplate(
|
||||
'/_block/tabs-nav-admin',
|
||||
[
|
||||
'id' => 'comments',
|
||||
'url' => getUrlByName('admin.comments'),
|
||||
'content' => Translate::get('all'),
|
||||
'icon' => 'bi bi-record-circle'
|
||||
],
|
||||
[
|
||||
'id' => 'comments-ban',
|
||||
'url' => getUrlByName('admin.comments.ban'),
|
||||
'content' => Translate::get('deleted comments'),
|
||||
'icon' => 'bi bi-x-circle'
|
||||
],
|
||||
'type' => $data['type'],
|
||||
'sheet' => $data['sheet'],
|
||||
'user_id' => $uid['user_id']
|
||||
]
|
||||
); ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bg-white br-box-gray p15">
|
||||
<?php if (!empty($data['comments'])) { ?>
|
||||
<?php foreach ($data['comments'] as $comment) { ?>
|
||||
|
@ -65,7 +49,7 @@
|
|||
+ <?= $comment['comment_votes']; ?>
|
||||
<span id="cm_dell" class="right comment_link size-13">
|
||||
<a data-type="comment" data-id="<?= $comment['comment_id']; ?>" class="type-action">
|
||||
<?php if ($data['sheet'] == 'comments-ban') { ?>
|
||||
<?php if ($data['sheet'] == 'comments.ban') { ?>
|
||||
<?= Translate::get('recover'); ?>
|
||||
<?php } else { ?>
|
||||
<?= Translate::get('remove'); ?>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['type']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
<a class="right mr15" title="<?= Translate::get('add'); ?>" href="<?= getUrlByName('topic.add'); ?>">
|
||||
<a class="right mr15" title="<?= Translate::get('add'); ?>" href="<?= getUrlByName($data['type'] .'.add'); ?>">
|
||||
<i class="bi bi-plus-lg middle"></i>
|
||||
</a>
|
||||
|
||||
|
@ -14,32 +14,15 @@
|
|||
Translate::get('topics')
|
||||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray br-rd5 p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['type'] . 's'); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
$uid['user_id'],
|
||||
$data['sheet'],
|
||||
$pages = [
|
||||
<?= includeTemplate(
|
||||
'/_block/tabs-nav-admin',
|
||||
[
|
||||
'id' => 'admin.' . $data['type'] . 's.all',
|
||||
'url' => getUrlByName('admin.' . $data['type'] . 's'),
|
||||
'content' => Translate::get('all'),
|
||||
'icon' => 'bi bi-record-circle'
|
||||
],
|
||||
[
|
||||
'id' => 'admin.' . $data['type'] . 's.ban',
|
||||
'url' => getUrlByName('admin.' . $data['type'] . 's.ban'),
|
||||
'content' => Translate::get('banned'),
|
||||
'icon' => 'bi bi-x-circle'
|
||||
],
|
||||
'type' => $data['type'],
|
||||
'sheet' => $data['sheet'],
|
||||
'user_id' => $uid['user_id']
|
||||
]
|
||||
); ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="white-box pt5 pr15 pb5 pl15">
|
||||
<?php if (!empty($data['facets'])) { ?>
|
||||
<table>
|
||||
|
@ -50,7 +33,12 @@
|
|||
<th>Ban</th>
|
||||
<th><?= Translate::get('action'); ?></th>
|
||||
</thead>
|
||||
<?php foreach ($data['facets'] as $key => $fc) { ?>
|
||||
<?php foreach ($data['facets'] as $key => $fc) {
|
||||
$url = 'topic';
|
||||
if ($data['type'] == 'blogs') {
|
||||
$url = 'blog';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class="center">
|
||||
<?= $fc['facet_id']; ?>
|
||||
|
@ -59,7 +47,7 @@
|
|||
<?= facet_logo_img($fc['facet_img'], 'max', $fc['facet_title'], 'w64'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="size-21" rel="nofollow noreferrer" href="<?= getUrlByName($data['type'], ['slug' => $fc['facet_slug']]); ?>">
|
||||
<a class="size-21" rel="nofollow noreferrer" href="<?= getUrlByName($url, ['slug' => $fc['facet_slug']]); ?>">
|
||||
<?= $fc['facet_title']; ?>
|
||||
</a>
|
||||
<span class="green mr5 ml5"><?= $data['type']; ?>/<?= $fc['facet_slug']; ?></span>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['uid' => $uid, 'sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['uid' => $uid, 'type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray br-rd5 p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<p class="m0"><?= Translate::get('admin'); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-12 gap-4 pr10 pl10 justify-between">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
<?= breadcrumb(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -11,32 +11,15 @@
|
|||
Translate::get('posts')
|
||||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray br-rd5 p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
$uid['user_id'],
|
||||
$data['sheet'],
|
||||
$pages = [
|
||||
<?= includeTemplate(
|
||||
'/_block/tabs-nav-admin',
|
||||
[
|
||||
'id' => 'posts',
|
||||
'url' => getUrlByName('admin.posts'),
|
||||
'content' => Translate::get('all'),
|
||||
'icon' => 'bi bi-record-circle'
|
||||
],
|
||||
[
|
||||
'id' => 'posts-ban',
|
||||
'url' => getUrlByName('admin.posts.ban'),
|
||||
'content' => Translate::get('deleted posts'),
|
||||
'icon' => 'bi bi-x-circle'
|
||||
],
|
||||
'type' => $data['type'],
|
||||
'sheet' => $data['sheet'],
|
||||
'user_id' => $uid['user_id']
|
||||
]
|
||||
); ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bg-white br-box-gray p15">
|
||||
<?php if (!empty($data['posts'])) { ?>
|
||||
<?php foreach ($data['posts'] as $post) { ?>
|
||||
|
@ -69,7 +52,7 @@
|
|||
+ <?= $post['post_votes']; ?>
|
||||
<span id="cm_dell" class="right comment_link">
|
||||
<a data-type="post" data-id="<?= $post['post_id']; ?>" class="type-action">
|
||||
<?php if ($data['sheet'] == 'posts-ban') { ?>
|
||||
<?php if ($data['sheet'] == 'posts.ban') { ?>
|
||||
<?= Translate::get('recover'); ?>
|
||||
<?php } else { ?>
|
||||
<?= Translate::get('remove'); ?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => 'tools', 'uid' => $uid]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => 'tools', 'uid' => $uid]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -11,32 +11,15 @@
|
|||
Translate::get('users')
|
||||
); ?>
|
||||
|
||||
<div class="bg-white flex flex-row items-center justify-between br-box-gray p15 mb15">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<ul class="flex flex-row list-none m0 p0 center size-15">
|
||||
|
||||
<?= tabs_nav(
|
||||
$uid['user_id'],
|
||||
$data['sheet'],
|
||||
$pages = [
|
||||
<?= includeTemplate(
|
||||
'/_block/tabs-nav-admin',
|
||||
[
|
||||
'id' => 'users',
|
||||
'url' => getUrlByName('admin.users'),
|
||||
'content' => Translate::get('all'),
|
||||
'icon' => 'bi bi-record-circle'
|
||||
],
|
||||
[
|
||||
'id' => 'users-ban',
|
||||
'url' => getUrlByName('admin.users.ban'),
|
||||
'content' => Translate::get('banned'),
|
||||
'icon' => 'bi bi-x-circle'
|
||||
],
|
||||
'type' => $data['type'],
|
||||
'sheet' => $data['sheet'],
|
||||
'user_id' => $uid['user_id']
|
||||
]
|
||||
); ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bg-white br-box-gray pt5 pr15 pb5 pl15">
|
||||
<?php if ($data['alluser']) { ?>
|
||||
<table>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
<?= $item['item_title_url']; ?>
|
||||
</div>
|
||||
<?= html_topic($item['facet_list'], 'web.topic', 'gray-light size-14 mr10'); ?>
|
||||
<div class="content-telo">
|
||||
<div class="max-w780">
|
||||
<?= $item['item_content_url']; ?>
|
||||
</div>
|
||||
<div class="br-bottom mb15 mt5 pb5 size-13 hidden gray">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sticky col-span-2 justify-between no-mob">
|
||||
<?= includeTemplate('/_block/menu/admin', ['sheet' => $data['sheet']]); ?>
|
||||
<?= includeTemplate('/_block/menu/admin', ['type' => $data['type']]); ?>
|
||||
</div>
|
||||
<main class="col-span-10 mb-col-12">
|
||||
|
||||
|
|
|
@ -63,9 +63,9 @@ if ($blog['facet_is_deleted'] == 0) { ?>
|
|||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="center">
|
||||
<div class="center col-span-10">
|
||||
<i class="bi bi-x-octagon size-110"></i>
|
||||
<div class="mt5 gray"><?= Translate::get('deleted'); ?></div>
|
||||
<div class="mt5 gray"><?= Translate::get('remote'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
@ -72,9 +72,9 @@
|
|||
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="center">
|
||||
<div class="center col-span-10">
|
||||
<i class="bi bi-x-octagon size-110"></i>
|
||||
<div class="mt5 gray"><?= Translate::get('deleted'); ?></div>
|
||||
<div class="mt5 gray"><?= Translate::get('remote'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</main>
|
||||
|
|
|
@ -24,22 +24,22 @@ Route::before('Authorization@admin')->getGroup();
|
|||
|
||||
Route::get('/tools')->controller('Admin\ToolsController')->name('admin.tools');
|
||||
|
||||
Route::get('/users')->controller('Admin\UsersController', ['all'])->name('admin.users');
|
||||
Route::get('/users/ban')->controller('Admin\UsersController', ['ban'])->name('admin.users.ban');
|
||||
Route::get('/users')->controller('Admin\UsersController', ['users.all', 'users'])->name('admin.users');
|
||||
Route::get('/users/ban')->controller('Admin\UsersController', ['users.ban', 'users'])->name('admin.users.ban');
|
||||
Route::get('/users/{id}/edit')->controller('Admin\UsersController@userEditPage')->where(['id' => '[0-9]+'])->name('admin.user.edit');
|
||||
Route::get('/users/page/{page?}')->controller('Admin\UsersController', ['all'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/logip/{ip}')->controller('Admin\UsersController@logsIp', ['logs'])->where(['ip' => '[0-9].+'])->name('admin.logip');
|
||||
Route::get('/regip/{ip}')->controller('Admin\UsersController@logsIp', ['reg'])->where(['ip' => '[0-9].+'])->name('admin.regip');
|
||||
Route::get('/users/page/{page?}')->controller('Admin\UsersController', ['users.all', 'users'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/logip/{ip}')->controller('Admin\UsersController@logsIp', ['users.logip', 'users'])->where(['ip' => '[0-9].+'])->name('admin.logip');
|
||||
Route::get('/regip/{ip}')->controller('Admin\UsersController@logsIp', ['users.regip', 'users'])->where(['ip' => '[0-9].+'])->name('admin.regip');
|
||||
|
||||
Route::get('/audits')->controller('Admin\AuditsController', ['all'])->name('admin.audits');
|
||||
Route::get('/audits/approved')->controller('Admin\AuditsController', ['approved'])->name('admin.audits.approved');
|
||||
Route::get('/audits')->controller('Admin\AuditsController', ['audits.new', 'audits'])->name('admin.audits');
|
||||
Route::get('/audits/approved')->controller('Admin\AuditsController', ['audits.approved', 'audits'])->name('admin.audits.approved');
|
||||
|
||||
Route::get('/topics')->controller('Admin\FacetsController', ['admin.topics.all', 'topic'])->name('admin.topics');
|
||||
Route::get('/topics/ban')->controller('Admin\FacetsController', ['admin.topics.ban', 'topic'])->name('admin.topics.ban');
|
||||
Route::get('/topics/page/{page?}')->controller('Admin\FacetsController', ['all'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/topics')->controller('Admin\FacetsController', ['topics.all', 'topics'])->name('admin.topics');
|
||||
Route::get('/topics/ban')->controller('Admin\FacetsController', ['topics.ban', 'topics'])->name('admin.topics.ban');
|
||||
Route::get('/topics/page/{page?}')->controller('Admin\FacetsController', ['topics.all', 'topics'])->where(['page' => '[0-9]+']);
|
||||
|
||||
Route::get('/blogs')->controller('Admin\FacetsController', ['admin.blogs.all', 'blog'])->name('admin.blogs');
|
||||
Route::get('/blogs/ban')->controller('Admin\FacetsController', ['admin.blogs.ban', 'blog'])->name('admin.blogs.ban');
|
||||
Route::get('/blogs')->controller('Admin\FacetsController', ['blogs.all', 'blogs'])->name('admin.blogs');
|
||||
Route::get('/blogs/ban')->controller('Admin\FacetsController', ['blogs.ban', 'blogs'])->name('admin.blogs.ban');
|
||||
|
||||
Route::get('/update/count/topic')->controller('Admin\СonsoleController@updateCountPostTopic')->name('admin.count.topic');
|
||||
Route::get('/update/count/up')->controller('Admin\СonsoleController@updateCountUp')->name('admin.count.up');
|
||||
|
@ -49,17 +49,17 @@ Route::before('Authorization@admin')->getGroup();
|
|||
|
||||
Route::get('/invitations')->controller('Admin\InvitationsController', ['all'])->name('admin.invitations');
|
||||
|
||||
Route::get('/posts')->controller('Admin\PostsController', ['all'])->name('admin.posts');
|
||||
Route::get('/posts/page/{page?}')->controller('Admin\PostsController', ['all'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/posts/ban')->controller('Admin\PostsController', ['ban'])->name('admin.posts.ban');
|
||||
Route::get('/posts')->controller('Admin\PostsController', ['posts.all', 'posts'])->name('admin.posts');
|
||||
Route::get('/posts/page/{page?}')->controller('Admin\PostsController', ['posts.all', 'posts'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/posts/ban')->controller('Admin\PostsController', ['posts.ban', 'posts'])->name('admin.posts.ban');
|
||||
|
||||
Route::get('/comments')->controller('Admin\CommentsController', ['all'])->name('admin.comments');
|
||||
Route::get('/comments/page/{page?}')->controller('Admin\CommentsController', ['all'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/comments/ban')->controller('Admin\CommentsController', ['ban'])->name('admin.comments.ban');
|
||||
Route::get('/comments')->controller('Admin\CommentsController', ['comments.all', 'comments'])->name('admin.comments');
|
||||
Route::get('/comments/page/{page?}')->controller('Admin\CommentsController', ['comments.all', 'comments'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/comments/ban')->controller('Admin\CommentsController', ['comments.ban', 'comments'])->name('admin.comments.ban');
|
||||
|
||||
Route::get('/answers')->controller('Admin\AnswersController', ['all'])->name('admin.answers');
|
||||
Route::get('/answers/page/{page?}')->controller('Admin\AnswersController', ['all'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/answers/ban')->controller('Admin\AnswersController', ['ban'])->name('admin.answers.ban');
|
||||
Route::get('/answers')->controller('Admin\AnswersController', ['answers.all', 'answers'])->name('admin.answers');
|
||||
Route::get('/answers/page/{page?}')->controller('Admin\AnswersController', ['answers.all', 'answers'])->where(['page' => '[0-9]+']);
|
||||
Route::get('/answers/ban')->controller('Admin\AnswersController', ['answers.ban', 'answers'])->name('admin.answers.ban');
|
||||
|
||||
Route::get('/badges')->controller('Admin\BadgesController', ['all'])->name('admin.badges');
|
||||
Route::get('/badges/add')->controller('Admin\BadgesController@addPage')->name('admin.badges.add');
|
||||
|
|
Loading…
Reference in a new issue