Provide a download link to the original archive file

This commit is contained in:
Eike Kettner 2020-03-22 21:48:22 +01:00
parent 8ff83e4f06
commit 75ead33652

@ -1187,6 +1187,10 @@ renderAttachmentView model pos attach =
attachName =
Maybe.withDefault "No name" attach.name
hasArchive =
List.map .id model.item.archives
|> List.member attach.id
in
div
[ classList
@ -1204,6 +1208,17 @@ renderAttachmentView model pos attach =
]
, div [ class "right menu" ]
[ a
[ classList
[ ( "item", True )
, ( "invisible", not hasArchive )
]
, title "Download the original archive file."
, href (fileUrl ++ "/archive")
, target "_new"
]
[ i [ class "file archive outline icon" ] []
]
, a
[ classList
[ ( "item", True )
, ( "disabled", not attach.converted )