mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-30 03:55:07 +00:00
Remove attachment tab menu
This commit is contained in:
parent
e831d7bdd7
commit
284c42aec6
@ -317,90 +317,6 @@ renderAttachmentsTabMenu model =
|
||||
Comp.ItemDetail.AttachmentTabMenu.view model
|
||||
|
||||
|
||||
renderAttachmentsTabMenuOld : Model -> Html Msg
|
||||
renderAttachmentsTabMenuOld model =
|
||||
let
|
||||
mailTab =
|
||||
if Comp.SentMails.isEmpty model.sentMails then
|
||||
[]
|
||||
|
||||
else
|
||||
[ div
|
||||
[ classList
|
||||
[ ( "right item", True )
|
||||
, ( "active", model.sentMailsOpen )
|
||||
]
|
||||
, onClick ToggleSentMails
|
||||
]
|
||||
[ text "E-Mails"
|
||||
]
|
||||
]
|
||||
|
||||
highlight el =
|
||||
let
|
||||
dropId =
|
||||
DD.getDropId model.attachDD
|
||||
|
||||
dragId =
|
||||
DD.getDragId model.attachDD
|
||||
|
||||
enable =
|
||||
Just el.id == dropId && dropId /= dragId
|
||||
in
|
||||
[ ( "current-drop-target", enable )
|
||||
]
|
||||
in
|
||||
div [ class "ui top attached tabular menu" ]
|
||||
(List.indexedMap
|
||||
(\pos ->
|
||||
\el ->
|
||||
if attachmentVisible model pos then
|
||||
a
|
||||
([ classList <|
|
||||
[ ( "active item", True )
|
||||
]
|
||||
++ highlight el
|
||||
, title (Maybe.withDefault "No Name" el.name)
|
||||
, href ""
|
||||
]
|
||||
++ DD.draggable AttachDDMsg el.id
|
||||
++ DD.droppable AttachDDMsg el.id
|
||||
)
|
||||
[ Maybe.map (Util.String.ellipsis 30) el.name
|
||||
|> Maybe.withDefault "No Name"
|
||||
|> text
|
||||
, a
|
||||
[ class "right-tab-icon-link"
|
||||
, href "#"
|
||||
, onClick (EditAttachNameStart el.id)
|
||||
]
|
||||
[ i [ class "grey edit link icon" ] []
|
||||
]
|
||||
]
|
||||
|
||||
else
|
||||
a
|
||||
([ classList <|
|
||||
[ ( "item", True )
|
||||
]
|
||||
++ highlight el
|
||||
, title (Maybe.withDefault "No Name" el.name)
|
||||
, href ""
|
||||
, onClick (SetActiveAttachment pos)
|
||||
]
|
||||
++ DD.draggable AttachDDMsg el.id
|
||||
++ DD.droppable AttachDDMsg el.id
|
||||
)
|
||||
[ Maybe.map (Util.String.ellipsis 20) el.name
|
||||
|> Maybe.withDefault "No Name"
|
||||
|> text
|
||||
]
|
||||
)
|
||||
model.item.attachments
|
||||
++ mailTab
|
||||
)
|
||||
|
||||
|
||||
renderAttachmentView : UiSettings -> Model -> Int -> Attachment -> Html Msg
|
||||
renderAttachmentView settings model pos attach =
|
||||
let
|
||||
|
Loading…
x
Reference in New Issue
Block a user