diff --git a/Web/Presenters/templates/components/post.xml b/Web/Presenters/templates/components/post.xml index a099983a..83f5497e 100644 --- a/Web/Presenters/templates/components/post.xml +++ b/Web/Presenters/templates/components/post.xml @@ -1,7 +1,7 @@ -{ifset $thisUser} - {if $thisUser->hasMicroblogEnabled()} - {include "post/microblogpost.xml", post => $post} - {else} - {include "post/oldpost.xml", post => $post} - {/if} -{/ifset} \ No newline at end of file +{var microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false} + +{if $microblogEnabled} + {include "post/microblogpost.xml", post => $post} +{else} + {include "post/oldpost.xml", post => $post} +{/if} diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml index 0807c300..6cea48b3 100644 --- a/Web/Presenters/templates/components/post/microblogpost.xml +++ b/Web/Presenters/templates/components/post/microblogpost.xml @@ -1,93 +1,93 @@ -{var author = $post->getOwner()} - - - - - - - - -
- - - -
-
- {$post->getText()|noescape} - -
-
- {include "../attachment.xml", attachment => $attachment} -
-
-
-
-
-  ! Этот пост был размещён за взятку. -
-
- {var acutalAuthor = $post->getOwner(false)} - - Автор: - - {$acutalAuthor->getCanonicalName()} - - -
-
-
- {$post->getPublicationTime()} - {if isset($thisUser)} -   - - {if !($forceNoCommentsLink ?? false)} - - {if $post->getCommentsCount() > 0} - {_"comments"} ({$post->getCommentsCount()}) - {else} - {_"comments"} - {/if} - - {/if} - - - - - - {/if} -
-
- -
-
+{var author = $post->getOwner()} + + + + + + + + +
+ + + +
+
+ {$post->getText()|noescape} + +
+
+ {include "../attachment.xml", attachment => $attachment} +
+
+
+
+
+  ! Этот пост был размещён за взятку. +
+
+ {var acutalAuthor = $post->getOwner(false)} + + Автор: + + {$acutalAuthor->getCanonicalName()} + + +
+
+
+ {$post->getPublicationTime()} + {if isset($thisUser)} +   + + {if !($forceNoCommentsLink ?? false)} + + {if $post->getCommentsCount() > 0} + {_"comments"} ({$post->getCommentsCount()}) + {else} + {_"comments"} + {/if} + + {/if} + + + + + + {/if} +
+
+ +
+
diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml index f3d17ff4..e70c0361 100644 --- a/Web/Presenters/templates/components/post/oldpost.xml +++ b/Web/Presenters/templates/components/post/oldpost.xml @@ -1,106 +1,106 @@ -{var author = $post->getOwner()} - - - - - - - - -
- - - -
-
- {$post->getText()|noescape} - -
-
- {include "../attachment.xml", attachment => $attachment} -
-
-
-
-
-  ! Этот пост был размещён за взятку. -
-
- {var acutalAuthor = $post->getOwner(false)} - - Автор: - - {$acutalAuthor->getCanonicalName()} - - -
-
-
- {if $post->canBeDeletedBy($thisUser) && !($forceNoDeleteLink ?? false)} - {_"delete"} |  - {/if} - - {if !($forceNoCommentsLink ?? false)} - - {if $post->getCommentsCount() > 0} - {_"comments"} ({$post->getCommentsCount()}) - {else} - {_"comments"} - {/if} - -  |  - {/if} - - - {if $post->getRepostCount() > 0} - {_"share"} - ({$post->getRepostCount()}) - {else} - {_"share"} - {/if} - - - - -
-
- -
-
+{var author = $post->getOwner()} + + + + + + + + +
+ + + +
+
+ {$post->getText()|noescape} + +
+
+ {include "../attachment.xml", attachment => $attachment} +
+
+
+
+
+  ! Этот пост был размещён за взятку. +
+
+ {var acutalAuthor = $post->getOwner(false)} + + Автор: + + {$acutalAuthor->getCanonicalName()} + + +
+
+
+ {if $post->canBeDeletedBy($thisUser) && !($forceNoDeleteLink ?? false)} + {_"delete"} |  + {/if} + + {if !($forceNoCommentsLink ?? false)} + + {if $post->getCommentsCount() > 0} + {_"comments"} ({$post->getCommentsCount()}) + {else} + {_"comments"} + {/if} + +  |  + {/if} + + + {if $post->getRepostCount() > 0} + {_"share"} + ({$post->getRepostCount()}) + {else} + {_"share"} + {/if} + + + + +
+
+ +
+