Datumsformate hinzugefügt
This commit is contained in:
parent
84a5833c22
commit
787cf0d7cc
@ -111,6 +111,7 @@ validDateTimeFormats _ SelFormatDateTime = Set.fromList
|
||||
, DateTimeFormat "%A, %B %d %Y %T"
|
||||
, DateTimeFormat "%d.%m.%Y %R"
|
||||
, DateTimeFormat "%d.%m.%Y %T"
|
||||
, DateTimeFormat "%a %d.%m.%y %R"
|
||||
, DateTimeFormat "%R %d.%m.%Y"
|
||||
, DateTimeFormat "%T %d.%m.%Y"
|
||||
, DateTimeFormat "%Y-%m-%d %R"
|
||||
@ -122,8 +123,12 @@ validDateTimeFormats _ SelFormatDate = Set.fromList
|
||||
, DateTimeFormat "%a %b %d %Y"
|
||||
, DateTimeFormat "%A, %d %B %Y"
|
||||
, DateTimeFormat "%A, %B %d %Y"
|
||||
, DateTimeFormat "%d.%m.%y"
|
||||
, DateTimeFormat "%d.%m.%Y"
|
||||
, DateTimeFormat "%a %d.%m.%y"
|
||||
, DateTimeFormat "%a %d.%m.%Y"
|
||||
, DateTimeFormat "%Y-%m-%d"
|
||||
, DateTimeFormat "%y-%m-%d"
|
||||
]
|
||||
validDateTimeFormats TimeLocale{..} SelFormatTime = Set.fromList . concat . catMaybes $
|
||||
[ Just
|
||||
|
||||
@ -2,7 +2,7 @@ module Handler.Utils.Table.Cells where
|
||||
|
||||
import Import
|
||||
|
||||
-- import Data.CaseInsensitive (CI)
|
||||
import Data.CaseInsensitive (CI)
|
||||
-- import qualified Data.CaseInsensitive as CI
|
||||
|
||||
import Data.Monoid (Any(..))
|
||||
@ -58,6 +58,9 @@ timeCell t = cell $ formatTime SelFormatDateTime t >>= toWidget
|
||||
userCell :: IsDBTable m a => Text -> Text -> DBCell m a
|
||||
userCell displayName surname = cell $ nameWidget displayName surname
|
||||
|
||||
emailCell :: IsDBTable m a => CI Text -> DBCell m a
|
||||
emailCell userEmail = cell $(widgetFile "widgets/link-email")
|
||||
|
||||
cellHasUser :: (IsDBTable m c, HasUser a) => a -> DBCell m c
|
||||
cellHasUser = liftA2 userCell (view _userDisplayName) (view _userSurname)
|
||||
|
||||
@ -72,14 +75,12 @@ cellHasUserLink toLink user =
|
||||
nWdgt = nameWidget (userEntity ^. _entityVal . _userDisplayName) (userEntity ^. _entityVal . _userSurname)
|
||||
in anchorCellM (toLink <$> encrypt uid) nWdgt
|
||||
|
||||
cellHasMatrikelnummer :: (IsDBTable m a, HasUser c) => c -> DBCell m a
|
||||
cellHasMatrikelnummer :: (IsDBTable m a, HasUser u) => u -> DBCell m a
|
||||
cellHasMatrikelnummer = maybe mempty textCell . view _userMatrikelnummer
|
||||
|
||||
cellHasEMail :: (IsDBTable m a, HasUser c) => c -> DBCell m a
|
||||
--cellHasEMail = textCell . CI.original . view _userEmail
|
||||
cellHasEMail user =
|
||||
let userEmail = user ^. _userEmail
|
||||
in cell $(widgetFile "widgets/link-email")
|
||||
cellHasEMail :: (IsDBTable m a, HasUser u) => u -> DBCell m a
|
||||
cellHasEMail = emailCell . view _userEmail
|
||||
|
||||
|
||||
|
||||
-- Just for documentation purposes; inline this code instead:
|
||||
|
||||
Reference in New Issue
Block a user