diff --git a/modules/restapi/src/main/resources/docspell-openapi.yml b/modules/restapi/src/main/resources/docspell-openapi.yml index 11d78d42..cc70f5f0 100644 --- a/modules/restapi/src/main/resources/docspell-openapi.yml +++ b/modules/restapi/src/main/resources/docspell-openapi.yml @@ -5079,7 +5079,6 @@ components: - state - date - source - - fileCount - tags properties: id: @@ -5113,9 +5112,6 @@ components: $ref: "#/components/schemas/IdName" folder: $ref: "#/components/schemas/IdName" - fileCount: - type: integer - format: int32 attachments: type: array items: diff --git a/modules/restserver/src/main/scala/docspell/restserver/conv/Conversions.scala b/modules/restserver/src/main/scala/docspell/restserver/conv/Conversions.scala index bdba7bf6..ece9ae45 100644 --- a/modules/restserver/src/main/scala/docspell/restserver/conv/Conversions.scala +++ b/modules/restserver/src/main/scala/docspell/restserver/conv/Conversions.scala @@ -213,7 +213,6 @@ trait Conversions { i.concPerson.map(mkIdName), i.concEquip.map(mkIdName), i.folder.map(mkIdName), - i.fileCount, Nil, //attachments Nil, //tags Nil, //customfields diff --git a/modules/webapp/src/main/elm/Comp/ItemCard.elm b/modules/webapp/src/main/elm/Comp/ItemCard.elm index 11213bf9..0de41d9e 100644 --- a/modules/webapp/src/main/elm/Comp/ItemCard.elm +++ b/modules/webapp/src/main/elm/Comp/ItemCard.elm @@ -473,12 +473,12 @@ previewMenu settings model item mainAttach = [ i [ class "eye icon" ] [] ] in - if pageCount == 0 || (item.fileCount == 1 && pageCount == 1) then + if pageCount == 0 || (List.length item.attachments == 1 && pageCount == 1) then div [ class "card-attachment-nav" ] [ gotoFileBtn ] - else if item.fileCount == 1 then + else if List.length item.attachments == 1 then div [ class "card-attachment-nav" ] [ div [ class "ui small top attached basic icon buttons" ] [ gotoFileBtn @@ -510,7 +510,7 @@ previewMenu settings model item mainAttach = |> String.fromInt |> text , text "/" - , text (String.fromInt item.fileCount) + , text (List.length item.attachments |> String.fromInt) , text ", " , text (String.fromInt pageCount) , text "p." diff --git a/modules/webapp/src/main/elm/Data/ItemTemplate.elm b/modules/webapp/src/main/elm/Data/ItemTemplate.elm index 957e9949..30fbf43d 100644 --- a/modules/webapp/src/main/elm/Data/ItemTemplate.elm +++ b/modules/webapp/src/main/elm/Data/ItemTemplate.elm @@ -224,7 +224,7 @@ concerning = fileCount : ItemTemplate fileCount = - ItemTemplate (.fileCount >> String.fromInt) + ItemTemplate (.attachments >> List.length >> String.fromInt)