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