mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Allow to search in source names in webui
This commit is contained in:
@ -21,6 +21,7 @@ type Field
|
||||
| Direction
|
||||
| PreviewImage
|
||||
| CustomFields
|
||||
| SourceName
|
||||
|
||||
|
||||
all : List Field
|
||||
@ -37,6 +38,7 @@ all =
|
||||
, Direction
|
||||
, PreviewImage
|
||||
, CustomFields
|
||||
, SourceName
|
||||
]
|
||||
|
||||
|
||||
@ -81,6 +83,9 @@ fromString str =
|
||||
"customfields" ->
|
||||
Just CustomFields
|
||||
|
||||
"sourcename" ->
|
||||
Just SourceName
|
||||
|
||||
_ ->
|
||||
Nothing
|
||||
|
||||
@ -121,6 +126,9 @@ toString field =
|
||||
CustomFields ->
|
||||
"customfields"
|
||||
|
||||
SourceName ->
|
||||
"sourcename"
|
||||
|
||||
|
||||
label : Field -> String
|
||||
label field =
|
||||
@ -158,6 +166,9 @@ label field =
|
||||
CustomFields ->
|
||||
"Custom Fields"
|
||||
|
||||
SourceName ->
|
||||
"Item Source"
|
||||
|
||||
|
||||
fromList : List String -> List Field
|
||||
fromList strings =
|
||||
|
@ -29,6 +29,8 @@ module Data.Icons exposing
|
||||
, personIcon
|
||||
, search
|
||||
, searchIcon
|
||||
, source
|
||||
, sourceIcon
|
||||
, tag
|
||||
, tagIcon
|
||||
, tags
|
||||
@ -40,6 +42,16 @@ import Html exposing (Html, i)
|
||||
import Html.Attributes exposing (class)
|
||||
|
||||
|
||||
source : String
|
||||
source =
|
||||
"upload icon"
|
||||
|
||||
|
||||
sourceIcon : String -> Html msg
|
||||
sourceIcon classes =
|
||||
i [ class (source ++ " " ++ classes) ] []
|
||||
|
||||
|
||||
customFieldType : CustomFieldType -> String
|
||||
customFieldType ftype =
|
||||
case ftype of
|
||||
|
Reference in New Issue
Block a user