Display item notes in card view if configured

The user can set a maximum length of the item notes to display in each
card. If set to 0, it is hidden.
This commit is contained in:
Eike Kettner
2020-08-04 23:34:08 +02:00
parent 09d74b7e80
commit 08f953dd52
9 changed files with 99 additions and 17 deletions

View File

@ -197,6 +197,22 @@ viewItem settings item =
)
]
]
, div
[ classList
[ ( "content", True )
, ( "invisible hidden"
, settings.itemSearchNoteLength
<= 0
|| Util.String.isNothingOrBlank item.notes
)
]
]
[ span [ class "small-info" ]
[ Maybe.withDefault "" item.notes
|> Util.String.ellipsis settings.itemSearchNoteLength
|> text
]
]
, div [ class "content" ]
[ div [ class "ui horizontal list" ]
[ div