diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index 0b9380cee..cbfb14193 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -40,7 +40,14 @@ nullaryPathPiece ''CourseFavouriteToggleButton $ camelToPathPiece' 4 instance Button UniWorX CourseFavouriteToggleButton where btnLabel BtnCourseFavouriteToggleManual = toWidget iconCourseFavouriteManual btnLabel BtnCourseFavouriteToggleAutomatic = toWidget iconCourseFavouriteAutomatic - btnLabel BtnCourseFavouriteToggleOff = toWidget iconCourseFavouriteOff + btnLabel BtnCourseFavouriteToggleOff = [whamlet| + $newline never + + + ^{iconCourseFavouriteManual} + + ^{iconCourseFavouriteOff} + |] btnClasses _ = [BCIsButton] @@ -80,7 +87,6 @@ storedFavouriteReason tid ssh csh muid = fmap unValueFirst . E.select . E.from $ -- `over each E.unValue` doesn't work here, since E.unValue is monomorphised unValueFirst = fmap (over _1 E.unValue . over _2 E.unValue) . listToMaybe --- TODO add toggle Manual favorite Icon here getCShowR :: TermId -> SchoolId -> CourseShorthand -> Handler Html getCShowR tid ssh csh = do mbAid <- maybeAuthId @@ -318,6 +324,7 @@ getCShowR tid ssh csh = do mayCreateEvents <- hasWriteAccessTo $ CourseR tid ssh csh CEventsNewR mayEdit <- hasWriteAccessTo $ CourseR tid ssh csh CEditR + -- TODO use different style for button (neutral background?) let favouriteReason = case favouriteReason' of -- (reason, blacklist) (Just (_reason, True)) -> Nothing diff --git a/src/Utils/Icon.hs b/src/Utils/Icon.hs index 273c374d5..a8be79b11 100644 --- a/src/Utils/Icon.hs +++ b/src/Utils/Icon.hs @@ -112,9 +112,9 @@ iconText = \case IconInvisible -> "eye-slash" IconCourse -> "graduation-cap" -- TODO find better Icons: https://fontawesome.com/icons?d=gallery&p=2&s=solid - IconCourseFavouriteManual -> "battery-full" - IconCourseFavouriteAutomatic -> "battery-half" - IconCourseFavouriteOff -> "battery-slash" + IconCourseFavouriteManual -> "star" + IconCourseFavouriteAutomatic -> "star-half-alt" + IconCourseFavouriteOff -> "slash" IconEnrolTrue -> "user-plus" IconEnrolFalse -> "user-slash" IconPlanned -> "cog"