feat(schedule): enhance messages, restructure profile form
This commit is contained in:
parent
f5713fdb65
commit
4151f62fa5
@ -101,14 +101,13 @@ TermLectureEnd: Ende Vorlesungen
|
||||
TermLectureEndTooltip: Meistens dauer das Sommersemester 14 Wochen und das Wintersemester 15 Wochen.
|
||||
TermActive: Aktiv
|
||||
|
||||
|
||||
ScheduleTitle: Terminübersicht
|
||||
Schedule: Terminübersicht
|
||||
|
||||
ScheduleView: Ansicht
|
||||
ScheduleViewWeek: Woche
|
||||
|
||||
ProfileScheduleView: Standard-Ansicht der Terminübersicht
|
||||
ProfileScheduleViewTip: Betrifft Terminübersicht auf „Aktuelles“ und „Terminübersicht“ (weitere Ansichten in Arbeit)
|
||||
ProfileScheduleView: Standard-Ansicht
|
||||
ProfileScheduleViewTip: Betrifft die Terminübersicht auf „Aktuelles“ und „Terminübersicht“. (Weitere Ansichten sind in Arbeit.)
|
||||
|
||||
ScheduleOffsetWeekBackwardWeek: 1 Woche zurück
|
||||
ScheduleOffsetWeekBackwardDay: 1 Tag zurück
|
||||
|
||||
@ -102,14 +102,13 @@ TermLectureEnd: Lectures end
|
||||
TermLectureEndTooltip: Summer semesters are usually 14 weeks; winter semesters 15
|
||||
TermActive: Active
|
||||
|
||||
|
||||
ScheduleTitle: Schedule
|
||||
Schedule: Schedule
|
||||
|
||||
ScheduleView: View
|
||||
ScheduleViewWeek: Week
|
||||
|
||||
ProfileScheduleView: Standard schedule view
|
||||
ProfileScheduleViewTip: Relevant for schedule on "News" and "Schedule" (more views are in the works)
|
||||
ProfileScheduleView: Standard view
|
||||
ProfileScheduleViewTip: Relevant for the schedule on "News" and "Schedule". (More views are in the works.)
|
||||
|
||||
ScheduleOffsetWeekBackwardWeek: 1 week back
|
||||
ScheduleOffsetWeekBackwardDay: 1 day back
|
||||
|
||||
@ -37,13 +37,13 @@ import Utils.Schedule.Types.ScheduleView
|
||||
data SettingsForm = SettingsForm
|
||||
{ stgDisplayName :: UserDisplayName
|
||||
, stgDisplayEmail :: UserEmail
|
||||
, stgScheduleView :: ScheduleView
|
||||
, stgMaxFavourites :: Int
|
||||
, stgMaxFavouriteTerms :: Int
|
||||
, stgTheme :: Theme
|
||||
, stgDateTime :: DateTimeFormat
|
||||
, stgDate :: DateTimeFormat
|
||||
, stgTime :: DateTimeFormat
|
||||
, stgScheduleView :: ScheduleView
|
||||
, stgDownloadFiles :: Bool
|
||||
, stgWarningDays :: NominalDiffTime
|
||||
, stgShowSex :: Bool
|
||||
@ -101,6 +101,9 @@ makeSettingForm template html = do
|
||||
<$ aformSection MsgFormPersonalAppearance
|
||||
<*> areq (textField & cfStrip) (fslI MsgUserDisplayName & setTooltip MsgUserDisplayNameRulesBelow) (stgDisplayName <$> template)
|
||||
<*> areq (emailField & cfStrip & cfCI) (fslI MsgUserDisplayEmail & setTooltip MsgUserDisplayEmailTip) (stgDisplayEmail <$> template)
|
||||
<* aformSection MsgSchedule
|
||||
<*> areq (selectField . return $ mkOptionList (scheduleViewList mr))
|
||||
(fslI MsgProfileScheduleView & setTooltip MsgProfileScheduleViewTip) { fsId = Just "schedule-view-select" } (stgScheduleView <$> template)
|
||||
<* aformSection MsgFormCosmetics
|
||||
<*> areq (natFieldI MsgFavouritesNotNatural)
|
||||
(fslpI MsgFavourites (mr MsgFavouritesPlaceholder) & setTooltip MsgFavouritesTip) (stgMaxFavourites <$> template)
|
||||
@ -111,8 +114,6 @@ makeSettingForm template html = do
|
||||
<*> areq (selectField $ dateTimeFormatOptions SelFormatDateTime) (fslI MsgDateTimeFormat) (stgDateTime <$> template)
|
||||
<*> areq (selectField $ dateTimeFormatOptions SelFormatDate) (fslI MsgDateFormat) (stgDate <$> template)
|
||||
<*> areq (selectField $ dateTimeFormatOptions SelFormatTime) (fslI MsgTimeFormat) (stgTime <$> template)
|
||||
<*> areq (selectField . return $ mkOptionList (scheduleViewList mr))
|
||||
(fslI MsgProfileScheduleView & setTooltip MsgProfileScheduleViewTip) { fsId = Just "schedule-view-select" } (stgScheduleView <$> template)
|
||||
<* aformSection MsgFormBehaviour
|
||||
<*> apopt checkBoxField (fslI MsgDownloadFiles
|
||||
& setTooltip MsgDownloadFilesTip
|
||||
@ -359,13 +360,13 @@ postProfileR = do
|
||||
let settingsTemplate = Just SettingsForm
|
||||
{ stgDisplayName = userDisplayName
|
||||
, stgDisplayEmail = userDisplayEmail
|
||||
, stgScheduleView = userScheduleView
|
||||
, stgMaxFavourites = userMaxFavourites
|
||||
, stgMaxFavouriteTerms = userMaxFavouriteTerms
|
||||
, stgTheme = userTheme
|
||||
, stgDateTime = userDateTimeFormat
|
||||
, stgDate = userDateFormat
|
||||
, stgTime = userTimeFormat
|
||||
, stgScheduleView = userScheduleView
|
||||
, stgDownloadFiles = userDownloadFiles
|
||||
, stgSchools = userSchools
|
||||
, stgNotificationSettings = userNotificationSettings
|
||||
@ -379,13 +380,13 @@ postProfileR = do
|
||||
runDBJobs $ do
|
||||
update uid $
|
||||
[ UserDisplayName =. stgDisplayName
|
||||
, UserScheduleView =. stgScheduleView
|
||||
, UserMaxFavourites =. stgMaxFavourites
|
||||
, UserMaxFavouriteTerms =. stgMaxFavouriteTerms
|
||||
, UserTheme =. stgTheme
|
||||
, UserDateTimeFormat =. stgDateTime
|
||||
, UserDateFormat =. stgDate
|
||||
, UserTimeFormat =. stgTime
|
||||
, UserScheduleView =. stgScheduleView
|
||||
, UserDownloadFiles =. stgDownloadFiles
|
||||
, UserWarningDays =. stgWarningDays
|
||||
, UserNotificationSettings =. stgNotificationSettings
|
||||
|
||||
@ -2,5 +2,5 @@ $newline never
|
||||
<section>
|
||||
<h2>
|
||||
<a href=@{ScheduleR}>
|
||||
_{MsgScheduleTitle}
|
||||
_{MsgSchedule}
|
||||
^{schedule}
|
||||
|
||||
Reference in New Issue
Block a user