diff --git a/Web/Presenters/templates/components/attachment.xml b/Web/Presenters/templates/components/attachment.xml index 9e9271f2..4689723e 100644 --- a/Web/Presenters/templates/components/attachment.xml +++ b/Web/Presenters/templates/components/attachment.xml @@ -5,8 +5,8 @@ {$attachment->getDescription()} {else} - - {_ + + {_attach_no_longer_available} {/if} {elseif $attachment instanceof \openvk\Web\Models\Entities\Video} @@ -14,12 +14,12 @@ {elseif $attachment instanceof \openvk\Web\Models\Entities\Post} {php $GLOBALS["_nesAttGloCou"] = (isset($GLOBALS["_nesAttGloCou"]) ? $GLOBALS["_nesAttGloCou"] : 0) + 1} {if $GLOBALS["_nesAttGloCou"] > 2} - {_"open_post"} + {_open_post} {else} {include "post.xml", post => $attachment, compact => true} {/if} {else} - {_"version_incompatibility"} + {_version_incompatibility} {/if} {php $GLOBALS["_nesAttGloCou"] = NULL} diff --git a/Web/Presenters/templates/components/comment.xml b/Web/Presenters/templates/components/comment.xml index 5671ac54..65072458 100644 --- a/Web/Presenters/templates/components/comment.xml +++ b/Web/Presenters/templates/components/comment.xml @@ -8,10 +8,7 @@ - + @@ -19,7 +16,7 @@ {$author->getCanonicalName()} - {if $author->isVerified()}{/if}
+
@@ -34,9 +31,9 @@
{$comment->getPublicationTime()} | {if $comment->canBeDeletedBy($thisUser)} - {_"delete"} | + {_delete} | {/if} - {_"reply"} + {_reply}
@@ -45,7 +42,6 @@
- diff --git a/Web/Presenters/templates/components/comments.xml b/Web/Presenters/templates/components/comments.xml index 99400706..30009c59 100644 --- a/Web/Presenters/templates/components/comments.xml +++ b/Web/Presenters/templates/components/comments.xml @@ -1,4 +1,4 @@ -

{_"comments"} ({$count})

+

{_comments} ({$count})

{var commentsURL = "/al_comments/create/$model/" . $parent->getId()} @@ -27,7 +27,7 @@ {else}

Будьте первым кто оставит комментарий к этой дичи!

{/if} --> - {_"comments_tip"} + {_comments_tip} {/if} {script "js/al_comments.js"} diff --git a/Web/Presenters/templates/components/paginator.xml b/Web/Presenters/templates/components/paginator.xml index 7c14e7e4..206c7fb3 100644 --- a/Web/Presenters/templates/components/paginator.xml +++ b/Web/Presenters/templates/components/paginator.xml @@ -3,16 +3,10 @@
- {if $conf->page > $space} - « - {/if} + « {for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++} - {if $j > 0 && $j <= $pageCount} - {$j} - {/if} + {$j} {/for} - {if $conf->page <= $pageCount-$space} - » - {/if} + »
diff --git a/Web/Presenters/templates/components/post.xml b/Web/Presenters/templates/components/post.xml index 5c1bebe0..96ec60b1 100644 --- a/Web/Presenters/templates/components/post.xml +++ b/Web/Presenters/templates/components/post.xml @@ -1,9 +1,4 @@ {var microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false} -{if !$post->isPostedOnBehalfOfGroup()} - {var then = date_create("@" . $post->getOwner()->getOnline()->timestamp())} - {var now = date_create()} - {var diff = date_diff($now, $then)} -{/if} {if $microblogEnabled} {include "post/microblogpost.xml", post => $post, diff => $diff, commentSection => $commentSection} diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml index d50d9b02..5755e865 100644 --- a/Web/Presenters/templates/components/post/microblogpost.xml +++ b/Web/Presenters/templates/components/post/microblogpost.xml @@ -9,25 +9,14 @@ - - {if !$post->isPostedOnBehalfOfGroup() && !$compact} - - {_online} - - {/if} + + {_online}
- {var acutalAuthor = $post->getOwner(false)} + {var actualAuthor = $post->getOwner(false)} - Автор: - - {$acutalAuthor->getCanonicalName()} + {_author}: + + {$actualAuthor->getCanonicalName()}
@@ -94,26 +82,17 @@ {if isset($thisUser)}   - {if !($forceNoCommentsLink ?? false)} - - {_"comment"} - - {/if} + {_comment} {/if}
- {if !($forceNoCommentsLink ?? false)} -
- {if $commentsCount > 3} - {_view_other_comments} - {/if} - {foreach $comments as $comment} - {include "../comment.xml", comment => $comment, $compact => true} - {/foreach} -
- {var commentsURL = "/al_comments/create/posts/" . $post->getId()} - {var club = is_null($club) ? ($post->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($post->getTargetWall())) : NULL) : $club} - {include "../textArea.xml", route => $commentsURL, postOpts => false, graffiti => (bool) ovkGetQuirk("comments.allow-graffiti"), post => $post, club => $club} -
+
+ {_view_other_comments} + {foreach $comments as $comment} + {include "../comment.xml", comment => $comment, $compact => true} + {/foreach} +
+ {var commentsURL = "/al_comments/create/posts/" . $post->getId()} + {var club = is_null($club) ? ($post->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($post->getTargetWall())) : NULL) : $club} + {include "../textArea.xml", route => $commentsURL, postOpts => false, graffiti => (bool) ovkGetQuirk("comments.allow-graffiti"), post => $post, club => $club}
- {/if} +
diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml index 6c2958e7..1a3c4c84 100644 --- a/Web/Presenters/templates/components/post/oldpost.xml +++ b/Web/Presenters/templates/components/post/oldpost.xml @@ -5,26 +5,15 @@ - + + {_online} - {if !$post->isPostedOnBehalfOfGroup() && !($compact ?? false)} - - {_online} - - {/if} -
@@ -64,68 +50,54 @@  ! Этот пост был размещён за взятку.
- {var acutalAuthor = $post->getOwner(false)} + {var actualAuthor = $post->getOwner(false)} - Автор: - - {$acutalAuthor->getCanonicalName()} + {_author}: + + {$actualAuthor->getCanonicalName()}
{if $post->canBeDeletedBy($thisUser) && !($forceNoDeleteLink ?? false)} - {_"delete"} |  + {_delete}  |  {/if} {if $post->canBePinnedBy($thisUser) && !($forceNoPinLink ?? false)} {if $post->isPinned()} - {_unpin} |  + {_unpin} {else} - {_pin} |  + {_pin} {/if} +  |  {/if} - {if !($forceNoCommentsLink ?? false)} - - {if $post->getCommentsCount() > 0} - {_"comments"} ({$post->getCommentsCount()}) - {else} - {_"comments"} - {/if} - - {/if} + + {_comments} + {if $post->getCommentsCount() > 0} + ({$post->getCommentsCount()}) + {/if} + {if !($forceNoCommentsLink ?? false) && !($forceNoShareLink ?? false)}  |  {/if} - {if !($forceNoShareLink ?? false)} - - {if $post->getRepostCount() > 0} - {_"share"} - ({$post->getRepostCount()}) - {else} - {_"share"} - {/if} - - {/if} + + {_share} + {if $post->getRepostCount() > 0} + ({$post->getRepostCount()}) + {/if} + - {if !($forceNoLike ?? false)} - - {/if} -
-
- +
diff --git a/Web/Presenters/templates/components/textArea.xml b/Web/Presenters/templates/components/textArea.xml index c27d0506..c14b652a 100644 --- a/Web/Presenters/templates/components/textArea.xml +++ b/Web/Presenters/templates/components/textArea.xml @@ -27,25 +27,25 @@ {/if} {/if}
@@ -53,7 +53,7 @@
- +
{_attach} diff --git a/Web/Presenters/templates/components/wall.xml b/Web/Presenters/templates/components/wall.xml index f8be0067..feb688bc 100644 --- a/Web/Presenters/templates/components/wall.xml +++ b/Web/Presenters/templates/components/wall.xml @@ -1,9 +1,9 @@