Click on tag in item detail to switch to search

This commit is contained in:
Eike Kettner
2020-11-14 13:16:35 +01:00
parent fe8c122968
commit b98edba9e5
5 changed files with 38 additions and 14 deletions

View File

@ -2,6 +2,7 @@ module Comp.ItemDetail.View exposing (view)
import Api
import Api.Model.Attachment exposing (Attachment)
import Api.Model.IdName exposing (IdName)
import Comp.AttachmentMeta
import Comp.DatePicker
import Comp.DetailEdit
@ -615,14 +616,12 @@ renderTags settings model =
[ div [ class "ui right aligned fluid container" ] <|
List.map
(\t ->
div
[ classList
[ ( "ui tag label", True )
, ( Data.UiSettings.tagColorString t settings, True )
]
]
[ text t.name
Comp.LinkTarget.makeTagLink
(IdName t.id t.name)
[ ( "ui tag label", True )
, ( Data.UiSettings.tagColorString t settings, True )
]
SetLinkTarget
)
model.item.tags
]