From 5a49febf9c484bb0cf40007fee3197f206b5488e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 1 Oct 2019 18:13:33 +0200 Subject: [PATCH] feat(info-lecturer): add inline newU2W icons --- frontend/src/utils/tooltips/tooltips.scss | 12 ++++++++++-- messages/uniworx/de.msg | 1 + src/Handler/Info.hs | 6 ++++-- src/Utils/Icon.hs | 2 ++ templates/i18n/info-lecturer/de.hamlet | 4 ++-- templates/widgets/tooltip.hamlet | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/frontend/src/utils/tooltips/tooltips.scss b/frontend/src/utils/tooltips/tooltips.scss index b659b4d43..4ab2393cf 100644 --- a/frontend/src/utils/tooltips/tooltips.scss +++ b/frontend/src/utils/tooltips/tooltips.scss @@ -1,7 +1,6 @@ .tooltip { position: relative; display: inline-block; - height: 1.5rem; vertical-align: -0.375rem; &:hover .tooltip__content { @@ -12,7 +11,6 @@ .tooltip__handle { color: var(--color-light); height: 1.5rem; - width: 1.5rem; line-height: 1.5rem; font-size: 1.2rem; display: inline-block; @@ -56,6 +54,16 @@ } } +.tooltip.tooltip__inline { + vertical-align: middle; + + .tooltip__handle { + height: 1.0rem; + line-height: 1.0rem; + font-size: 1.0rem; + } +} + .tooltip__content { position: absolute; display: none; diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index 4f7d6683b..6d51e9334 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -1796,6 +1796,7 @@ ExamClosedSince time@Text: Klausur abgeschlossen seit #{time} LecturerInfoTooltipNew: Neues Feature LecturerInfoTooltipProblem: Feature mit bekannten Problemen LecturerInfoTooltipPlanned: Geplantes Feature +LecturerInfoTooltipNewU2W: Unterschied zu UniWorX BtnAcceptApplications: Bewerbungen akzeptieren BtnAcceptApplicationsTip: Mit dem untigen Knopf können Sie den Kurs (höchstens bis zur angegeben Maximalkapazität, falls eingestellt) mit Bewerbern auffüllen. Die Bewertungen der Bewerbungen werden dabei berücksichtigt (Unbewertet wird behandelt wie eine Note zwischen 2.3 und 2.7). Bewerber mit Veto oder 5.0 werden nicht angemeldet. diff --git a/src/Handler/Info.hs b/src/Handler/Info.hs index 6616c8ceb..8605722db 100644 --- a/src/Handler/Info.hs +++ b/src/Handler/Info.hs @@ -48,11 +48,13 @@ getInfoLecturerR = setTitleI MsgInfoLecturerTitle $(i18nWidgetFile "info-lecturer") where - tooltipNew, tooltipPlanned :: WidgetFor UniWorX () + tooltipNew, tooltipPlanned, tooltipNewU2W :: WidgetFor UniWorX () tooltipNew = toWidget [whamlet| _{MsgLecturerInfoTooltipNew} |] -- tooltipProblem = toWidget [whamlet| _{MsgLecturerInfoTooltipProblem} |] tooltipPlanned = toWidget [whamlet| _{MsgLecturerInfoTooltipPlanned} |] - newFeat, plannedFeat :: WidgetFor UniWorX () + tooltipNewU2W = toWidget [whamlet| _{MsgLecturerInfoTooltipNewU2W} |] + newFeat, plannedFeat, newU2WFeat :: WidgetFor UniWorX () newFeat = toWidget [whamlet| ^{iconTooltip tooltipNew (Just IconNew)} |] -- probFeat = toWidget [whamlet| ^{iconTooltip tooltipProblem (Just IconProblem)} |] plannedFeat = toWidget [whamlet| ^{iconTooltip tooltipPlanned (Just IconPlanned)} |] + newU2WFeat = toWidget [whamlet| ^{iconTooltip tooltipNewU2W (Just IconAnnounce)} |] diff --git a/src/Utils/Icon.hs b/src/Utils/Icon.hs index 7835ff83d..7f94f96d2 100644 --- a/src/Utils/Icon.hs +++ b/src/Utils/Icon.hs @@ -40,6 +40,7 @@ data Icon | IconEnrolTrue | IconEnrolFalse | IconPlanned + | IconAnnounce | IconExam | IconExamRegisterTrue | IconExamRegisterFalse @@ -77,6 +78,7 @@ iconText = \case IconEnrolTrue -> "user-plus" IconEnrolFalse -> "user-slash" IconPlanned -> "cog" + IconAnnounce -> "bullhorn" IconExam -> "poll-h" IconExamRegisterTrue -> "calendar-check" IconExamRegisterFalse -> "calendar-times" diff --git a/templates/i18n/info-lecturer/de.hamlet b/templates/i18n/info-lecturer/de.hamlet index 6a5d872bf..753b94b82 100644 --- a/templates/i18n/info-lecturer/de.hamlet +++ b/templates/i18n/info-lecturer/de.hamlet @@ -28,10 +28,10 @@ $newline text Die Kursbeschreibung kann in Html verfasst werden und sollte die Modulbeschreibung enthalten! -
^{newFeat} Unterstützung für verschiedene Institute +
Unterstützung für verschiedene Institute

- Uni2work unterstüzt die Verwaltung von mehreren Instituten, d.h. + ^{newU2WFeat} Uni2work unterstüzt die Verwaltung von mehreren Instituten, d.h. Kursnamen wie "[MATH]" für Kurse des mathematischen Instituts werden ab sofort nicht mehr benötigt. Stattdessen gibt es nun Instituts-Filter für Kurslisten.

diff --git a/templates/widgets/tooltip.hamlet b/templates/widgets/tooltip.hamlet index 7dedb05c2..fc92c5717 100644 --- a/templates/widgets/tooltip.hamlet +++ b/templates/widgets/tooltip.hamlet @@ -1,7 +1,7 @@ $newline never

-
+
^{tooltip}