mirror of
https://github.com/openvk/openvk
synced 2024-11-14 11:09:12 +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>
96 lines
4.2 KiB
XML
96 lines
4.2 KiB
XML
{extends "../@layout.xml"}
|
||
|
||
{block title}{_video}{/block}
|
||
|
||
{block header}
|
||
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a>
|
||
»
|
||
<a href="/videos{$user->getId()}">{_videos}</a>
|
||
»
|
||
{_video}
|
||
{/block}
|
||
|
||
{block content}
|
||
<center style="margin-bottom: 8pt;">
|
||
{if $video->getType() === 0}
|
||
<div class="bsdn" data-name="{$video->getName()}" data-author="{$user->getCanonicalName()}">
|
||
<video src="{$video->getURL()}"></video>
|
||
</div>
|
||
{else}
|
||
{var $driver = $video->getVideoDriver()}
|
||
{if !$driver}
|
||
Эта видеозапись не поддерживается в вашей версии OpenVK.
|
||
{else}
|
||
{$driver->getEmbed()|noescape}
|
||
{/if}
|
||
{/if}
|
||
</center>
|
||
|
||
<hr/>
|
||
|
||
<div style="width: 100%; min-height: 100px;">
|
||
<div style="float: left; min-height: 100px; width: 68%; margin-right: 2%;">
|
||
{include "../components/comments.xml",
|
||
comments => $comments,
|
||
count => $cCount,
|
||
page => $cPage,
|
||
model => "videos",
|
||
parent => $video}
|
||
</div>
|
||
<div style="float: left; min-height: 100px; width: 30%; overflow: hidden; overflow-wrap: break-word;">
|
||
<div>
|
||
<h4>{_information}</h4>
|
||
<span style="color: grey;">{_info_name}:</span>
|
||
{$video->getName()}<br/>
|
||
<span style="color: grey;">{_info_description}:</span>
|
||
{$video->getDescription() ?? "(" . tr("none") . ")"}<br/>
|
||
<span style="color: grey;">{_info_uploaded_by}:</span>
|
||
<a href="{$user->getURL()}">{$user->getFullName()}</a><br/>
|
||
<span style="color: grey;">{_info_upload_date}:</span>
|
||
{$video->getPublicationTime()}
|
||
</div>
|
||
<br/>
|
||
<div n:if="isset($thisUser) && $thisUser->getId() === $user->getId()">
|
||
<h4>{_actions}</h4>
|
||
<a href="/video{$video->getPrettyId()}/edit" class="profile_link" style="display:block;width:96%;">
|
||
{_edit}
|
||
</a>
|
||
<a href="/video{$video->getPrettyId()}/remove" class="profile_link" style="display:block;width:96%;">
|
||
{_delete}
|
||
</a>
|
||
</div>
|
||
|
||
{if isset($thisUser)}
|
||
{if $thisUser->getId() != $video->getOwner()->getId()}
|
||
{var canReport = true}
|
||
{/if}
|
||
{/if}
|
||
|
||
<a n:if="$canReport ?? false" class="profile_link" style="display:block;width:96%;" href="javascript:reportVideo()">{_report}</a>
|
||
|
||
<script n:if="$canReport ?? false">
|
||
function reportVideo() {
|
||
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/" + {$video->getId()} + "?reason=" + res + "&type=video", 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>
|
||
</div>
|
||
</div>
|
||
{/block}
|