diff --git a/src/Vervis/Handler/Sharer.hs b/src/Vervis/Handler/Sharer.hs
index e014275..4515e20 100644
--- a/src/Vervis/Handler/Sharer.hs
+++ b/src/Vervis/Handler/Sharer.hs
@@ -32,12 +32,18 @@ import Yesod.Persist.Core (runDB, getBy404)
import Vervis.Foundation
import Vervis.Model
import Vervis.Model.Ident (ShrIdent, shr2text)
+import Vervis.Paginate
import Vervis.Settings (widgetFile)
import Vervis.Widget.Sharer (sharerLinkW)
getSharersR :: Handler Html
getSharersR = do
- sharers <- runDB $ selectList [] [Asc SharerIdent]
+ (sharers, navModel) <- getPageAndNav $ \ off lim ->
+ runDB $ do
+ total <- count ([] :: [Filter Sharer])
+ ss <- selectList [] [OffsetBy off, LimitTo lim, Asc SharerIdent]
+ return (total, ss)
+ let pageNav = navWidget navModel
defaultLayout $(widgetFile "sharer/list")
getSharerR :: ShrIdent -> Handler Html
diff --git a/templates/sharer/list.hamlet b/templates/sharer/list.hamlet
index 2d3828b..83a5d78 100644
--- a/templates/sharer/list.hamlet
+++ b/templates/sharer/list.hamlet
@@ -15,7 +15,11 @@ $#
These are the people and groups registered in this Vervis instance. +^{pageNav} +