Skip to content

Commit

Permalink
[Reports] Возможность перейти к посту из комментария (#965)
Browse files Browse the repository at this point in the history
ПОРНО
  • Loading branch information
n1rwana authored Aug 14, 2023
1 parent a2c5896 commit 1174ddf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Web/Presenters/templates/Report/ViewContent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{elseif $type == "group" || $type == "user"}
{include "../components/group.xml", group => $object, isUser => $type == "user"}
{elseif $type == "comment"}
{include "../components/comment.xml", comment => $object, timeOnly => true}
{include "../components/comment.xml", comment => $object, timeOnly => true, linkWithPost => true}
{elseif $type == "note"}
{include "./content/note.xml", note => $object}
{elseif $type == "app"}
Expand Down
7 changes: 6 additions & 1 deletion Web/Presenters/templates/components/comment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
</div>
</div>
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
<a href="#_comment{$comment->getId()}" class="date">{$comment->getPublicationTime()}</a>
<a
href="{=$linkWithPost && get_class($comment->getTarget()) == 'openvk\Web\Models\Entities\Post' ? '/wall' . $comment->getTarget()->getPrettyId() : ''}#_comment{$comment->getId()}"
class="date"
>
{$comment->getPublicationTime()}
</a>
{if !$timeOnly}
&nbsp;|
{if $comment->canBeDeletedBy($thisUser)}
Expand Down

0 comments on commit 1174ddf

Please sign in to comment.