From: David ‘Bombe’ Roden Date: Wed, 16 Jan 2013 06:50:33 +0000 (+0100) Subject: Add filter for local/remote Sones to “Known Sones” page. X-Git-Tag: 0.8.5^2~3^2~133 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ff2bb9438e85e9f11d95b7f25ac61d12753369bc;p=Sone.git Add filter for local/remote Sones to “Known Sones” page. --- 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>