Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
0e052718
Commit
0e052718
authored
Feb 21, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] List import tree (TODO: use same existing tree but filtered)
parent
e56e5cce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+17
-7
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
0e052718
...
@@ -335,14 +335,16 @@ copyFromCorpusTreeViewCpt :: R.Component CorpusTreeProps
...
@@ -335,14 +335,16 @@ copyFromCorpusTreeViewCpt :: R.Component CorpusTreeProps
copyFromCorpusTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpusTreeViewCpt" cpt
copyFromCorpusTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpusTreeViewCpt" cpt
where
where
cpt p@{id, tree: NTree (LNode { id: sourceId, name, nodeType }) ary} _ = do
cpt p@{id, tree: NTree (LNode { id: sourceId, name, nodeType }) ary} _ = do
pure $ H.div { className: "node" } ([
pure $ {- H.div {} [ H.h5 { className: GT.fldr nodeType true} []
H.span { className: "name " <> clickable
, -} H.div { className: "node" } ([ H.span { className: "name " <> clickable
, on: { click: onClick }
, on: { click: onClick }
} [ H.text name ]
} [ H.text name ]
] <> children)
] <> children)
-- ]
where
where
children = map (\c -> copyFromCorpusTreeView (p { tree = c })) ary
children = map (\c -> copyFromCorpusTreeView (p { tree = c })) ary
validNodeType = (A.elem nodeType [GT.
Corpus, GT.
NodeList]) && (id /= sourceId)
validNodeType = (A.elem nodeType [GT.NodeList]) && (id /= sourceId)
clickable = if validNodeType then "clickable" else ""
clickable = if validNodeType then "clickable" else ""
onClick _ = case validNodeType of
onClick _ = case validNodeType of
false -> pure unit
false -> pure unit
...
@@ -356,4 +358,12 @@ loadCorporaTree session = getCorporaTree session treeId
...
@@ -356,4 +358,12 @@ loadCorporaTree session = getCorporaTree session treeId
Session { treeId } = session
Session { treeId } = session
getCorporaTree :: Session -> Int -> Aff FTree
getCorporaTree :: Session -> Int -> Aff FTree
getCorporaTree session treeId = get session $ GR.NodeAPI GT.Tree (Just treeId) "?type=NodeList&type=NodeCorpus"
getCorporaTree session treeId = get session $ GR.NodeAPI GT.Tree (Just treeId) nodeTypes
where
nodeTypes = A.foldl (\a b -> a <> "type=" <> show b <> "&") "?" [ GT.FolderPrivate
, GT.FolderShared
, GT.Team
, GT.FolderPublic
, GT.Folder
, GT.Corpus
, GT.NodeList]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment