2020-06-07 19:04:43 +03:00
|
|
|
{extends "../@layout.xml"}
|
2022-08-09 09:37:08 +03:00
|
|
|
{block title}{_post}{/block}
|
2020-06-07 19:04:43 +03:00
|
|
|
|
|
|
|
{block header}
|
2021-09-17 20:17:45 +03:00
|
|
|
<a href="{$wallOwner->getURL()}">
|
|
|
|
{$wallOwner->getCanonicalName()}
|
|
|
|
</a>
|
|
|
|
»
|
2021-09-17 20:46:32 +03:00
|
|
|
<a href="/wall{$wallOwner->getId() * ($isWallOfGroup ? -1 : 1)}">
|
2021-09-17 20:17:45 +03:00
|
|
|
{_wall}
|
|
|
|
</a>
|
|
|
|
»
|
2022-08-09 09:37:08 +03:00
|
|
|
{_post}
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|
|
|
|
|
|
|
|
{block content}
|
2023-11-16 19:44:12 +03:00
|
|
|
<div class="tabs">
|
|
|
|
<div class="tab">
|
|
|
|
<a href="/wall{$post->getTargetWall()}">{_all_posts}</a>
|
|
|
|
</div>
|
|
|
|
<div class="tab">
|
|
|
|
<a href="/wall{$post->getTargetWall()}?type=owners">{$post->getTargetWall() < 0 ? tr("clubs_posts") : tr("users_posts", ovk_proc_strtr($wallOwner->getFirstName(), 20))}</a>
|
|
|
|
</div>
|
|
|
|
<div class="tab">
|
|
|
|
<a href="/wall{$post->getTargetWall()}?type=others">{_others_posts}</a>
|
|
|
|
</div>
|
|
|
|
<div class="tab" id="activetabs">
|
|
|
|
<a href="" id="act_tab_a">{_post}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-07 19:04:43 +03:00
|
|
|
{include "../components/post.xml", post => $post, forceNoCommentsLink => TRUE, forceNoDeleteLink => TRUE}
|
|
|
|
<hr/>
|
|
|
|
<div style="float: left; min-height: 100px; width: 68%;">
|
|
|
|
{include "../components/comments.xml",
|
|
|
|
comments => $comments,
|
|
|
|
count => $cCount,
|
|
|
|
page => $cPage,
|
|
|
|
model => "posts",
|
2023-08-11 11:24:26 +03:00
|
|
|
parent => $post,
|
|
|
|
fromPost => true }
|
2020-06-07 19:04:43 +03:00
|
|
|
</div>
|
|
|
|
<div style="float: left; min-height: 100px; width: 32%;">
|
2020-08-20 17:05:00 +03:00
|
|
|
<h4>{_actions}</h4>
|
2020-06-18 14:22:32 +03:00
|
|
|
{if isset($thisUser)}
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $canDelete = $post->canBeDeletedBy($thisUser)}
|
2023-08-11 16:50:19 +03:00
|
|
|
{if $thisUser->getId() != $post->getOwner()->getId()}
|
|
|
|
{var $canReport = true}
|
|
|
|
{/if}
|
2020-06-18 14:22:32 +03:00
|
|
|
{/if}
|
|
|
|
|
2020-08-20 17:05:00 +03:00
|
|
|
<a n:if="$canDelete ?? false" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a>
|
2023-09-14 20:54:22 +03:00
|
|
|
<a
|
2023-10-03 19:40:13 +03:00
|
|
|
n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) AND $post->getEditTime()"
|
2023-09-14 20:54:22 +03:00
|
|
|
style="display:block;width:96%;"
|
|
|
|
class="profile_link"
|
|
|
|
href="/admin/logs?type=1&obj_type=Post&obj_id={$post->getId()}"
|
|
|
|
>
|
|
|
|
{_changes_history}
|
|
|
|
</a>
|
2023-08-11 16:50:19 +03:00
|
|
|
<a n:if="$canReport ?? false" class="profile_link" style="display:block;width:96%;" href="javascript:reportPost()">{_report}</a>
|
2020-06-07 19:04:43 +03:00
|
|
|
</div>
|
2023-08-11 16:50:19 +03:00
|
|
|
<script n:if="$canReport ?? false">
|
|
|
|
function reportPost() {
|
2023-09-17 16:22:59 +03:00
|
|
|
uReportMsgTxt = tr("going_to_report_post");
|
|
|
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
|
|
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
2023-08-11 16:50:19 +03:00
|
|
|
|
2023-09-17 16:22:59 +03:00
|
|
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
2023-08-11 16:50:19 +03:00
|
|
|
(function() {
|
|
|
|
res = document.querySelector("#uReportMsgInput").value;
|
|
|
|
xhr = new XMLHttpRequest();
|
|
|
|
xhr.open("GET", "/report/" + {$post->getId()} + "?reason=" + res + "&type=post", true);
|
|
|
|
xhr.onload = (function() {
|
|
|
|
if(xhr.responseText.indexOf("reason") === -1)
|
2023-09-17 16:22:59 +03:00
|
|
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
2023-08-11 16:50:19 +03:00
|
|
|
else
|
2023-09-17 16:22:59 +03:00
|
|
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
2023-08-11 16:50:19 +03:00
|
|
|
});
|
|
|
|
xhr.send(null);
|
|
|
|
}),
|
|
|
|
Function.noop
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
</script>
|
2020-06-07 19:04:43 +03:00
|
|
|
{/block}
|