PageAction: newSubmission working

This commit is contained in:
SJost 2018-04-26 09:59:47 +02:00
parent 56476ccb3e
commit 0e8ed257f8
3 changed files with 6 additions and 3 deletions

View File

@ -48,6 +48,9 @@ decCryptoIDs [ ''SubmissionId
newtype SubmissionMode = SubmissionMode (Maybe CryptoUUIDSubmission)
deriving (Show, Read, Eq)
newSubmission :: SubmissionMode
newSubmission = SubmissionMode Nothing
instance PathPiece SubmissionMode where
fromPathPiece "new" = Just $ SubmissionMode Nothing
fromPathPiece s = SubmissionMode . Just <$> fromPathPiece s

View File

@ -200,7 +200,7 @@ getSheetShowR tid csh shn = do
[ PageActionPrime $ MenuItem
{ menuItemLabel = "Abgabe"
, menuItemIcon = Nothing
, menuItemRoute = CSheetR tid csh SheetNewR
, menuItemRoute = CSheetR tid csh (SubmissionR shn newSubmission)
, menuItemAccessCallback' = return True
}
]

View File

@ -213,13 +213,13 @@ postSubmissionR tid csh shn (SubmissionMode mcid) = do
<hr>
<h2>
<a href=@{SubmissionDownloadArchiveR arCid}>Archiv
$forall (name,time) <- lastEdits
<div>last edited by #{name} at #{formatTimeGerWDT time}
$maybe cid <- mcid
<h3>Enthaltene Dateien:
$forall (Entity _ File{..}) <- oldfiles
<a href=@{SubmissionDownloadSingleR cid fileTitle}>
#{fileTitle}
$forall (name,time) <- lastEdits
<div>last edited by #{name} at #{formatTimeGerWDT time}
|]