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