Commit ecb9ea36 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[ERGO] adding new icons/fun, new ergonomy for Tree next

parent 91bfb1fc
...@@ -18,7 +18,7 @@ filterWithRights (show action if user can only) ...@@ -18,7 +18,7 @@ filterWithRights (show action if user can only)
------------------------------------------------------------------------ ------------------------------------------------------------------------
data NodeAction = Documentation NodeType data NodeAction = Documentation NodeType
| SearchBox | SearchBox
| Download | Upload | Refresh | Download | Upload | Refresh | Config
| Move | Clone | Delete | Move | Clone | Delete
| Share | Link NodeType | Share | Link NodeType
| Add (Array NodeType) | Add (Array NodeType)
...@@ -38,6 +38,7 @@ instance eqNodeAction :: Eq NodeAction where ...@@ -38,6 +38,7 @@ instance eqNodeAction :: Eq NodeAction where
eq (Link x) (Link y) = true && (x == y) eq (Link x) (Link y) = true && (x == y)
eq (Add x) (Add y) = true && (x == y) eq (Add x) (Add y) = true && (x == y)
eq CopyFromCorpus CopyFromCorpus = true eq CopyFromCorpus CopyFromCorpus = true
eq Config Config = true
eq _ _ = false eq _ _ = false
instance showNodeAction :: Show NodeAction where instance showNodeAction :: Show NodeAction where
...@@ -50,6 +51,7 @@ instance showNodeAction :: Show NodeAction where ...@@ -50,6 +51,7 @@ instance showNodeAction :: Show NodeAction where
show Clone = "Clone" show Clone = "Clone"
show Delete = "Delete" show Delete = "Delete"
show Share = "Share" show Share = "Share"
show Config = "Config"
show (Link x) = "Link to " <> show x show (Link x) = "Link to " <> show x
show (Add xs) = foldl (\a b -> a <> show b) "Add " xs show (Add xs) = foldl (\a b -> a <> show b) "Add " xs
show CopyFromCorpus = "Copy from corpus" show CopyFromCorpus = "Copy from corpus"
...@@ -64,6 +66,8 @@ glyphiconNodeAction Upload = "upload" ...@@ -64,6 +66,8 @@ glyphiconNodeAction Upload = "upload"
glyphiconNodeAction (Link _) = "transfer" glyphiconNodeAction (Link _) = "transfer"
glyphiconNodeAction Download = "download" glyphiconNodeAction Download = "download"
glyphiconNodeAction CopyFromCorpus = "random" glyphiconNodeAction CopyFromCorpus = "random"
glyphiconNodeAction Refresh = "refresh"
glyphiconNodeAction Config = "wrench"
glyphiconNodeAction _ = "" glyphiconNodeAction _ = ""
...@@ -161,7 +165,8 @@ settingsBox Texts = SettingsBox { ...@@ -161,7 +165,8 @@ settingsBox Texts = SettingsBox {
show: true show: true
, edit : false , edit : false
, doc : Documentation Texts , doc : Documentation Texts
, buttons : [ Upload , buttons : [ Refresh
, Upload
, Download , Download
-- , Delete -- , Delete
] ]
...@@ -171,7 +176,9 @@ settingsBox Graph = SettingsBox { ...@@ -171,7 +176,9 @@ settingsBox Graph = SettingsBox {
show: true show: true
, edit : false , edit : false
, doc : Documentation Graph , doc : Documentation Graph
, buttons : [ Download -- TODO as GEXF or JSON , buttons : [ Refresh
, Config
, Download -- TODO as GEXF or JSON
, Delete , Delete
] ]
} }
...@@ -180,7 +187,9 @@ settingsBox NodeList = SettingsBox { ...@@ -180,7 +187,9 @@ settingsBox NodeList = SettingsBox {
show: true show: true
, edit : false , edit : false
, doc : Documentation NodeList , doc : Documentation NodeList
, buttons : [ Upload , buttons : [ Refresh
, Config
, Upload
, CopyFromCorpus , CopyFromCorpus
, Download , Download
-- , Delete -- , Delete
......
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