diff --git a/src/Model/Types.hs b/src/Model/Types.hs index 64be64f45..8a2b908d7 100644 --- a/src/Model/Types.hs +++ b/src/Model/Types.hs @@ -285,15 +285,12 @@ instance Default Theme where derivePersistField "Theme" -newtype ZIPArchiveName obj = ZIPArchiveName obj +newtype ZIPArchiveName obj = ZIPArchiveName { unZIPArchiveName :: obj } deriving (Show, Read, Eq) instance PathPiece obj => PathPiece (ZIPArchiveName obj) where - fromPathPiece (map CI.mk . unpack -> s) - | Just s' <- stripSuffix (map CI.mk ".zip") s = fromPathPiece . pack $ map CI.original s' - | otherwise = Nothing - - toPathPiece (ZIPArchiveName obj) = toPathPiece obj <> ".zip" + fromPathPiece = fmap ZIPArchiveName . fromPathPiece <=< (stripSuffix `on` CI.foldCase) ".zip" + toPathPiece = (<> ".zip") . toPathPiece . unZIPArchiveName newtype DateTimeFormat = DateTimeFormat { unDateTimeFormat :: String } deriving (Eq, Ord, Read, Show, ToJSON, FromJSON, PersistField, PersistFieldSql) diff --git a/templates/submission.hamlet b/templates/submission.hamlet index 5ebbf522a..1672ee052 100644 --- a/templates/submission.hamlet +++ b/templates/submission.hamlet @@ -1,7 +1,8 @@ $maybe cID <- mcid -
+

Archiv + (Original) $if not (null lastEdits)

_{MsgLastEdits}