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 ...@@ -57,7 +57,7 @@ instance Show NodeAction where
show Share = "Share" show Share = "Share"
show Config = "Config" show Config = "Config"
show (Link _) = "Link to " -- <> show x 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 (Merge _) = "Merge with subtree" -- <> show t
show (Publish _) = "Publish" -- <> show x show (Publish _) = "Publish" -- <> show x
show AddingContact = "AddingContact" show AddingContact = "AddingContact"
...@@ -210,6 +210,7 @@ settingsBox Graph = ...@@ -210,6 +210,7 @@ settingsBox Graph =
, Download -- TODO as GEXF or JSON , Download -- TODO as GEXF or JSON
-- , Publish publishParams -- , Publish publishParams
, Delete , Delete
, Add [ NodePadagraph ]
] ]
} }
...@@ -370,6 +371,12 @@ settingsBox NodeFile = ...@@ -370,6 +371,12 @@ settingsBox NodeFile =
, Delete ] , Delete ]
} }
settingsBox NodePadagraph =
SettingsBox { show: true
, edit: true
, doc: Documentation NodePadagraph
, buttons: [ Delete ]}
settingsBox _ = settingsBox _ =
SettingsBox { show : false SettingsBox { show : false
......
...@@ -159,6 +159,7 @@ data NodeType = Annuaire ...@@ -159,6 +159,7 @@ data NodeType = Annuaire
| NodeFrameWrite | NodeFrameWrite
| NodeFrameVisio | NodeFrameVisio
| NodePublic NodeType | NodePublic NodeType
| NodePadagraph
derive instance Generic NodeType _ derive instance Generic NodeType _
derive instance Eq NodeType derive instance Eq NodeType
instance JSON.ReadForeign NodeType where instance JSON.ReadForeign NodeType where
...@@ -198,6 +199,7 @@ instance Show NodeType where ...@@ -198,6 +199,7 @@ instance Show NodeType where
show NodeFrameVisio = "NodeFrameVisio" show NodeFrameVisio = "NodeFrameVisio"
show (NodePublic nt) = "NodePublic" <> show nt show (NodePublic nt) = "NodePublic" <> show nt
show NodeFile = "NodeFile" show NodeFile = "NodeFile"
show NodePadagraph = "NodePadagraph"
instance Read NodeType where instance Read NodeType where
...@@ -223,9 +225,10 @@ instance Read NodeType where ...@@ -223,9 +225,10 @@ instance Read NodeType where
read "Annuaire" = Just Annuaire read "Annuaire" = Just Annuaire
read "NodeFrameWrite" = Just NodeFrameWrite read "NodeFrameWrite" = Just NodeFrameWrite
read "NodeFrameCalc" = Just NodeFrameCalc read "NodeFrameCalc" = Just NodeFrameCalc
read "NodeFrameNotebook" = Just NodeFrameNotebook read "NodeFrameNotebook" = Just NodeFrameNotebook
read "NodeFrameVisio" = Just NodeFrameVisio read "NodeFrameVisio" = Just NodeFrameVisio
read "NodeFile" = Just NodeFile read "NodeFile" = Just NodeFile
read "NodePadagraph" = Just NodePadagraph
-- TODO NodePublic read ? -- TODO NodePublic read ?
read _ = Nothing read _ = Nothing
...@@ -265,6 +268,7 @@ translateFR = case _ of ...@@ -265,6 +268,7 @@ translateFR = case _ of
NodeFrameWrite -> "Éditeur de texte" NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio" NodeFrameVisio -> "Visio"
NodePublic n -> translateFR n NodePublic n -> translateFR n
NodePadagraph -> "Padagraph"
translateEN :: NodeType -> String translateEN :: NodeType -> String
translateEN = case _ of translateEN = case _ of
...@@ -295,6 +299,7 @@ translateEN = case _ of ...@@ -295,6 +299,7 @@ translateEN = case _ of
NodeFrameWrite -> "Write" NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio" NodeFrameVisio -> "Visio"
NodePublic n -> translateEN n NodePublic n -> translateEN n
NodePadagraph -> "Padagraph"
------------------------------------------------------ ------------------------------------------------------
...@@ -350,6 +355,9 @@ getIcon NodeFrameVisio false = "video-camera" ...@@ -350,6 +355,9 @@ getIcon NodeFrameVisio false = "video-camera"
getIcon (NodePublic nt) b = getIcon nt b getIcon (NodePublic nt) b = getIcon nt b
getIcon NodePadagraph true = "line-chart"
getIcon NodePadagraph false = "line-chart"
getIcon _ true = "folder-open" getIcon _ true = "folder-open"
getIcon _ false = "folder-o" getIcon _ false = "folder-o"
...@@ -406,6 +414,7 @@ nodeTypePath NodeFrameNotebook = "code" ...@@ -406,6 +414,7 @@ nodeTypePath NodeFrameNotebook = "code"
nodeTypePath NodeFrameVisio = "visio" nodeTypePath NodeFrameVisio = "visio"
nodeTypePath (NodePublic nt) = nodeTypePath nt nodeTypePath (NodePublic nt) = nodeTypePath nt
nodeTypePath NodeFile = "file" nodeTypePath NodeFile = "file"
nodeTypePath NodePadagraph = "padagraph"
------------------------------------------------------------ ------------------------------------------------------------
type CorpusId = Int 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