diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index 5f3d14f69..3cc5ebe03 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -282,9 +282,9 @@ getCShowR tid ssh csh = do lecturers <- lift . E.select $ E.from $ \(lecturer `E.InnerJoin` user) -> do E.on $ lecturer E.^. LecturerUser E.==. user E.^. UserId E.where_ $ lecturer E.^. LecturerCourse E.==. E.val cid - return $ (user E.^. UserDisplayName, user E.^. UserSurname, user E.^. UserEmail) + return (user E.^. UserDisplayName, user E.^. UserSurname, user E.^. UserEmail) return (course,schoolName,participants,registration,lecturers) - + mRegFrom <- traverse (formatTime SelFormatDateTime) $ courseRegisterFrom course mRegTo <- traverse (formatTime SelFormatDateTime) $ courseRegisterTo course mDereg <- traverse (formatTime SelFormatDateTime) $ courseDeregisterUntil course diff --git a/src/Handler/Utils.hs b/src/Handler/Utils.hs index 8face7168..5e0a8418c 100644 --- a/src/Handler/Utils.hs +++ b/src/Handler/Utils.hs @@ -48,7 +48,7 @@ nameWidget :: Text -> Text -> Widget nameWidget displayName surname = toWidget $ nameHtml displayName surname -- | toWidget-Version of @nameEmailHtml@, for convenience -nameEmailWidget :: (CI Text) -> Text -> Text -> Widget +nameEmailWidget :: CI Text -> Text -> Text -> Widget nameEmailWidget email displayName surname = toWidget $ nameEmailHtml email displayName surname -- | Show user's displayName, highlighting the surname if possible. @@ -72,18 +72,18 @@ nameHtml displayName surname -- | Like nameHtml just show a users displayname with hightlighted surname, -- but also wrap the name with a mailto-link -nameEmailHtml :: (CI Text) -> Text -> Text -> Html +nameEmailHtml :: CI Text -> Text -> Text -> Html nameEmailHtml email displayName surname = wrapMailto email $ nameHtml displayName surname -- | Wrap mailto around given Html using single hamlet-file for consistency -wrapMailto :: (CI Text) -> Html -> Html +wrapMailto :: CI Text -> Html -> Html wrapMailto (original -> email) linkText | null email = linkText | otherwise = $(shamletFile "templates/widgets/link-email.hamlet") -- | Just show an email address in a standard way, for convenience inside hamlet files. -mailtoHtml :: (CI Text) -> Html +mailtoHtml :: CI Text -> Html mailtoHtml email = wrapMailto email $ toHtml email warnTermDays :: TermId -> [Maybe UTCTime] -> DB ()