@@ -40,8 +42,8 @@
({_edited_short})
{if !$timeOnly}
- |
{if $comment->canBeDeletedBy($thisUser)}
+ |
{_delete}
{/if}
{if $comment->canBeEditedBy($thisUser)}
@@ -60,7 +62,7 @@
{/if}
@@ -101,4 +103,4 @@
Function.noop
]);
}
-
\ No newline at end of file
+
diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml
index 04731619..ce720b55 100644
--- a/Web/Presenters/templates/components/post/microblogpost.xml
+++ b/Web/Presenters/templates/components/post/microblogpost.xml
@@ -3,6 +3,11 @@
{var $commentsCount = $post->getCommentsCount()}
{var $platform = $post->getPlatform()}
{var $platformDetails = $post->getPlatformDetails()}
+{var $likesCount = $post->getLikesCount()}
+{var $repostsCount = $post->getRepostCount()}
+{var $canBePinned = $post->canBePinnedBy($thisUser ?? NULL)}
+{var $canBeDeleted = $post->canBeDeletedBy($thisUser)}
+{var $wallOwner = $post->getWallOwner()}
{if $post->isDeactivationMessage() && $post->getText()}
{var $deac = "post_deact"}
{else}
@@ -30,7 +35,6 @@
{$post->isUpdateAvatarMessage() && !$post->isPostedOnBehalfOfGroup() ? ($author->isFemale() ? tr("upd_f") : ($author->isNeutral() ? tr("upd_n") : tr("upd_m")))}
{$post->isUpdateAvatarMessage() && $post->isPostedOnBehalfOfGroup() ? tr("upd_g") : ""}
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
- {var $wallOwner = $post->getWallOwner()}
{if isset($thisUser) && $thisUser->getId() === $post->getTargetWall()}
@@ -53,9 +57,9 @@
{_pinned}
-
+
- {if $post->canBePinnedBy($thisUser) && !($forceNoPinLink ?? false) && $compact == false}
+ {if $canBePinned && !($forceNoPinLink ?? false) && $compact == false}
{if $post->isPinned()}
{else}
@@ -67,7 +71,7 @@
getTargetWall() < 0 && $post->getWallOwner()->canBeModifiedBy($thisUser)}data-fromgroup="{(int)$post->isPostedOnBehalfOfGroup()}"{/if}>
+ {if $post->getTargetWall() < 0 && $wallOwner->canBeModifiedBy($thisUser)}data-fromgroup="{(int)$post->isPostedOnBehalfOfGroup()}"{/if}>
{/if}
@@ -95,6 +99,9 @@
+ ! {_post_is_ad}
+ {_source}: {$post->getSource(true)|noescape}
+
{var $actualAuthor = $post->getOwner(false)}
@@ -121,14 +128,14 @@
-
- {if $post->getRepostCount() > 0}{$post->getRepostCount()}{/if}
+ {if $repostsCount > 0}{$repostsCount}{/if}
{if !($forceNoLike ?? false)}
{var $liked = $post->hasLikeFrom($thisUser)}
-
+
- {if $post->getLikesCount() > 0}{$post->getLikesCount()}{/if}
+ {if $likesCount > 0}{$likesCount}{/if}
{/if}
@@ -145,7 +152,7 @@
{include "../textArea.xml", route => $commentsURL, postOpts => false, graffiti => (bool) ovkGetQuirk("comments.allow-graffiti"), post => $post, club => $club}
+
-
+
+ ! {_post_is_ad}
+ {_source}: {$post->getSource(true)|noescape}
+
{var $actualAuthor = $post->getOwner(false)}
@@ -113,14 +121,14 @@
getTargetWall() < 0 && $post->getWallOwner()->canBeModifiedBy($thisUser)}data-fromgroup="{(int)$post->isPostedOnBehalfOfGroup()}"{/if}>{_edit} |
+ {if $post->getTargetWall() < 0 && $wallOwner->canBeModifiedBy($thisUser)}data-fromgroup="{(int)$post->isPostedOnBehalfOfGroup()}"{/if}>{_edit} |
{/if}
- {if !($forceNoDeleteLink ?? false) && $post->canBeDeletedBy($thisUser)}
+ {if !($forceNoDeleteLink ?? false) && $canBeDeleted}
{_delete} |
{/if}
- {if !($forceNoPinLink ?? false) && $post->canBePinnedBy($thisUser)}
+ {if !($forceNoPinLink ?? false) && $canBePinned}
{if $post->isPinned()}
{_unpin}
{else}
@@ -131,8 +139,8 @@
{_comments}
- {if $post->getCommentsCount() > 0}
- ({$post->getCommentsCount()})
+ {if $commentsCount > 0}
+ ({$commentsCount})
{/if}
@@ -142,22 +150,22 @@
{_share}
- {if $post->getRepostCount() > 0}
- ({$post->getRepostCount()})
+ {if $repostsCount > 0}
+ ({$repostsCount})
{/if}
{ifset $thisUser}
{var $liked = $post->hasLikeFrom($thisUser)}
-
+
- {if $post->getLikesCount() > 0}{$post->getLikesCount()}{/if}
+ {if $likesCount > 0}{$likesCount}{/if}
{else}
-
+
- {$post->getLikesCount()}
+ {$likesCount}
{/ifset}
diff --git a/Web/Presenters/templates/components/textArea.xml b/Web/Presenters/templates/components/textArea.xml
index 530174b1..a9f0e59c 100644
--- a/Web/Presenters/templates/components/textArea.xml
+++ b/Web/Presenters/templates/components/textArea.xml
@@ -18,14 +18,15 @@
{_poll}
-
-
-
+
+
+
{var $anonEnabled = OPENVK_ROOT_CONF['openvk']['preferences']['wall']['anonymousPosting']['enable']}
+
{if !is_null($thisUser) && !is_null($club ?? NULL) && $owner < 0}
{if $club->canBeModifiedBy($thisUser)}
|