mirror of
https://github.com/openvk/openvk
synced 2024-11-11 09:29:29 +03:00
6159262026
* Reports: [INDEV] Undone implementation of reports
* Reports: Backend is done
* Reports: Still makin it...
* Reports: Added report window
* Reports: Corrected the content type
* Reports: Make it work
* Reports: Minor fixes and localization
* Reports: Ability to hide Share and Like buttons
Also renamed the .sql file
* Revent some changes from 8f8d7bb
I will move them to the master branch
* Reports: Only for those who can access Helpdesk
* Reports: Modified the route
* Reports: Change the routes
* Reports: Show reports count
* Report: Fix URL
* Обновление репортов (#715)
* Репорты живы
* 2
* Better reports
* Логи
* Update DBEntity.updated.php
* noSpam
* Сбор IP и UserAgent + фикс логирования в IPs
* Новые поля для поиска etc.
* Fixes
* Fixes and enhancements
* Поиск по нескольким разделам
* Reports enhancements
* Совместимость с новыми логами
* Совместимость с новыми логами
* Update Logs.xml
* Update Logs.xml
* Logs i18n
* Update Logs.xml
* Update AdminPresenter.php
---------
Co-authored-by: veselcraft <veselcraft@icloud.com>
Co-authored-by: Ilya Prokopenko <55238545+Xenforce@users.noreply.github.com>
Co-authored-by: n1rwana <aydashkin@vk.com>
63 lines
2.3 KiB
XML
63 lines
2.3 KiB
XML
{extends "../@layout.xml"}
|
||
{var $canReport = $owner->getId() !== $thisUser->getId()}
|
||
|
||
{block title}
|
||
{$name}
|
||
{/block}
|
||
|
||
{block header}
|
||
{$name}
|
||
<a style="float: right;" onClick="reportApp()" n:if="$canReport ?? false">Пожаловаться</a>
|
||
{/block}
|
||
|
||
{block content}
|
||
<center>
|
||
<iframe id="appFrame" referrerpolicy="unsafe-url" sandbox="allow-scripts" frameBorder="0" src="{$url}" height="600" width="600"></iframe>
|
||
</center>
|
||
|
||
<div n:if="!is_null($news)" id="news">
|
||
<h4>{$news->getName()}</h4>
|
||
<div id="app_news_container">
|
||
{$news->getText()|noescape}
|
||
</div>
|
||
</div>
|
||
|
||
<center>
|
||
<p>
|
||
{_app_dev}: <a href="{$owner->getURL()}">{$owner->getFullName()}</a>
|
||
</p>
|
||
</center>
|
||
|
||
<script>
|
||
window.appId = {$id};
|
||
window.appTitle = {$name};
|
||
window.appPerms = {$perms};
|
||
window.appOrigin = {$origin};
|
||
</script>
|
||
|
||
<script n:if="$canReport ?? false">
|
||
function reportApp() {
|
||
uReportMsgTxt = "Вы собираетесь пожаловаться на данное приложение.";
|
||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
||
|
||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
||
(function() {
|
||
res = document.querySelector("#uReportMsgInput").value;
|
||
xhr = new XMLHttpRequest();
|
||
xhr.open("GET", "/report/" + {$id} + "?reason=" + res + "&type=app", true);
|
||
xhr.onload = (function() {
|
||
if(xhr.responseText.indexOf("reason") === -1)
|
||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
||
else
|
||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
||
});
|
||
xhr.send(null);
|
||
}),
|
||
Function.noop
|
||
]);
|
||
}
|
||
</script>
|
||
|
||
{script "js/al_games.js"}
|
||
{/block}
|