diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index 68b1c9e81..06da292cd 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -36,7 +36,8 @@ RegisterTo: Anmeldungen bis DeRegUntil: Abmeldungen bis RegisterRetry: Sie wurden noch nicht angemeldet. Drücken Sie dazu den Knopf "Anmelden" -CourseRegistrationInterval: Anmeldezeitraum +CourseRegistrationInterval: Anmeldung +CourseDirectRegistrationInterval: Direkte Anmeldung CourseDeregisterUntil time@Text: Abmeldung nur bis #{time} GenericKey: Schlüssel diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index a4256ec92..4e474c6ac 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -90,11 +90,12 @@ getCShowR tid ssh csh = do return (cID, n, visible, files, lastEditText, mayEdit, mayDelete) return (cid,course,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news) - mDereg <- traverse (formatTime SelFormatDateTime) $ courseDeregisterUntil course + let mDereg' = maybe id min (allocationOverrideDeregister =<< mAllocation) <$> courseDeregisterUntil course + mDereg <- traverse (formatTime SelFormatDateTime) mDereg' cID <- encrypt cid :: Handler CryptoUUIDCourse - mAllocation' <- for mAllocation $ \Allocation{..} -> (,) - <$> pure allocationName + mAllocation' <- for mAllocation $ \alloc@Allocation{..} -> (,) + <$> pure alloc <*> toTextUrl (AllocationR allocationTerm allocationSchool allocationShorthand AShowR :#: cID) regForm <- if | is _Just mbAid -> do diff --git a/templates/course.hamlet b/templates/course.hamlet index 92cbb2064..d174fe99a 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -123,11 +123,22 @@ $# $if NTop (Just 0) < NTop (courseCapacity course) _{MsgCourseParticipantsCountOf participants capacity} $nothing _{MsgCourseParticipantsCount participants} - $maybe (name, url) <- mAllocation' + $maybe (Allocation{allocationName, allocationRegisterByCourse}, url) <- mAllocation'
+ ^{formatTimeRangeW SelFormatDateTime regFrom'' (courseRegisterTo course)} + $maybe dereg <- mDereg +
+ _{MsgCourseDeregisterUntil dereg} $nothing $maybe regFrom <- courseRegisterFrom course