mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08:26 +00:00
Editable dashboard
This commit is contained in:
54
modules/webapp/src/main/elm/Messages/Data/BoxContent.elm
Normal file
54
modules/webapp/src/main/elm/Messages/Data/BoxContent.elm
Normal file
@ -0,0 +1,54 @@
|
||||
module Messages.Data.BoxContent exposing (Texts, de, gb)
|
||||
|
||||
import Data.BoxContent exposing (BoxContent(..))
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ forContent : BoxContent -> String
|
||||
, queryBox : String
|
||||
, statsBox : String
|
||||
, messageBox : String
|
||||
, uploadBox : String
|
||||
}
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
updateForContent
|
||||
{ forContent = \_ -> ""
|
||||
, queryBox = "Query box"
|
||||
, statsBox = "Statistics box"
|
||||
, messageBox = "Message box"
|
||||
, uploadBox = "Upload box"
|
||||
}
|
||||
|
||||
|
||||
de : Texts
|
||||
de =
|
||||
updateForContent
|
||||
{ forContent = \_ -> ""
|
||||
, queryBox = "Suchabfrage Kachel"
|
||||
, statsBox = "Statistik Kachel"
|
||||
, messageBox = "Mitteilung Kachel"
|
||||
, uploadBox = "Datei hochladen Kachel"
|
||||
}
|
||||
|
||||
|
||||
updateForContent : Texts -> Texts
|
||||
updateForContent init =
|
||||
{ init
|
||||
| forContent =
|
||||
\cnt ->
|
||||
case cnt of
|
||||
BoxMessage _ ->
|
||||
init.messageBox
|
||||
|
||||
BoxUpload _ ->
|
||||
init.uploadBox
|
||||
|
||||
BoxQuery _ ->
|
||||
init.queryBox
|
||||
|
||||
BoxStats _ ->
|
||||
init.statsBox
|
||||
}
|
115
modules/webapp/src/main/elm/Messages/Data/ItemColumn.elm
Normal file
115
modules/webapp/src/main/elm/Messages/Data/ItemColumn.elm
Normal file
@ -0,0 +1,115 @@
|
||||
module Messages.Data.ItemColumn exposing (Texts, de, gb)
|
||||
|
||||
import Data.ItemColumn exposing (ItemColumn(..))
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ header : ItemColumn -> String
|
||||
, label : ItemColumn -> String
|
||||
}
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
let
|
||||
headerName col =
|
||||
case col of
|
||||
Name ->
|
||||
"Name"
|
||||
|
||||
DateLong ->
|
||||
"Date"
|
||||
|
||||
DateShort ->
|
||||
"Date"
|
||||
|
||||
DueDateLong ->
|
||||
"Due date"
|
||||
|
||||
DueDateShort ->
|
||||
"Due date"
|
||||
|
||||
Folder ->
|
||||
"Folder"
|
||||
|
||||
Correspondent ->
|
||||
"Correspondent"
|
||||
|
||||
Concerning ->
|
||||
"Concerning"
|
||||
|
||||
Tags ->
|
||||
"Tags"
|
||||
in
|
||||
{ header = headerName
|
||||
, label =
|
||||
\col ->
|
||||
case col of
|
||||
DateShort ->
|
||||
headerName col ++ " (short)"
|
||||
|
||||
DateLong ->
|
||||
headerName col ++ " (long)"
|
||||
|
||||
DueDateShort ->
|
||||
headerName col ++ " (short)"
|
||||
|
||||
DueDateLong ->
|
||||
headerName col ++ " (long)"
|
||||
|
||||
_ ->
|
||||
headerName col
|
||||
}
|
||||
|
||||
|
||||
de : Texts
|
||||
de =
|
||||
let
|
||||
headerName col =
|
||||
case col of
|
||||
Name ->
|
||||
"Name"
|
||||
|
||||
DateLong ->
|
||||
"Datum"
|
||||
|
||||
DateShort ->
|
||||
"Datum"
|
||||
|
||||
DueDateLong ->
|
||||
"Fälligkeitsdatum"
|
||||
|
||||
DueDateShort ->
|
||||
"Fälligkeitsdatum"
|
||||
|
||||
Folder ->
|
||||
"Ordner"
|
||||
|
||||
Correspondent ->
|
||||
"Korrespondent"
|
||||
|
||||
Concerning ->
|
||||
"Betreffend"
|
||||
|
||||
Tags ->
|
||||
"Tags"
|
||||
in
|
||||
{ header = headerName
|
||||
, label =
|
||||
\col ->
|
||||
case col of
|
||||
DateShort ->
|
||||
headerName col ++ " (kurz)"
|
||||
|
||||
DateLong ->
|
||||
headerName col ++ " (lang)"
|
||||
|
||||
DueDateShort ->
|
||||
headerName col ++ " (kurz)"
|
||||
|
||||
DueDateLong ->
|
||||
headerName col ++ " (lang)"
|
||||
|
||||
_ ->
|
||||
headerName col
|
||||
}
|
Reference in New Issue
Block a user