projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
90d19c9
)
Display new-reply notification differently.
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 7 Apr 2011 19:06:37 +0000
(21:06 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 7 Apr 2011 19:06:37 +0000
(21:06 +0200)
This fixes #35.
src/main/java/net/pterodactylus/sone/web/WebInterface.java
patch
|
blob
|
history
src/main/resources/i18n/sone.en.properties
patch
|
blob
|
history
src/main/resources/templates/notify/newReplyNotification.html
patch
|
blob
|
history
diff --git
a/src/main/java/net/pterodactylus/sone/web/WebInterface.java
b/src/main/java/net/pterodactylus/sone/web/WebInterface.java
index
7c33803
..
7523d5f
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
+++ b/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
@@
-53,6
+53,7
@@
import net.pterodactylus.sone.template.NotificationManagerAccessor;
import net.pterodactylus.sone.template.ParserFilter;
import net.pterodactylus.sone.template.PostAccessor;
import net.pterodactylus.sone.template.ReplyAccessor;
import net.pterodactylus.sone.template.ParserFilter;
import net.pterodactylus.sone.template.PostAccessor;
import net.pterodactylus.sone.template.ReplyAccessor;
+import net.pterodactylus.sone.template.ReplyGroupFilter;
import net.pterodactylus.sone.template.RequestChangeFilter;
import net.pterodactylus.sone.template.SoneAccessor;
import net.pterodactylus.sone.template.SubstringFilter;
import net.pterodactylus.sone.template.RequestChangeFilter;
import net.pterodactylus.sone.template.SoneAccessor;
import net.pterodactylus.sone.template.SubstringFilter;
@@
-208,6
+209,7
@@
public class WebInterface implements CoreListener {
templateContextFactory.addFilter("unknown", new UnknownDateFilter(getL10n(), "View.Sone.Text.UnknownDate"));
templateContextFactory.addFilter("format", new FormatFilter());
templateContextFactory.addFilter("sort", new CollectionSortFilter());
templateContextFactory.addFilter("unknown", new UnknownDateFilter(getL10n(), "View.Sone.Text.UnknownDate"));
templateContextFactory.addFilter("format", new FormatFilter());
templateContextFactory.addFilter("sort", new CollectionSortFilter());
+ templateContextFactory.addFilter("replyGroup", new ReplyGroupFilter());
templateContextFactory.addProvider(Provider.TEMPLATE_CONTEXT_PROVIDER);
templateContextFactory.addProvider(new ClassPathTemplateProvider());
templateContextFactory.addTemplateObject("formPassword", formPassword);
templateContextFactory.addProvider(Provider.TEMPLATE_CONTEXT_PROVIDER);
templateContextFactory.addProvider(new ClassPathTemplateProvider());
templateContextFactory.addTemplateObject("formPassword", formPassword);
diff --git
a/src/main/resources/i18n/sone.en.properties
b/src/main/resources/i18n/sone.en.properties
index
b8a8570
..
4e18d5d
100644
(file)
--- a/
src/main/resources/i18n/sone.en.properties
+++ b/
src/main/resources/i18n/sone.en.properties
@@
-287,7
+287,7
@@
Notification.NewPost.ShortText=New posts have been discovered.
Notification.NewPost.Text=New posts have been discovered by the following Sones:
Notification.NewPost.Button.MarkRead=Mark as read
Notification.NewReply.ShortText=New replies have been discovered.
Notification.NewPost.Text=New posts have been discovered by the following Sones:
Notification.NewPost.Button.MarkRead=Mark as read
Notification.NewReply.ShortText=New replies have been discovered.
-Notification.NewReply.Text=New replies have been discovered by the following Sones:
+Notification.NewReply.Text=New replies have been discovered
for posts
by the following Sones:
Notification.SoneIsBeingRescued.Text=The following Sones are currently being rescued:
Notification.SoneRescued.Text=The following Sones have been rescued:
Notification.SoneRescued.Text.RememberToUnlock=Please remember to control the posts and replies you have given and don’t forget to unlock your Sones!
Notification.SoneIsBeingRescued.Text=The following Sones are currently being rescued:
Notification.SoneRescued.Text=The following Sones have been rescued:
Notification.SoneRescued.Text.RememberToUnlock=Please remember to control the posts and replies you have given and don’t forget to unlock your Sones!
diff --git
a/src/main/resources/templates/notify/newReplyNotification.html
b/src/main/resources/templates/notify/newReplyNotification.html
index
1253da5
..
ee8c410
100644
(file)
--- a/
src/main/resources/templates/notify/newReplyNotification.html
+++ b/
src/main/resources/templates/notify/newReplyNotification.html
@@
-10,9
+10,9
@@
<input type="hidden" name="id" value="<%foreach replies reply><% reply.id|html><%notlast> <%/notlast><%/foreach>" />
<button type="submit" name="mark-read" value="true"><%= Notification.NewPost.Button.MarkRead|l10n|html></button>
</form>
<input type="hidden" name="id" value="<%foreach replies reply><% reply.id|html><%notlast> <%/notlast><%/foreach>" />
<button type="submit" name="mark-read" value="true"><%= Notification.NewPost.Button.MarkRead|l10n|html></button>
</form>
+ <%foreach replies reply><div class="hidden reply-id"><%reply.id|html></div><%/foreach>
<%= Notification.NewReply.Text|l10n|html>
<%= Notification.NewReply.Text|l10n|html>
- <%foreach replies reply>
- <div class="hidden reply-id"><%reply.id|html></div>
- <a class="link-<% reply.post.id|html>" href="viewPost.html?post=<% reply.post.id|html>"><% reply.sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
+ <%foreach replies postGroup|replyGroup>
+ <a class="link-<% postGroup.key.id|html>" href="viewPost.html?post=<% postGroup.key.id|html>"><% postGroup.key.sone.niceName|html></a> (<%foreach postGroup.value.sones sone><%sone.niceName|html><%notlast>, <%/notlast><%/foreach>)<%notlast>, <%/notlast><%last>.<%/last>
<%/foreach>
</div>
<%/foreach>
</div>