mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-31 21:55:06 +00:00
Provide a download link to the original archive file
This commit is contained in:
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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user