mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Link items it detail view
This commit is contained in:
@ -22,6 +22,7 @@ import Api.Model.CustomFieldValue exposing (CustomFieldValue)
|
||||
import Api.Model.ItemQuery as RQ
|
||||
import Data.Direction exposing (Direction)
|
||||
import Data.SearchMode exposing (SearchMode)
|
||||
import Util.String
|
||||
|
||||
|
||||
type TagMatch
|
||||
@ -58,6 +59,7 @@ type ItemQuery
|
||||
| Source AttrMatch String
|
||||
| Dir Direction
|
||||
| ItemIdIn (List String)
|
||||
| ItemIdMatch String
|
||||
| ItemName AttrMatch String
|
||||
| AllNames String
|
||||
| Contents String
|
||||
@ -207,6 +209,13 @@ render q =
|
||||
ItemIdIn ids ->
|
||||
"id~=" ++ String.join "," ids
|
||||
|
||||
ItemIdMatch id ->
|
||||
if String.length id == 47 then
|
||||
"id" ++ attrMatch Eq ++ id
|
||||
|
||||
else
|
||||
"id" ++ attrMatch Like ++ Util.String.appendIfAbsent "*" id
|
||||
|
||||
ItemName m str ->
|
||||
"name" ++ attrMatch m ++ quoteStr str
|
||||
|
||||
|
@ -13,6 +13,7 @@ module Data.ItemTemplate exposing
|
||||
, concat
|
||||
, concerning
|
||||
, corrOrg
|
||||
, corrOrgOrPerson
|
||||
, corrPerson
|
||||
, correspondent
|
||||
, dateLong
|
||||
@ -229,6 +230,11 @@ correspondent =
|
||||
combine ", " corrOrg corrPerson
|
||||
|
||||
|
||||
corrOrgOrPerson : ItemTemplate
|
||||
corrOrgOrPerson =
|
||||
firstNonEmpty [ corrOrg, corrPerson ]
|
||||
|
||||
|
||||
concPerson : ItemTemplate
|
||||
concPerson =
|
||||
from (.concPerson >> getName)
|
||||
|
Reference in New Issue
Block a user