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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
ba5cceb9
Commit
ba5cceb9
authored
Oct 10, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Node Document view.
parent
1403e8a0
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
328 additions
and
35 deletions
+328
-35
Node.purs
src/Gargantext/Components/Node.purs
+41
-0
Config.purs
src/Gargantext/Config.purs
+4
-4
Corpus.purs
src/Gargantext/Pages/Corpus.purs
+0
-1
Document.purs
src/Gargantext/Pages/Corpus/Document.purs
+275
-22
Documents.purs
src/Gargantext/Pages/Corpus/Tabs/Documents.purs
+1
-1
Layout.purs
src/Gargantext/Pages/Layout.purs
+7
-7
No files found.
src/Gargantext/Components/Node.purs
0 → 100644
View file @
ba5cceb9
module Gargantext.Components.Node
where
import Gargantext.Prelude
import Data.Argonaut (class DecodeJson, decodeJson, (.?))
newtype NodePoly a =
NodePoly { id :: Int
, typename :: Int
, userId :: Int
, parentId :: Int
, name :: String
, date :: String
, hyperdata :: a
}
instance decodeNodePoly :: (DecodeJson a)
=> DecodeJson (NodePoly a) where
decodeJson json = do
obj <- decodeJson json
id <- obj .? "id"
typename <- obj .? "typename"
userId <- obj .? "userId"
parentId <- obj .? "parentId"
name <- obj .? "name"
date <- obj .? "date"
hyperdata <- obj .? "hyperdata"
hyperdata' <- decodeJson hyperdata
pure $ NodePoly { id : id
, typename : typename
, userId : userId
, parentId : parentId
, name : name
, date : date
, hyperdata: hyperdata'
}
src/Gargantext/Config.purs
View file @
ba5cceb9
...
...
@@ -114,7 +114,7 @@ data NodeType = NodeUser
| Corpus
| CorpusV3
| Dashboard
| Document
|
Url_
Document
| Error
| Folder
| Graph
...
...
@@ -136,7 +136,7 @@ urlConfig Children = show Children
urlConfig Corpus = show Corpus
urlConfig CorpusV3 = show CorpusV3
urlConfig Dashboard = show Dashboard
urlConfig
Document = show
Document
urlConfig
Url_Document = show Url_
Document
urlConfig Error = show Error
urlConfig Folder = show Folder
urlConfig Graph = show Graph
...
...
@@ -151,7 +151,7 @@ instance showNodeType :: Show NodeType where
show Corpus = "corpus"
show CorpusV3 = "corpus"
show Dashboard = "dashboard"
show Document = "document"
show
Url_
Document = "document"
show Error = "ErrorNodeType"
show Folder = "folder"
show Graph = "graph"
...
...
@@ -166,7 +166,7 @@ readNodeType :: String -> NodeType
readNodeType "Annuaire" = Annuaire
readNodeType "Children" = Children
readNodeType "Dashboard" = Dashboard
readNodeType "Document" = Document
readNodeType "Document" =
Url_
Document
readNodeType "Folder" = Folder
readNodeType "Graph" = Graph
readNodeType "Individu" = Individu
...
...
src/Gargantext/Pages/Corpus.purs
View file @
ba5cceb9
...
...
@@ -215,4 +215,3 @@ sourcePageSpec = focus _sourcelens _sourceAction S.sourcespec'
termsPageSpec :: Spec State {} Action
termsPageSpec = focus _termslens _termsAction T.termSpec'
src/Gargantext/Pages/Corpus/Document.purs
View file @
ba5cceb9
This diff is collapsed.
Click to expand it.
src/Gargantext/Pages/Corpus/Tabs/Documents.purs
View file @
ba5cceb9
...
...
@@ -266,7 +266,7 @@ showRow {row : (DocumentsView c), delete} =
[ td [] [div [className $ fa <> "fa-star"][]]
-- TODO show date: Year-Month-Day only
, td [] [text c.date]
, td [] [ a [ href (toUrl Front Document c._id) ] [ text c.title ] ]
, td [] [ a [ href (toUrl Front
Url_
Document c._id) ] [ text c.title ] ]
, td [] [text c.source]
, td [] [input [ _type "checkbox"]]
]
...
...
src/Gargantext/Pages/Layout.purs
View file @
ba5cceb9
...
...
@@ -5,9 +5,9 @@ import Prelude hiding (div)
import Gargantext.Pages.Layout.Actions (Action(..))
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
-- import Gargantext.Pages.Corpus.Tabs as TV
-- import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Document as Document
import Gargantext.Pages.Corpus.Tabs.Documents as D
import Gargantext.Pages.Corpus.Graph as GE
-- import Gargantext.Pages.Corpus.Tabs.Terms.NgramsTable as NG
...
...
@@ -57,9 +57,9 @@ dispatchAction dispatcher _ (Annuaire id) = do
dispatchAction dispatcher _ (Folder id) = do
dispatcher $ SetRoute $ Folder id
dispatchAction dispatcher _ (Document
i
) = do
dispatcher $ SetRoute $ Document
i
-- dispatcher $ DocumentViewA TODO
dispatchAction dispatcher _ (Document
n
) = do
dispatcher $ SetRoute $ Document
n
dispatcher $ DocumentViewA $ Document.Load n
dispatchAction dispatcher _ PGraphExplorer = do
dispatcher $ SetRoute PGraphExplorer
...
...
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