From 2c4080d0e0d7f59829238830a5200116a9d884ec Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 27 Aug 2020 14:55:32 +0200 Subject: [PATCH] feat: generated columns tooltip --- messages/uniworx/de-de-formal.msg | 1 + messages/uniworx/en-eu.msg | 1 + src/Handler/Course/Application/List.hs | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index cc7329693..05a93d902 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -2026,6 +2026,7 @@ CsvColumnApplicationsRating: Bewertung der Bewerbung; "1.0", "1.3", "1.7", ..., CsvColumnApplicationsComment: Kommentar zur Bewerbung; je nach Kurs-Einstellungen entweder nur als Notiz für die Kursverwalter oder Feedback für den Bewerber ApplicationGeneratedColumns: Stammdaten +ApplicationGeneratedColumnsTip: Auf diese Daten haben die Bewerber keinen Einfluss ApplicationUserColumns: Bewerbung ApplicationRatingColumns: Bewertung diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index fb555bcb4..f44dc45fb 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -2025,6 +2025,7 @@ CsvColumnApplicationsRating: Application grading; Any number grade ("1.0", "1.3" CsvColumnApplicationsComment: Application comment; depending on course settings this might purely be a note for course administrators or be feedback for the applicant ApplicationGeneratedColumns: Master data +ApplicationGeneratedColumnsTip: Applicants cannot modify these data ApplicationUserColumns: Application ApplicationRatingColumns: Rating diff --git a/src/Handler/Course/Application/List.hs b/src/Handler/Course/Application/List.hs index 6ba8ebcc1..57ed2f2db 100644 --- a/src/Handler/Course/Application/List.hs +++ b/src/Handler/Course/Application/List.hs @@ -281,7 +281,7 @@ postCApplicationsR tid ssh csh = do dbtColonnade :: Cornice Sortable ('Cap 'Base) _ _ dbtColonnade = mconcat - [ cap (Sortable Nothing $ i18nCell MsgApplicationGeneratedColumns) $ mconcat + [ cap (Sortable Nothing generatedColumnsHeader) $ mconcat [ sortable (Just "participant") (i18nCell MsgCourseApplicationIsParticipant) $ bool mempty (cell $ toWidget iconOK) . view resultIsParticipant , emptyOpticColonnade (resultAllocation . _entityVal) $ \l -> anchorColonnade (views l allocationLink) $ colAllocationShorthand (l . _allocationShorthand) , anchorColonnadeM (views (resultCourseApplication . _entityKey) applicationLink) $ colApplicationId (resultCourseApplication . _entityKey) @@ -300,6 +300,7 @@ postCApplicationsR tid ssh csh = do , colApplicationRatingComment (resultCourseApplication . _entityVal . _courseApplicationRatingComment) ] ] + where generatedColumnsHeader = cell $ i18n MsgApplicationGeneratedColumns <> (messageTooltip =<< messageI Info MsgApplicationGeneratedColumnsTip) dbtSorting = mconcat [ singletonMap "participant" . SortColumn $ view queryIsParticipant