Commit 1029a019 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[padagraph] add padagraph Node type

parent 7b8056ee
......@@ -57,7 +57,7 @@ instance Show NodeAction where
show Share = "Share"
show Config = "Config"
show (Link _) = "Link to " -- <> show x
show (Add _) = "Add Child" -- foldl (\a b -> a <> show b) "Add " xs
show (Add _) = "Add Child" -- foldl (\a b -> a <> show b) "Add " xs
show (Merge _) = "Merge with subtree" -- <> show t
show (Publish _) = "Publish" -- <> show x
show AddingContact = "AddingContact"
......@@ -210,6 +210,7 @@ settingsBox Graph =
, Download -- TODO as GEXF or JSON
-- , Publish publishParams
, Delete
, Add [ NodePadagraph ]
]
}
......@@ -370,6 +371,12 @@ settingsBox NodeFile =
, Delete ]
}
settingsBox NodePadagraph =
SettingsBox { show: true
, edit: true
, doc: Documentation NodePadagraph
, buttons: [ Delete ]}
settingsBox _ =
SettingsBox { show : false
......
......@@ -159,6 +159,7 @@ data NodeType = Annuaire
| NodeFrameWrite
| NodeFrameVisio
| NodePublic NodeType
| NodePadagraph
derive instance Generic NodeType _
derive instance Eq NodeType
instance JSON.ReadForeign NodeType where
......@@ -198,6 +199,7 @@ instance Show NodeType where
show NodeFrameVisio = "NodeFrameVisio"
show (NodePublic nt) = "NodePublic" <> show nt
show NodeFile = "NodeFile"
show NodePadagraph = "NodePadagraph"
instance Read NodeType where
......@@ -223,9 +225,10 @@ instance Read NodeType where
read "Annuaire" = Just Annuaire
read "NodeFrameWrite" = Just NodeFrameWrite
read "NodeFrameCalc" = Just NodeFrameCalc
read "NodeFrameNotebook" = Just NodeFrameNotebook
read "NodeFrameNotebook" = Just NodeFrameNotebook
read "NodeFrameVisio" = Just NodeFrameVisio
read "NodeFile" = Just NodeFile
read "NodePadagraph" = Just NodePadagraph
-- TODO NodePublic read ?
read _ = Nothing
......@@ -265,6 +268,7 @@ translateFR = case _ of
NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio"
NodePublic n -> translateFR n
NodePadagraph -> "Padagraph"
translateEN :: NodeType -> String
translateEN = case _ of
......@@ -295,6 +299,7 @@ translateEN = case _ of
NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio"
NodePublic n -> translateEN n
NodePadagraph -> "Padagraph"
------------------------------------------------------
......@@ -350,6 +355,9 @@ getIcon NodeFrameVisio false = "video-camera"
getIcon (NodePublic nt) b = getIcon nt b
getIcon NodePadagraph true = "line-chart"
getIcon NodePadagraph false = "line-chart"
getIcon _ true = "folder-open"
getIcon _ false = "folder-o"
......@@ -406,6 +414,7 @@ nodeTypePath NodeFrameNotebook = "code"
nodeTypePath NodeFrameVisio = "visio"
nodeTypePath (NodePublic nt) = nodeTypePath nt
nodeTypePath NodeFile = "file"
nodeTypePath NodePadagraph = "padagraph"
------------------------------------------------------------
type CorpusId = Int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment