From: David ‘Bombe’ Roden Date: Sat, 16 Oct 2010 10:27:32 +0000 (+0200) Subject: Create inclusion template for viewing a post. X-Git-Tag: 0.1-RC1~273 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=09b9d94dea6b6750a00475ab4e75d378bd76cc8f;p=Sone.git Create inclusion template for viewing a post. --- diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 2d3c1d3..179ab52 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -107,3 +107,6 @@ Page.ViewPost.Button.PostReply=Post Reply! Page.FollowSone.Title=Follow Sone - Sone Page.Logout.Title=Logout - Sone + +View.Post.DeleteLink=Delete Post +View.Post.SendReply=Post Reply! diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html new file mode 100644 index 0000000..c6ea6a2 --- /dev/null +++ b/src/main/resources/templates/include/viewPost.html @@ -0,0 +1,21 @@ +
+ +
<% post.text|html>
+ + <%if post.sone.isCurrent> +
+<%foreach post.replies reply> +
+ +
<% reply.text|html>
+
<% reply.time|date format="MMM d, yyyy, HH:mm:ss">
+
+<%/foreach> +
+
+ + + + +
+
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index d148926..3db413d 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -28,26 +28,7 @@
<%foreach posts post> -
- -
<% post.text|html>
- -
- <%foreach post.replies reply> -
- -
<% reply.text|html>
-
<% reply.time|date format="MMM d, yyyy, HH:mm:ss">
-
- <%/foreach> -
-
- - - - -
-
+ <%include include/viewPost.html> <%foreachelse>
<%= Page.Index.PostList.Text.NoPostYet|l10n|html>
<%/foreach> diff --git a/src/main/resources/templates/viewPost.html b/src/main/resources/templates/viewPost.html index 237bfce..0209b20 100644 --- a/src/main/resources/templates/viewPost.html +++ b/src/main/resources/templates/viewPost.html @@ -2,25 +2,6 @@

<%= Page.ViewPost.Page.Title|l10n|insert needle="{sone}" key=post.sone.niceName|html>

-
- -
<% post.text|html>
-
<% post.time|date format="MMM d, yyyy, HH:mm:ss">
-
- <%foreach post.replies reply> -
- -
<% reply.text|html>
-
<% reply.time|date format="MMM d, yyyy, HH:mm:ss">
-
- <%/foreach> -
-
- - - - -
-
+ <%include include/viewPost.html>