ADD: Страница логов поисковых запросов

+ расширена страница по примерам (css)
This commit is contained in:
Evg 2022-04-13 19:01:30 +03:00
parent cd7118997f
commit a059861c8c
31 changed files with 118 additions and 73 deletions

View file

@ -247,6 +247,8 @@ $data = [
'supports.markdown' => 'Supports Markdown', 'supports.markdown' => 'Supports Markdown',
'write' => 'Write', 'write' => 'Write',
'in.profile' => 'In profile', 'in.profile' => 'In profile',
'request' => 'Anfrage',
'results' => 'Ergebnisse',
'language' => 'Lokalisierung', 'language' => 'Lokalisierung',
'ru.language' => 'Russisch (RU)', 'ru.language' => 'Russisch (RU)',

View file

@ -244,6 +244,8 @@ $data = [
'supports.markdown' => 'Supports Markdown', 'supports.markdown' => 'Supports Markdown',
'write' => 'Write', 'write' => 'Write',
'in.profile' => 'In profile', 'in.profile' => 'In profile',
'request' => 'Request',
'results' => 'Results',
'language' => 'Localization', 'language' => 'Localization',
'ru.language' => 'Russian (RU)', 'ru.language' => 'Russian (RU)',

View file

@ -247,6 +247,8 @@ $data = [
'supports.markdown' => 'Supports Markdown', 'supports.markdown' => 'Supports Markdown',
'write' => 'Write', 'write' => 'Write',
'in.profile' => 'In profile', 'in.profile' => 'In profile',
'request' => 'Demande',
'results' => 'Résultats',
'language' => 'Localisation', 'language' => 'Localisation',
'ru.language' => 'Russe (RU)', 'ru.language' => 'Russe (RU)',

View file

@ -242,6 +242,8 @@ $data = [
'supports.markdown' => 'Suportă Markdown', 'supports.markdown' => 'Suportă Markdown',
'Write' => 'Scrie', 'Write' => 'Scrie',
'in.profile' => 'In profil', 'in.profile' => 'In profil',
'request' => 'Cerere',
'results' => 'Rezultate',
'language' => 'Localization', 'language' => 'Localization',
'ru.language' => 'Rusă (RU)', 'ru.language' => 'Rusă (RU)',

View file

@ -245,6 +245,8 @@ $data = [
'supports.markdown' => 'Поддерживает Markdown', 'supports.markdown' => 'Поддерживает Markdown',
'write' => 'Напишите', 'write' => 'Напишите',
'in.profile' => 'в профиль', 'in.profile' => 'в профиль',
'request' => 'Запрос',
'results' => 'Результатов',
'close?' => 'Закрыть?', 'close?' => 'Закрыть?',
'repeat.password' => 'Повторите пароль', 'repeat.password' => 'Повторите пароль',

View file

@ -246,6 +246,8 @@ $data = [
'supports.markdown' => '支持降價', 'supports.markdown' => '支持降價',
'write' => '寫', 'write' => '寫',
'in.profile' => '在個人資料中', 'in.profile' => '在個人資料中',
'request' => '要求',
'results' => '結果',
'language' => '本土化', 'language' => '本土化',
'ru.language' => '俄語 (RU)', 'ru.language' => '俄語 (RU)',

View file

@ -56,8 +56,8 @@ class Audits
); );
} }
// Log log // Member activity log
// Журнал логов // Журнал логов действий участников
public function logs($sheet, $type) public function logs($sheet, $type)
{ {
$pageNumber = Tpl::pageNumber(); $pageNumber = Tpl::pageNumber();
@ -80,6 +80,23 @@ class Audits
); );
} }
// Search log
// Журнал логов поиска
public function logsSearch($sheet, $type)
{
return view(
'/view/default/audit/logs-search',
[
'meta' => Meta::get(Translate::get('logs')),
'data' => [
'type' => $type,
'sheet' => $sheet,
'logs' => (new \Modules\Search\App\Search())->getLogs(100),
]
]
);
}
// Approve audit // Approve audit
// Одобрить аудит // Одобрить аудит
public function status() public function status()

View file

@ -24,7 +24,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php if (!empty($data['audits'])) : ?> <?php if (!empty($data['audits'])) : ?>
<table> <table>
<thead> <thead>

View file

@ -0,0 +1,44 @@
<?= includeTemplate(
'/view/default/menu',
[
'data' => $data,
'meta' => $meta,
'menus' => [
[
'id' => 'logssearch.all',
'url' => getUrlByName('admin.logs.search'),
'name' => __('search'),
'icon' => 'bi-search',
]
]
]
); ?>
<div class="box bg-white">
<?php if ($data['logs']) : ?>
<table>
<thead>
<th><?= __('request'); ?></th>
<th><?= __('time'); ?></th>
<th class="w60"><?= __('results'); ?></th>
</thead>
<?php foreach ($data['logs'] as $log) : ?>
<tr>
<td class="gray-600">
<a target="_blank" rel="noreferrer" href="/search?q=<?= $log['request']; ?>&type=<?= $log['action_type']; ?>">
<?= $log['request']; ?>
</a>
</td>
<td class="gray-600"> <?= __($log['action_type']); ?> | <?= Html::langDate($log['add_date']); ?></td>
<td class="center">
<?= $log['count_results']; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php else : ?>
<?= Tpl::insert('/_block/no-content', ['type' => 'small', 'text' => __('no'), 'icon' => 'bi-info-lg']); ?>
<?php endif; ?>
</div>
</main>
<?= includeTemplate('/view/default/footer'); ?>

View file

@ -3,11 +3,18 @@
[ [
'data' => $data, 'data' => $data,
'meta' => $meta, 'meta' => $meta,
'menus' => [] 'menus' => [
[
'id' => 'audits.all',
'url' => getUrlByName('admin.logs.search'),
'name' => __('search'),
'icon' => 'bi-search',
]
]
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php if ($data['logs']) : ?> <?php if ($data['logs']) : ?>
<table> <table>
<thead> <thead>

View file

@ -14,7 +14,7 @@
] ]
); ?> ); ?>
<div class="box max-w780"> <div class="box bg-white max-w780">
<form action="<?= getUrlByName('admin.badge.create'); ?>" method="post"> <form action="<?= getUrlByName('admin.badge.create'); ?>" method="post">
<?= csrf_field() ?> <?= csrf_field() ?>
<fieldset> <fieldset>

View file

@ -14,7 +14,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php if (!empty($data['badges'])) : ?> <?php if (!empty($data['badges'])) : ?>
<table class="mt20"> <table class="mt20">
<thead> <thead>

View file

@ -7,7 +7,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<form action="<?= getUrlByName('admin.badge.change', ['id' => $data['badge']['badge_id']]); ?>" method="post"> <form action="<?= getUrlByName('admin.badge.change', ['id' => $data['badge']['badge_id']]); ?>" method="post">
<?= csrf_field() ?> <?= csrf_field() ?>
<fieldset> <fieldset>

View file

@ -7,7 +7,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<form action="<?= getUrlByName('admin.user.badge.create'); ?>" method="post"> <form action="<?= getUrlByName('admin.user.badge.create'); ?>" method="post">
<?= csrf_field() ?> <?= csrf_field() ?>
<fieldset> <fieldset>

View file

@ -6,7 +6,7 @@
'menus' => [], 'menus' => [],
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<h4><?= __('topics'); ?>:</h4> <h4><?= __('topics'); ?>:</h4>
<a href="#" class="tags">.tags</a> <a href="#" class="tags">.tags</a>
<a href="#" class="tags-xs">.tags-xs</a> <a href="#" class="tags-xs">.tags-xs</a>
@ -17,6 +17,20 @@
<p><i class="btn btn-primary">btn btn-primary</i></p> <p><i class="btn btn-primary">btn btn-primary</i></p>
<p><i class="btn btn-small btn-primary">btn btn-small btn-primary</i></p> <p><i class="btn btn-small btn-primary">btn btn-small btn-primary</i></p>
<h4><?= __('other'); ?>:</h4>
<div class="box-flex flex-wrap">
<div class="box mr5">.box</div>
<div class="box bg-yellow mr5">.box .bg-yellow</div>
<div class="box bg-violet mr5">.box .bg-violet</div>
<div class="box bg-lightyellow mr5">.box .bg-lightyellow</div>
<div class="box bg-lightgray mr5">.box .bg-lightgray</div>
<div class="box bg-purple mr5">.box .bg-purple</div>
<div class="box bg-green white mr5">.box .bg-green</div>
<div class="box bg-black white mr5">.box .bg-black</div>
<div class="box bg-blue white mr5">.box .bg-blue</div>
<div class="box bg-blue-100 mr5">.box .bg-blue-100</div>
<div class="box bg-red-200">.box .bg-red-200</div>
</div>
<p> <p>
<?= __('being.developed'); ?>... <?= __('being.developed'); ?>...
</p> </p>

View file

@ -7,7 +7,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php foreach ($data['types_facets'] as $type) : ?> <?php foreach ($data['types_facets'] as $type) : ?>
<a class="block mb10" href="<?= getUrlByName('admin.facets.type', ['type' => $type['type_code']]); ?>"> <a class="block mb10" href="<?= getUrlByName('admin.facets.type', ['type' => $type['type_code']]); ?>">
<i class="bi-circle green middle mr5"></i> <i class="bi-circle green middle mr5"></i>

View file

@ -21,7 +21,7 @@
); );
?> ?>
<div class="box"> <div class="box bg-white">
<?php if (!empty($data['facets'])) : ?> <?php if (!empty($data['facets'])) : ?>
<?php foreach ($data['facets'] as $topic) : ?> <?php foreach ($data['facets'] as $topic) : ?>

View file

@ -4,7 +4,7 @@ Request::getHead()->addStyles('/assets/css/style.css?12');
<?= Tpl::insert('/meta', ['meta' => $meta]); ?> <?= Tpl::insert('/meta', ['meta' => $meta]); ?>
<body class="body-bg-fon<?php if (Request::getCookie('dayNight') == 'dark') : ?> dark<?php endif; ?>"> <body class="bg-lightgray<?php if (Request::getCookie('dayNight') == 'dark') : ?> dark<?php endif; ?>">
<header class="d-header sticky top0"> <header class="d-header sticky top0">
<div class="wrap"> <div class="wrap">

View file

@ -7,7 +7,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php if (!empty($data['invitations'])) : ?> <?php if (!empty($data['invitations'])) : ?>
<?php foreach ($data['invitations'] as $key => $inv) : ?> <?php foreach ($data['invitations'] as $key => $inv) : ?>
<div> <div>

View file

@ -7,7 +7,7 @@
<main class="col-two"> <main class="col-two">
<?php if ($data['type'] != 'admin') : ?> <?php if ($data['type'] != 'admin') : ?>
<div class="box-flex justify-between"> <div class="box-flex justify-between bg-white">
<?= Tpl::insert('/_block/navigation/breadcrumbs', [ <?= Tpl::insert('/_block/navigation/breadcrumbs', [
'list' => [ 'list' => [

View file

@ -1,47 +0,0 @@
<?= includeTemplate(
'/view/default/menu',
[
'data' => $data,
'meta' => $meta,
'menus' => [
[
'id' => $data['type'] . '.all',
'url' => getUrlByName('admin.' . $data['type']),
'name' => __('all'),
'icon' => 'bi-record-circle'
], [
'id' => 'add',
'url' => getUrlByName('page.add'),
'name' => __('add'),
'icon' => 'bi-plus-lg'
],
]
]
); ?>
<?php if ($data['pages']) : ?>
<?php foreach ($data['pages'] as $page) : ?>
<div class="mb5">
<a class="text-2xl" href="<?= getUrlByName('page', ['facet' => 'info', 'slug' => $page['post_slug']]); ?>">
<i class="bi-info-square middle mr5"></i> <?= $page['post_title']; ?>
</a>
<a class="text-sm gray-600" href="<?= __('edit'); ?>" href="<?= getUrlByName('content.edit', ['type' => 'page', 'id' => $page['post_id']]); ?>">
<i class="bi-pencil"></i>
</a>
<a data-type="post" data-id="<?= $page['post_id']; ?>" class="type-action gray-600 mr10 ml10">
<?php if ($page['post_is_deleted'] == 1) : ?>
<i class="bi-trash red"></i>
<?php else : ?>
<i class="bi-trash"></i>
<?php endif; ?>
</a>
</div>
<?php endforeach; ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], getUrlByName('admin.topics')); ?>
<?php else : ?>
<?= Tpl::insert('/_block/no-content', ['type' => 'small', 'text' => __('no'), 'icon' => 'bi-info-lg']); ?>
<?php endif; ?>
</main>
<?= includeTemplate('/view/default/footer'); ?>

View file

@ -6,7 +6,7 @@
'menus' => [], 'menus' => [],
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<label><?= __('build'); ?> CSS</label> <label><?= __('build'); ?> CSS</label>
<form action="./update/css"> <form action="./update/css">
<?= Html::sumbit(__('build')); ?> <?= Html::sumbit(__('build')); ?>

View file

@ -7,7 +7,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<form action="<?= getUrlByName('admin.user.change', ['id' => $data['user']['id']]); ?>" method="post"> <form action="<?= getUrlByName('admin.user.change', ['id' => $data['user']['id']]); ?>" method="post">
<?= csrf_field() ?> <?= csrf_field() ?>
<?php if ($data['user']['cover_art'] != 'cover_art.jpeg') : ?> <?php if ($data['user']['cover_art'] != 'cover_art.jpeg') : ?>

View file

@ -7,7 +7,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<table> <table>
<thead> <thead>
<th>N</th> <th>N</th>

View file

@ -19,7 +19,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php if ($data['alluser']) : ?> <?php if ($data['alluser']) : ?>
<table> <table>
<thead> <thead>

View file

@ -14,7 +14,7 @@
] ]
); ?> ); ?>
<div class="box max-w780"> <div class="box bg-white max-w780">
<form action="<?= getUrlByName('admin.word.create'); ?>" method="post"> <form action="<?= getUrlByName('admin.word.create'); ?>" method="post">
<?= csrf_field() ?> <?= csrf_field() ?>
<fieldset> <fieldset>

View file

@ -14,7 +14,7 @@
] ]
); ?> ); ?>
<div class="box"> <div class="box bg-white">
<?php if (!empty($data['words'])) : ?> <?php if (!empty($data['words'])) : ?>
<?php foreach ($data['words'] as $key => $word) : ?> <?php foreach ($data['words'] as $key => $word) : ?>
<div class="content-telo"> <div class="content-telo">

View file

@ -4,7 +4,7 @@ $url = $fs['facet_type'] == 'category' ? getUrlByName('web.dir', ['cat' => 'cat'
?> ?>
<main class="col-two"> <main class="col-two">
<div class="box-flex"> <div class="box-flex justify-between">
<p class="m0 text-xl"><?= __($fs['facet_type']); ?></p> <p class="m0 text-xl"><?= __($fs['facet_type']); ?></p>
<ul class="nav"> <ul class="nav">

View file

@ -176,7 +176,6 @@ img {
.bg-black { background-color: var(--black); } .bg-black { background-color: var(--black); }
.bg-white { background-color: var(--white); } .bg-white { background-color: var(--white); }
.bg-green { background-color: var(--green); } .bg-green { background-color: var(--green); }
.bg-pink { background-color: var(--pink); }
.bg-purple { background-color: var(--purple); } .bg-purple { background-color: var(--purple); }
.bg-yellow { background-color: var(--yellow); } .bg-yellow { background-color: var(--yellow); }
.bg-lightyellow { background-color: lightyellow; } .bg-lightyellow { background-color: lightyellow; }

View file

@ -5,7 +5,7 @@ $url = $fs['facet_type'] == 'category' ? getUrlByName('web.dir', ['cat' => 'cat'
<main class="w-100"> <main class="w-100">
<div class="box-flex bg-violet"> <div class="box-flex bg-violet justify-between">
<p class="m0 text-xl"><?= __($fs['facet_type']); ?></p> <p class="m0 text-xl"><?= __($fs['facet_type']); ?></p>
<ul class="nav"> <ul class="nav">

View file

@ -59,8 +59,7 @@ Route::before('Designator', [UserData::REGISTERED_ADMIN, '='])->getGroup();
Route::get('/facets/ban/{type}')->module('admin', 'App\Facets@ban')->where(['type' => '[a-z]+'])->name('admin.facets.ban.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('/css')->module('admin', 'App\Home@css')->name('admin.css');
Route::get('/info')->module('admin', 'App\Home@css')->name('admin.info'); 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/{page?}')->module('admin', 'App\Audits@logs', ['logs.all', 'logs'])->name('admin.logs');
Route::endGroup(); Route::endGroup();