{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} module View.User where import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as H import Data.Text.I18n import Data.String (fromString) -- imports from mateamt import qualified "mateamt" Types as MT -- internal imports import Types import View.Scaffold type UserPage = H.Html userPage :: L10n -> Locale -> [MT.UserSummary] -> UserPage userPage l10n locale uss = scaffold l10n locale (initPage { pageTitle = gettext "Matebeamter - User list" }) $ mapM_ (\(MT.UserSummary uid ident _) -> do H.a H.! H.href ("#" <> fromString (show uid)) $ H.toHtml ident ) uss