From ff2bb9438e85e9f11d95b7f25ac61d12753369bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 16 Jan 2013 07:50:33 +0100 Subject: [PATCH] =?utf8?q?Add=20filter=20for=20local/remote=20Sones=20to?= =?utf8?q?=20=E2=80=9CKnown=20Sones=E2=80=9D=20page.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java | 4 ++++ src/main/resources/i18n/sone.de.properties | 2 ++ src/main/resources/i18n/sone.en.properties | 2 ++ src/main/resources/i18n/sone.fr.properties | 3 +++ src/main/resources/i18n/sone.ja.properties | 3 +++ src/main/resources/i18n/sone.no.properties | 3 +++ src/main/resources/i18n/sone.pl.properties | 3 +++ src/main/resources/i18n/sone.ru.properties | 3 +++ src/main/resources/templates/knownSones.html | 2 ++ 9 files changed, 25 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java b/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java index b40515a..00568da 100644 --- a/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java +++ b/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java @@ -104,6 +104,10 @@ public class KnownSonesPage extends SoneTemplatePage { return sone.isKnown(); } }); + } else if ("own".equals(filter)) { + knownSones = Filters.filteredList(knownSones, Sone.LOCAL_SONE_FILTER); + } else if ("not-own".equals(filter)) { + knownSones = Filters.filteredList(knownSones, Filters.reverseFilter(Sone.LOCAL_SONE_FILTER)); } if ("activity".equals(sortField)) { if ("asc".equals(sortOrder)) { diff --git a/src/main/resources/i18n/sone.de.properties b/src/main/resources/i18n/sone.de.properties index e253ad5..d0ec575 100644 --- a/src/main/resources/i18n/sone.de.properties +++ b/src/main/resources/i18n/sone.de.properties @@ -117,6 +117,8 @@ Page.KnownSones.Filter.Followed=Nur gefolgte Sones anzeigen Page.KnownSones.Filter.NotFollowed=Gefolgte Sones nicht anzeigen Page.KnownSones.Filter.New=Nur neue Sones anzeigen Page.KnownSones.Filter.NotNew=Neue Sones nicht anzeigen +Page.KnownSones.Filter.Own=Nur eigene Sones anzeigen +Page.KnownSones.Filter.NotOwn=Nur fremde Sones anzeigen Page.KnownSones.Button.Apply=Anwenden Page.KnownSones.Button.FollowAllSones=Allen Sones auf dieser Seite folgen Page.KnownSones.Button.UnfollowAllSones=Alle Sones auf dieser Seite entfolgen diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 5c4367a..6bab23e 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -117,6 +117,8 @@ Page.KnownSones.Filter.Followed=Show only followed Sones Page.KnownSones.Filter.NotFollowed=Hide followed Sones Page.KnownSones.Filter.New=Show only new Sones Page.KnownSones.Filter.NotNew=Hide new Sones +Page.KnownSones.Filter.Own=Show only local Sones +Page.KnownSones.Filter.NotOwn=Show only remote Sones Page.KnownSones.Button.Apply=Apply Page.KnownSones.Button.FollowAllSones=Follow all Sones on this page Page.KnownSones.Button.UnfollowAllSones=Unfollow all Sones on this page diff --git a/src/main/resources/i18n/sone.fr.properties b/src/main/resources/i18n/sone.fr.properties index 12a44d4..2d978fc 100644 --- a/src/main/resources/i18n/sone.fr.properties +++ b/src/main/resources/i18n/sone.fr.properties @@ -117,6 +117,8 @@ Page.KnownSones.Filter.Followed=Montrer seulement les Sones suivis Page.KnownSones.Filter.NotFollowed=Cacher les Sones suivis Page.KnownSones.Filter.New=Montrer seulement les nouveaux Sones Page.KnownSones.Filter.NotNew=Cacher les nouveaux Sones +Page.KnownSones.Filter.Own=Show only local Sones +Page.KnownSones.Filter.NotOwn=Show only remote Sones Page.KnownSones.Button.Apply=Appliquer Page.KnownSones.Button.FollowAllSones=Suivre tous les Sones de cette page Page.KnownSones.Button.UnfollowAllSones=Ne plus suivre tous les Sones de cette page @@ -450,3 +452,4 @@ Notification.ImageInsertFailed.Text=Les images suivantes ne peuvent être insér Notification.Mention.ShortText=Vous avez été mentionné. Notification.Mention.Text=Vous avez été mentionné dans les messages suivants: Notification.SoneInsert.Duration={0,number} {0,choice,0#seconds|1#second|1 + + <%/if> -- 2.7.4