^{btnWdgt}
+ |]
defaultLayout $ do
$(widgetFile "profileData")
$(widgetFile "dsgvDisclaimer")
diff --git a/src/Handler/Sheet.hs b/src/Handler/Sheet.hs
index dee3173b1..67d119c10 100644
--- a/src/Handler/Sheet.hs
+++ b/src/Handler/Sheet.hs
@@ -305,7 +305,7 @@ getSShowR tid ssh csh shn = do
return (hasHints, hasSolution)
cTime <- Just <$> liftIO getCurrentTime
visibleFrom <- traverse (formatTime SelFormatDateTime) $ sheetVisibleFrom sheet
- when (NTop (sheetVisibleFrom sheet) >= NTop cTime) $ addMessageI "warning" $
+ when (NTop (sheetVisibleFrom sheet) >= NTop cTime) $ addMessageI Warning $
maybe MsgSheetInvisible MsgSheetInvisibleUntil visibleFrom
defaultLayout $ do
setTitleI $ MsgSheetTitle tid ssh csh shn
@@ -444,21 +444,21 @@ handleSheetEdit tid ssh csh msId template dbAction = do
}
mbsid <- dbAction newSheet
case mbsid of
- Nothing -> False <$ addMessageI "error" (MsgSheetNameDup tid ssh csh sfName)
+ Nothing -> False <$ addMessageI Error (MsgSheetNameDup tid ssh csh sfName)
(Just sid) -> do -- save files in DB:
whenIsJust sfSheetF $ insertSheetFile' sid SheetExercise
whenIsJust sfHintF $ insertSheetFile' sid SheetHint
whenIsJust sfSolutionF $ insertSheetFile' sid SheetSolution
whenIsJust sfMarkingF $ insertSheetFile' sid SheetMarking
insert_ $ SheetEdit aid actTime sid
- addMessageI "info" $ MsgSheetEditOk tid ssh csh sfName
+ addMessageI Info $ MsgSheetEditOk tid ssh csh sfName
-- Sanity checks generating warnings only, but not errors!
warnTermDays tid [sfVisibleFrom, Just sfActiveFrom, Just sfActiveTo, sfHintFrom, sfSolutionFrom]
return True
when saveOkay $ redirect $ case msId of
Just _ -> CSheetR tid ssh csh sfName SShowR -- redirect must happen outside of runDB
Nothing -> CSheetR tid ssh csh sfName SCorrR
- (FormFailure msgs) -> forM_ msgs $ (addMessage "error") . toHtml
+ (FormFailure msgs) -> forM_ msgs $ (addMessage Error) . toHtml
_ -> runDB $ warnTermDays tid $ (join . (flip fmap template))
<$> [sfVisibleFrom, Just . sfActiveFrom, Just . sfActiveTo, sfHintFrom, sfSolutionFrom]
@@ -481,7 +481,7 @@ getSDelR tid ssh csh shn = do
(FormSuccess BtnDelete) -> do
runDB $ fetchSheetId tid ssh csh shn >>= deleteCascade
-- TODO: deleteCascade löscht aber nicht die hochgeladenen Dateien!!!
- addMessageI "info" $ MsgSheetDelOk tid ssh csh shn
+ addMessageI Info $ MsgSheetDelOk tid ssh csh shn
redirect $ CourseR tid ssh csh SheetListR
_other -> do
submissionno <- runDB $ do
@@ -572,7 +572,7 @@ correctorForm shid = do
(defaultLoads', currentLoads') <- lift . runDB $ (,) <$> defaultLoads shid <*> currentLoads
loads' <- fmap (Map.fromList [(uid, (CorrectorNormal, mempty)) | uid <- formCIDs] `Map.union`) $ if
| Map.null currentLoads'
- , null formCIDs -> defaultLoads' <$ when (not $ Map.null defaultLoads') (addMessageI "warning" MsgCorrectorsDefaulted)
+ , null formCIDs -> defaultLoads' <$ when (not $ Map.null defaultLoads') (addMessageI Warning MsgCorrectorsDefaulted)
| otherwise -> return $ Map.fromList (map (, (CorrectorNormal, mempty)) formCIDs) `Map.union` currentLoads'
deletions <- lift $ foldM (\dels uid -> maybe (Set.insert uid dels) (const dels) <$> guardNonDeleted uid) Set.empty (Map.keys loads')
@@ -608,11 +608,11 @@ correctorForm shid = do
FormSuccess (Just emails) -> fmap Map.unions . forM emails $ \email -> do
mUid <- fmap (fmap entityKey) . lift . runDB $ getBy (UniqueEmail email)
case mUid of
- Nothing -> loads'' <$ addMessageI "error" (MsgEMailUnknown email)
+ Nothing -> loads'' <$ addMessageI Error (MsgEMailUnknown email)
Just uid
| not (Map.member uid loads') -> return $ Map.insert uid (CorrectorNormal, mempty) loads''
- | otherwise -> loads'' <$ addMessageI "warning" (MsgCorrectorExists email)
- FormFailure errs -> loads'' <$ mapM_ (addMessage "error" . toHtml) errs
+ | otherwise -> loads'' <$ addMessageI Warning (MsgCorrectorExists email)
+ FormFailure errs -> loads'' <$ mapM_ (addMessage Error . toHtml) errs
_ -> return loads''
let deletions' = deletions `Set.difference` Map.keysSet loads
@@ -703,11 +703,11 @@ getSCorrR tid ssh csh shn = do
((res,formWidget), formEnctype) <- runFormPost . identForm FIDcorrectors . renderAForm FormStandard $ formToAForm (correctorForm shid) <* submitButton
case res of
- FormFailure errs -> mapM_ (addMessage "error" . toHtml) errs
+ FormFailure errs -> mapM_ (addMessage Error . toHtml) errs
FormSuccess res -> runDB $ do
deleteWhere [SheetCorrectorSheet ==. shid]
insertMany_ $ Set.toList res
- addMessageI "success" MsgCorrectorsUpdated
+ addMessageI Success MsgCorrectorsUpdated
FormMissing -> return ()
let
diff --git a/src/Handler/Submission.hs b/src/Handler/Submission.hs
index 44365751c..b64be4126 100644
--- a/src/Handler/Submission.hs
+++ b/src/Handler/Submission.hs
@@ -147,7 +147,7 @@ submissionHelper tid ssh csh shn (SubmissionMode mcid) = do
return (csheet, map E.unValue buddies, [])
(E.Value smid:_) -> do
cID <- encrypt smid
- addMessageI "info" $ MsgSubmissionAlreadyExists
+ addMessageI Info $ MsgSubmissionAlreadyExists
redirect $ CSubmissionR tid ssh csh shn cID SubShowR
(Just smid) -> do
void $ submissionMatchesSheet tid ssh csh shn (fromJust mcid)
@@ -237,10 +237,11 @@ submissionHelper tid ssh csh shn (SubmissionMode mcid) = do
(Nothing, Nothing) -- new submission, no file upload requested
-> insert Submission
{ submissionSheet = shid
- , submissionRatingPoints = Nothing
- , submissionRatingComment = Nothing
- , submissionRatingBy = Nothing
- , submissionRatingTime = Nothing
+ , submissionRatingPoints = Nothing
+ , submissionRatingComment = Nothing
+ , submissionRatingBy = Nothing
+ , submissionRatingAssigned = Nothing
+ , submissionRatingTime = Nothing
}
-- Determine members of pre-registered group
groupUids <- fmap (setFromList . map E.unValue) . E.select . E.from $ \(submissionGroupUser `E.InnerJoin` submissionGroup `E.InnerJoin` submissionGroupUser') -> do
@@ -258,7 +259,7 @@ submissionHelper tid ssh csh shn (SubmissionMode mcid) = do
return smid
cID <- encrypt smid
return $ Just cID
- (FormFailure msgs) -> Nothing <$ forM_ msgs (addMessage "warning" . toHtml)
+ (FormFailure msgs) -> Nothing <$ forM_ msgs (addMessage Warning . toHtml)
_other -> return Nothing
case mCID of
diff --git a/src/Handler/Term.hs b/src/Handler/Term.hs
index 4247d8a71..1720eec1f 100644
--- a/src/Handler/Term.hs
+++ b/src/Handler/Term.hs
@@ -167,12 +167,12 @@ termEditHandler term = do
-- VOR INTERNATIONALISIERUNG:
-- let tid = termToText $ termName res
-- let msg = "Semester " `T.append` tid `T.append` " erfolgreich editiert."
--- addMessage "success" [shamlet| #{msg} |]
+-- addMessage Success [shamlet| #{msg} |]
-- MIT INTERNATIONALISIERUNG:
- addMessageI "success" $ MsgTermEdited tid
+ addMessageI Success $ MsgTermEdited tid
redirect TermShowR
(FormMissing ) -> return ()
- (FormFailure _) -> addMessageI "warning" MsgInvalidInput
+ (FormFailure _) -> addMessageI Warning MsgInvalidInput
let actionUrl = TermEditR
defaultLayout $ do
setTitleI MsgTermEditHeading
diff --git a/src/Handler/Users.hs b/src/Handler/Users.hs
index 4d199720f..8208d1a1f 100644
--- a/src/Handler/Users.hs
+++ b/src/Handler/Users.hs
@@ -120,5 +120,5 @@ postAdminHijackUserR cID = do
get404 uid
setCredsRedirect $ Creds "dummy" (CI.original userIdent) []
| otherwise -> error "This should be impossible by definition of `hijackUserForm`"
- FormFailure errs -> toTypedContent <$> mapM_ (addMessage "error" . toHtml) errs
+ FormFailure errs -> toTypedContent <$> mapM_ (addMessage Error . toHtml) errs
FormMissing -> return $ toTypedContent ()
diff --git a/src/Handler/Utils.hs b/src/Handler/Utils.hs
index 1c02d4235..394359b27 100644
--- a/src/Handler/Utils.hs
+++ b/src/Handler/Utils.hs
@@ -68,7 +68,7 @@ warnTermDays tid times = do
outoftermdays = Set.filter (\d -> d < termStart || d > termEnd ) alldays
outoflecture = Set.filter (\d -> d < termLectureStart || d > termLectureEnd) alldays
`Set.difference` outoftermdays -- out of term implies out of lecture-time
- warnI msg d = formatTime SelFormatDate d >>= \dt -> addMessageI "warning" $ msg tid dt
+ warnI msg d = formatTime SelFormatDate d >>= \dt -> addMessageI Warning $ msg tid dt
forM_ warnholidays $ warnI MsgDayIsAHoliday
forM_ outoflecture $ warnI MsgDayIsOutOfLecture
forM_ outoftermdays $ warnI MsgDayIsOutOfTerm
diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs
index 82fae9300..6236c1194 100644
--- a/src/Handler/Utils/Form.hs
+++ b/src/Handler/Utils/Form.hs
@@ -218,26 +218,17 @@ termsActiveField :: Field Handler TermId
termsActiveField = selectField $ optionsPersistKey [TermActive ==. True] [Desc TermStart] termName
termsSetField :: [TermId] -> Field Handler TermId
--- termsSetField tids = selectField $ optionsPersistKey [TermId <-. tids] [Desc TermStart] termName
-termsSetField tids = selectFieldList [(unTermKey t, t)| t <- tids ]
+termsSetField tids = selectField $ optionsPersistKey [TermName <-. (unTermKey <$> tids)] [Desc TermStart] termName
+-- termsSetField tids = selectFieldList [(unTermKey t, t)| t <- tids ]
+termsActiveOrSetField :: [TermId] -> Field Handler TermId
+termsActiveOrSetField tids = selectField $ optionsPersistKey ([TermActive ==.True] ||. [TermName <-. terms]) [Desc TermStart] termName
+ where terms = map unTermKey tids
-- termActiveOld :: Field Handler TermIdentifier
-- termActiveOld = convertField unTermKey TermKey $ selectField $ optionsPersistKey [TermActive ==. True] [Desc TermStart] termName
termNewField :: Field Handler TermIdentifier
-termNewField = checkMMap checkTerm termToText textField
- where
- errTextParse :: Text
- errTextParse = "Semester: S oder W gefolgt von Jahreszahl"
-
- errTextFreigabe :: TermIdentifier -> Text
- errTextFreigabe ti = "Semester " `T.append` (termToText ti) `T.append` " wurde noch nicht freigegeben."
-
- checkTerm :: Text -> HandlerT UniWorX IO (Either Text TermIdentifier)
- checkTerm t = case termFromText t of
- Left _ -> return $ Left errTextParse
- res@(Right _) -> return res
-
+termNewField = checkMMap (return.termFromText) termToText textField
schoolField :: Field Handler SchoolId
schoolField = selectField $ optionsPersistKey [] [Asc SchoolName] schoolName
diff --git a/src/Handler/Utils/Submission.hs b/src/Handler/Utils/Submission.hs
index bd4f44daa..32b9e4d65 100644
--- a/src/Handler/Utils/Submission.hs
+++ b/src/Handler/Utils/Submission.hs
@@ -210,7 +210,10 @@ assignSubmissions sid restriction = do
$logDebugS "assignSubmissions" $ tshow smid <> " -> " <> tshow q <> " (tutorial)"
assignSubmission (countsToLoad' q) smid q
- forM_ (Map.toList subTutor) $ \(smid, tutid) -> update smid [SubmissionRatingBy =. Just tutid]
+ now <- liftIO getCurrentTime
+ forM_ (Map.toList subTutor) $
+ \(smid, tutid) -> update smid [ SubmissionRatingBy =. Just tutid
+ , SubmissionRatingAssigned =. Just now ]
let assignedSubmissions = Map.keysSet subTutor
unassigendSubmissions = Map.keysSet subTutor' \\ assignedSubmissions
@@ -325,7 +328,7 @@ extractRatingsMsg = do
ignored = Right `Set.map` ignored'
unless (null ignored) $ do
mr <- (toHtml . ) <$> getMessageRender
- addMessage "warning" =<< withUrlRenderer ($(ihamletFile "templates/messages/submissionFilesIgnored.hamlet") mr)
+ addMessage Warning =<< withUrlRenderer ($(ihamletFile "templates/messages/submissionFilesIgnored.hamlet") mr)
sinkSubmission :: UserId
-> Either SheetId SubmissionId
@@ -343,11 +346,13 @@ sinkSubmission userId mExists isUpdate = do
sId <- lift $ case mExists of
Left sheetId -> do
let
- submissionSheet = sheetId
- submissionRatingPoints = Nothing
- submissionRatingComment = Nothing
- submissionRatingBy = Nothing
- submissionRatingTime = Nothing
+ submissionSheet = sheetId
+ submissionRatingPoints = Nothing
+ submissionRatingComment = Nothing
+ submissionRatingBy = Nothing
+ submissionRatingAssigned = Nothing
+ submissionRatingTime = Nothing
+
sId <- insert Submission{..}
-- now <- liftIO getCurrentTime
-- insert $ SubmissionEdit userId now sId -- This is done automatically during 'sinkSubmission'' iff the given submission is nonempty
@@ -466,6 +471,7 @@ sinkSubmission userId mExists isUpdate = do
lift $ case isUpdate of
False -> insert_ $ SubmissionEdit userId now submissionId
True -> update submissionId [ SubmissionRatingBy =. Just userId, SubmissionRatingTime =. Just now ]
+ -- TODO: Should submissionRatingAssigned change here if userId changes?
tell $ mempty{ sinkSubmissionTouched = Any True }
finalize :: SubmissionSinkState -> YesodDB UniWorX ()
@@ -586,7 +592,7 @@ sinkMultiSubmission userId isUpdate = do
lift . feed sId $ Left f{ fileTitle = fileTitle' }
when (not $ null ignored) $ do
mr <- (toHtml .) <$> getMessageRender
- addMessage "warning" =<< withUrlRenderer ($(ihamletFile "templates/messages/submissionFilesIgnored.hamlet") mr)
+ addMessage Warning =<< withUrlRenderer ($(ihamletFile "templates/messages/submissionFilesIgnored.hamlet") mr)
fmap Map.keysSet . lift . sequence $ flip Map.mapWithKey sinks $ \sId sink -> do
cID <- encrypt sId
handle (throwM . SubmissionSinkException cID Nothing) $
diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs
index c779842d6..3e017472c 100644
--- a/src/Handler/Utils/Table/Pagination.hs
+++ b/src/Handler/Utils/Table/Pagination.hs
@@ -402,7 +402,7 @@ dbTable PSValidator{..} dbtable@(DBTable{ dbtIdent = (toPathPiece -> dbtIdent),
<* E.offset (psPage * psLimit)
<* Map.foldrWithKey (\key args expr -> E.where_ (filterColumn (dbtFilter ! key) args t) >> expr) (return ()) psFilter
- mapM_ (addMessageI "warning") errs
+ mapM_ (addMessageI Warning) errs
runDB $ do
rows' <- E.select $ (,) <$> pure (E.unsafeSqlValue "count(*) OVER ()" :: E.SqlExpr (E.Value Int64)) <*> sqlQuery'
diff --git a/src/Handler/Utils/Templates.hs b/src/Handler/Utils/Templates.hs
index e29d9e3f9..810ea8472 100644
--- a/src/Handler/Utils/Templates.hs
+++ b/src/Handler/Utils/Templates.hs
@@ -16,6 +16,15 @@ modalStatic modalContent = do
$(widgetFile "widgets/modalStatic")
[whamlet|
?|] -- SJ: confused why ## is needed here either?
+modalWidget :: Html -> WidgetT site IO () -> WidgetT site IO ()
+modalWidget modalTrigger modalContent = do
+ uniqueId <- newIdent
+ let modalTriggerId = cons '#' uniqueId -- SJ: I am confused why this is needed here?
+ modalId :: Int32
+ modalId = 13
+ $(widgetFile "widgets/modalWidget")
+ [whamlet|
#{modalTrigger}|] -- SJ: confused why ## is needed here either?
+
modal :: Text -> Maybe [Char] -> WidgetT site IO ()
modal modalTrigger (Just modalContent) = do -- WARNING: ModalContent should not have length 11. SJ: This is possibly bad. See Template!
let
diff --git a/src/Import/NoFoundation.hs b/src/Import/NoFoundation.hs
index 252e9f8ac..19d0bb34d 100644
--- a/src/Import/NoFoundation.hs
+++ b/src/Import/NoFoundation.hs
@@ -1,9 +1,10 @@
{-# LANGUAGE CPP #-}
module Import.NoFoundation
( module Import
+ , addMessage, addMessageI
) where
-import ClassyPrelude.Yesod as Import hiding (formatTime, derivePersistFieldJSON)
+import ClassyPrelude.Yesod as Import hiding (formatTime, derivePersistFieldJSON, addMessage, addMessageI)
import Model as Import
import Model.Types.JSON as Import
import Model.Migration as Import
diff --git a/src/Model/Types.hs b/src/Model/Types.hs
index 47efdc4bb..4f406a148 100644
--- a/src/Model/Types.hs
+++ b/src/Model/Types.hs
@@ -295,7 +295,7 @@ termFromText t
, Just (review shortened -> year) <- readMaybe ys
, Right season <- seasonFromChar s
= Right TermIdentifier{..}
- | otherwise = Left $ "Invalid TermIdentifier: “" <> t <> "”"
+ | otherwise = Left $ "Invalid TermIdentifier: “" <> t <> "”" -- TODO: Could be improved, I.e. say "W"/"S" from Number
termToRational :: TermIdentifier -> Rational
termToRational TermIdentifier{..} = fromInteger year + seasonOffset
@@ -370,11 +370,13 @@ deriveJSON defaultOptions
{ constructorTagModifier = fromJust . stripPrefix "Theme"
} ''Theme
+$( return [] ) -- forces order of splices, error otherwise, see https://ghc.haskell.org/trac/ghc/ticket/9813
+
instance Universe Theme where universe = universeDef
instance Finite Theme
instance PathPiece Theme where
- toPathPiece = $(nullaryToPathPiece ''Theme [Text.intercalate "-" . map Text.toLower . unsafeTail . splitCamel])
+ toPathPiece = $(nullaryToPathPiece ''Theme [Text.intercalate "-" . map Text.toLower . unsafeTail . splitCamel])
fromPathPiece = finiteFromPathPiece
$(deriveSimpleWith ''DisplayAble 'display (over Text.packed $ Text.intercalate " " . unsafeTail . splitCamel) ''Theme) -- describe theme to user
@@ -399,6 +401,8 @@ data SelDateTimeFormat = SelFormatDateTime | SelFormatDate | SelFormatTime
data CorrectorState = CorrectorNormal | CorrectorMissing | CorrectorExcused
deriving (Eq, Ord, Read, Show, Enum, Bounded)
+$( return [] ) -- forces order of splices, error otherwise, see https://ghc.haskell.org/trac/ghc/ticket/9813
+
deriveJSON defaultOptions
{ constructorTagModifier = fromJust . stripPrefix "Corrector"
} ''CorrectorState
diff --git a/src/Settings.hs b/src/Settings.hs
index 43a6834b2..4649c76f4 100644
--- a/src/Settings.hs
+++ b/src/Settings.hs
@@ -33,7 +33,7 @@ import qualified Data.Text.Encoding as Text
import qualified Ldap.Client as Ldap
-import Utils
+import Utils hiding (MessageClass(..))
import Control.Lens
import Data.Maybe (fromJust)
diff --git a/src/Utils.hs b/src/Utils.hs
index 50a95d4b1..08343ec80 100644
--- a/src/Utils.hs
+++ b/src/Utils.hs
@@ -25,6 +25,8 @@ import Utils.DB as Utils
import Utils.TH as Utils
import Utils.DateTime as Utils
import Utils.PathPiece as Utils
+import Utils.Message as Utils
+
import Text.Blaze (Markup, ToMarkup)
diff --git a/src/Utils/Message.hs b/src/Utils/Message.hs
new file mode 100644
index 000000000..438d21932
--- /dev/null
+++ b/src/Utils/Message.hs
@@ -0,0 +1,35 @@
+{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
+{-# LANGUAGE TemplateHaskell #-}
+
+
+module Utils.Message
+ ( MessageClass(..)
+ , addMessage, addMessageI
+ ) where
+
+
+import Data.Text as Text (toLower)
+import Data.Universe
+import Utils.PathPiece (finiteFromPathPiece, nullaryToPathPiece)
+
+import qualified ClassyPrelude.Yesod (addMessage, addMessageI)
+import ClassyPrelude.Yesod (PathPiece(..),MonadHandler,HandlerSite,RenderMessage,Html)
+
+
+data MessageClass = Error | Warning | Info | Success
+ deriving (Eq,Ord,Enum,Bounded,Show,Read)
+
+instance Universe MessageClass
+instance Finite MessageClass
+
+$( return [] ) -- forces order of splices, error otherwise, see https://ghc.haskell.org/trac/ghc/ticket/9813
+
+instance PathPiece MessageClass where
+ toPathPiece = $(nullaryToPathPiece ''MessageClass [Text.toLower])
+ fromPathPiece = finiteFromPathPiece
+
+addMessage :: MonadHandler m => MessageClass-> Html -> m ()
+addMessage mc = ClassyPrelude.Yesod.addMessage (toPathPiece mc)
+
+addMessageI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => MessageClass -> msg -> m ()
+addMessageI mc = ClassyPrelude.Yesod.addMessageI (toPathPiece mc)
diff --git a/src/index.md b/src/index.md
index eb0870ba4..a1c616b17 100644
--- a/src/index.md
+++ b/src/index.md
@@ -19,6 +19,9 @@ Utils.Form
Utils.PathPiece
: (Template-Haskell)-Hilfsfunktionen für Formulierung von PathPiece-Instanzen
+Utils.Message
+ : redefines addMessage, addMessageI, defines MessageClass
+
Utils.Lens
: Automatisch erzeugt Linsen für eigene und Yesod-Typen, `Control.Lens`-Export
diff --git a/templates/adminTest.hamlet b/templates/adminTest.hamlet
index 6afe2d43d..ea27a3906 100644
--- a/templates/adminTest.hamlet
+++ b/templates/adminTest.hamlet
@@ -34,7 +34,7 @@
Modals:
^{modal ".toggler1" Nothing}
- Klick mich für Ajax-Test
+ Klick mich für Ajax-Test
^{modal ".toggler2" (Just "Test Inhalt für Modal")}
Klick mich für Content-Test
diff --git a/templates/profileData.hamlet b/templates/profileData.hamlet
index afe2c4a6b..5b6726cf1 100644
--- a/templates/profileData.hamlet
+++ b/templates/profileData.hamlet
@@ -1,11 +1,4 @@
-
-
-
- TODO: Alle Benutzerbezogenen Daten sollen hier angezeigt
- und verlinkt werden
- (alle Abgaben, Klausurnoten, etc.)
-
$if hasRows
Eigene Kurse
@@ -58,8 +51,7 @@
.
- TODO: Knopf zum Löschen aller Daten erstellen
-
+ ^{modalWidget "Alle Benutzerbezogenen Daten löschen" delWdgt}
Hinweise:
diff --git a/templates/widgets/modalWidget.hamlet b/templates/widgets/modalWidget.hamlet
new file mode 100644
index 000000000..e80516d1f
--- /dev/null
+++ b/templates/widgets/modalWidget.hamlet
@@ -0,0 +1,2 @@
+
+ ^{modalContent}