From 9bb096a81834b63f5574c7f7231ad35271afc058 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Apr 2011 11:28:37 +0200 Subject: [PATCH] =?utf8?q?Store=20original=20and=20parsed=20text=20in=20co?= =?utf8?q?ntenxt,=20compare=20to=20hide=20=E2=80=9Ctoggle=E2=80=9D=20link.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This also requires the latest snapshot of utils for the “text” parameter of the StoreFilter. --- pom.xml | 2 +- src/main/resources/templates/include/viewPost.html | 12 ++++++++---- src/main/resources/templates/include/viewReply.html | 12 ++++++++---- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 0dfac6e..985ceb0 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.pterodactylus utils - 0.9.1 + 0.9.2-SNAPSHOT junit diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index 676fa6a..4600d45 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -16,8 +16,10 @@ <%/if> <%/if> -
<% post.text|html>
-
<% post.text|parse sone=post.sone>
+ <% post.text|html|store key=originalText text=true> + <% post.text|parse sone=post.sone|store key=parsedText text=true> +
<% originalText>
+
<% parsedText>
@@ -36,8 +38,10 @@
· - · - + <%if ! originalText|match key=parsedText> + · + + <%/if>
· ↑ diff --git a/src/main/resources/templates/include/viewReply.html b/src/main/resources/templates/include/viewReply.html index e179e01..5dc26fb 100644 --- a/src/main/resources/templates/include/viewReply.html +++ b/src/main/resources/templates/include/viewReply.html @@ -8,13 +8,17 @@
-
<% reply.text|html>
-
<% reply.text|parse sone=reply.sone>
+ <% reply.text|html|store key=originalText text=true> + <% reply.text|parse sone=reply.sone|store key=parsedText text=true> +
<% originalText>
+
<% parsedText>
<% reply.time|date format="MMM d, yyyy, HH:mm:ss">
- · - + <%if ! originalText|match key=parsedText> + · + + <%/if>
· ↑ -- 2.7.4