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

[TREE] hard coded for the demo.

parent 9dd3448b
...@@ -48,22 +48,23 @@ toggleNode sid a = a ...@@ -48,22 +48,23 @@ toggleNode sid a = a
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Realistic Tree for the UI -- Realistic Tree for the UI
myCorpus :: Int -> String -> NTree (Tuple String String) corpus :: Int -> String -> NTree (Tuple String String)
myCorpus n name = NNode n false name corpus n name = NNode n false name
[ NLeaf (Tuple "Facets" "#/corpus") [ NLeaf (Tuple "Facets" "#/docView")
, NLeaf (Tuple "Graph" "#/docView")
, NLeaf (Tuple "Dashboard" "#/dashboard") , NLeaf (Tuple "Dashboard" "#/dashboard")
, NLeaf (Tuple "Graph" "#/graphExplorer")
]
annuaire :: Int -> String -> NTree (Tuple String String)
annuaire n name = NNode n false name
[ NLeaf (Tuple "Facets" "#/docView")
] ]
exampleTree :: NTree (Tuple String String) exampleTree :: NTree (Tuple String String)
exampleTree = exampleTree =
NNode 1 true "My gargantext" NNode 1 true "françois.pineau"
[ myCorpus 2 "My publications" [ annuaire 2 "Annuaire"
, myCorpus 3 "My community" , corpus 3 "IMT publications"
, NNode 4 false "My researchs" [ myCorpus 5 "Subject A"
, myCorpus 6 "Subject B"
, myCorpus 7 "Subject C"
]
] ]
------------------------------------------------------------------------ ------------------------------------------------------------------------
......
...@@ -153,7 +153,8 @@ performAction Initialize _ state = void do ...@@ -153,7 +153,8 @@ performAction Initialize _ state = void do
Right docs -> do Right docs -> do
modifyState $ _ { initialized = true modifyState $ _ { initialized = true
, ntreeView = if length d > 0 , ntreeView = if length d > 0
then fnTransform $ unsafePartial $ fromJust $ head d then NT.exampleTree
--then fnTransform $ unsafePartial $ fromJust $ head d
else NT.initialState else NT.initialState
, docViewState = docs , docViewState = docs
......
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