From 2e15de74fc580e2e5e9cbbccbe6d4e2a5ae395b3 Mon Sep 17 00:00:00 2001 From: Celestora Date: Tue, 12 Oct 2021 14:16:39 +0300 Subject: [PATCH] Wall: Move input TextArea to separate file Fixes #44 --- Web/Presenters/templates/Wall/Feed.xml | 17 +------ Web/Presenters/templates/Wall/Wall.xml | 46 +----------------- .../templates/components/comments.xml | 9 +--- .../templates/components/textArea.xml | 44 +++++++++++++++++ Web/Presenters/templates/components/wall.xml | 47 +------------------ 5 files changed, 50 insertions(+), 113 deletions(-) create mode 100644 Web/Presenters/templates/components/textArea.xml diff --git a/Web/Presenters/templates/Wall/Feed.xml b/Web/Presenters/templates/Wall/Feed.xml index 4d331832..e8d65d99 100644 --- a/Web/Presenters/templates/Wall/Feed.xml +++ b/Web/Presenters/templates/Wall/Feed.xml @@ -18,22 +18,7 @@
{_"publish_post"}
-

-
- - - - -
-
- -
- - {_"attach_photo"} - -
-
-
+ {include "../components/textArea.xml", route => "/wall" . $thisUser->getId() . "/makePost"}
diff --git a/Web/Presenters/templates/Wall/Wall.xml b/Web/Presenters/templates/Wall/Wall.xml index 03de0e44..69de494e 100644 --- a/Web/Presenters/templates/Wall/Wall.xml +++ b/Web/Presenters/templates/Wall/Wall.xml @@ -15,52 +15,8 @@ {block content}
-
-
-
- -
- -
-
-
- Вложение: (unknown) -
-
- {if !is_null($thisUser) && $owner < 0 && $club->canBeModifiedBy($thisUser)} - - - - - {/if} - - -
- - - -
- - -
-
-
+ {include "../components/textArea.xml", route => "/wall$owner/makePost"}
diff --git a/Web/Presenters/templates/components/comments.xml b/Web/Presenters/templates/components/comments.xml index 08a6408c..961ba376 100644 --- a/Web/Presenters/templates/components/comments.xml +++ b/Web/Presenters/templates/components/comments.xml @@ -1,13 +1,8 @@

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

-
- -
- -
- -
+ {var commentsURL = "/al_comments.pl/create/$model/" . $parent->getId()} + {include "textArea.xml", route => $commentsURL, postOpts => false}
{if sizeof($comments) > 0} diff --git a/Web/Presenters/templates/components/textArea.xml b/Web/Presenters/templates/components/textArea.xml new file mode 100644 index 00000000..5cfce31d --- /dev/null +++ b/Web/Presenters/templates/components/textArea.xml @@ -0,0 +1,44 @@ +
+
+ +
+ +
+ +
+
diff --git a/Web/Presenters/templates/components/wall.xml b/Web/Presenters/templates/components/wall.xml index db3669a7..b9eda187 100644 --- a/Web/Presenters/templates/components/wall.xml +++ b/Web/Presenters/templates/components/wall.xml @@ -8,50 +8,7 @@
-
-
- -
- -
- -
-
+ {include "../components/textArea.xml", route => "/wall$owner/makePost"}
@@ -67,4 +24,4 @@ {/if}
-
\ No newline at end of file +