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
0038b247
Commit
0038b247
authored
Sep 25, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Adding Annuaire and Folder components.
parent
5dbdd5f1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
24 deletions
+54
-24
Config.purs
src/Gargantext/Config.purs
+1
-5
Folder.purs
src/Gargantext/Folder.purs
+12
-0
Annuaire.purs
src/Gargantext/Pages/Corpus/Annuaire.purs
+13
-0
Types.purs
src/Gargantext/Pages/Corpus/User/Users/Types.purs
+10
-4
Folder.purs
src/Gargantext/Pages/Folder.purs
+0
-13
Layout.purs
src/Gargantext/Pages/Layout.purs
+6
-0
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+6
-2
Router.purs
src/Gargantext/Router.purs
+6
-0
No files found.
src/Gargantext/Config.purs
View file @
0038b247
...
...
@@ -111,7 +111,6 @@ data NodeType = NodeUser
| Folder
| Graph
| Individu
| Project
| Tree
| Error
data End = Back | Front
...
...
@@ -132,7 +131,6 @@ urlConfig Document = show Document
urlConfig Folder = show Folder
urlConfig Graph = show Graph
urlConfig Individu = show Individu
urlConfig Project = show Project
urlConfig Tree = show Tree
urlConfig Error = show Error
------------------------------------------------------------
...
...
@@ -145,7 +143,6 @@ instance showNodeType :: Show NodeType where
show Folder = "folder"
show Graph = "graph"
show Individu = "individu"
show Project = "project"
show Tree = "tree"
show Error = "ErrorNodeType"
...
...
@@ -157,11 +154,10 @@ readNodeType "NodeCorpus" = Corpus
readNodeType "Annuaire" = Annuaire
readNodeType "Dashboard" = Dashboard
readNodeType "Document" = Document
readNodeType "Folder" = Folder
readNodeType "Graph" = Graph
readNodeType "Individu" = Individu
readNodeType "Project" = Project
readNodeType "Tree" = Tree
readNodeType "Folder" = Folder
readNodeType _ = Error
------------------------------------------------------------
instance ordNodeType :: Ord NodeType where
...
...
src/Gargantext/Folder.purs
0 → 100644
View file @
0038b247
module Gargantext.Folder where
import Prelude
import React.DOM (div, h1, text)
import Thermite (Render, Spec, simpleSpec, defaultPerformAction)
render :: Render {} {} Void
render dispatch _ state _ = [h1 [] [text "Folder"]]
layoutFolder :: Spec {} {} Void
layoutFolder = simpleSpec defaultPerformAction render
src/Gargantext/Pages/Corpus/Annuaire.purs
0 → 100644
View file @
0038b247
module Gargantext.Pages.Corpus.Annuaire where
import Prelude
import React.DOM (div, h1, text)
import Thermite (Render, Spec, simpleSpec, defaultPerformAction)
render :: Render {} {} Void
render dispatch _ state _ = [h1 [] [text "Annuaire"]]
layoutAnnuaire :: Spec {} {} Void
layoutAnnuaire = simpleSpec defaultPerformAction render
src/Gargantext/Pages/Corpus/User/Users/Types.purs
View file @
0038b247
...
...
@@ -8,7 +8,7 @@ module Gargantext.Pages.Corpus.User.Users.Types
)
where
import Prelude
(($))
import Prelude
import Gargantext.Pages.Corpus.User.Users.Types.Lens
import Gargantext.Pages.Corpus.User.Users.Types.Types
...
...
@@ -16,15 +16,21 @@ import Gargantext.Pages.Corpus.User.Users.Types.States
import Gargantext.Pages.Corpus.User.Brevets as B
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Gargantext.Pages.Folder as PS
import Gargantext.Components.Tab (tabs)
import Thermite (
Spec, focus, noState
)
import Thermite (
Render, Spec, focus, noState, defaultPerformAction, simpleSpec
)
brevetSpec :: Spec State {} Action
brevetSpec = noState B.brevetsSpec
projets :: Spec {} {} Void
projets = simpleSpec defaultPerformAction render
where
render :: Render {} {} Void
render dispatch _ state _ =
[]
projectSpec :: Spec State {} Action
projectSpec = noState
PS.
projets
projectSpec = noState projets
facets :: Spec State {} Action
facets = tabs _tablens _tabAction $ fromFoldable
...
...
src/Gargantext/Pages/Folder.purs
deleted
100644 → 0
View file @
5dbdd5f1
module Gargantext.Pages.Folder where
import Prelude
import Thermite (Render, Spec, defaultPerformAction, simpleSpec)
projets :: Spec {} {} Void
projets = simpleSpec defaultPerformAction render
where
render :: Render {} {} Void
render dispatch _ state _ =
[]
src/Gargantext/Pages/Layout.purs
View file @
0038b247
...
...
@@ -47,6 +47,12 @@ dispatchAction dispatcher _ (UserPage id) = do
-- dispatcher $ UserPageA TODO
dispatcher $ UserPageA $ U.FetchUser id
dispatchAction dispatcher _ (Annuaire id) = do
dispatcher $ SetRoute $ Annuaire id
dispatchAction dispatcher _ (Folder id) = do
dispatcher $ SetRoute $ Folder id
dispatchAction dispatcher _ (DocAnnotation i) = do
dispatcher $ SetRoute $ DocAnnotation i
-- dispatcher $ DocAnnotationViewA TODO
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
0038b247
...
...
@@ -9,6 +9,8 @@ import Effect (Effect)
import Gargantext.Components.Data.Lang (Lang(..))
import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Corpus.Annuaire as A
import Gargantext.Folder as F
import Gargantext.Pages.Corpus as CA
import Gargantext.Pages.Corpus.Doc.Annotation as D
import Gargantext.Pages.Corpus.Doc.Facets as TV
...
...
@@ -65,6 +67,8 @@ pagesComponent s =
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec PGraphExplorer = focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec (Annuaire i) = layout0 $ noState A.layoutAnnuaire
selectSpec (Folder i) = layout0 $ noState F.layoutFolder
-- selectSpec _ = simpleSpec defaultPerformAction defaultRender
...
...
src/Gargantext/Router.purs
View file @
0038b247
...
...
@@ -26,6 +26,8 @@ data Routes
| PGraphExplorer
| NGramsTable
| Dashboard
| Annuaire Int
| Folder Int
instance showRoutes :: Show Routes where
...
...
@@ -40,6 +42,8 @@ instance showRoutes :: Show Routes where
show PGraphExplorer = "graphExplorer"
show NGramsTable = "NGramsTable"
show Dashboard = "Dashboard"
show (Annuaire i) = "Annuaire"
show (Folder i) = "Folder"
show Home = "Home"
int :: Match Int
...
...
@@ -58,6 +62,8 @@ routing =
<|> PGraphExplorer <$ route "graph"
<|> NGramsTable <$ route "ngrams"
<|> Dashboard <$ route "dashboard"
<|> Annuaire <$> (route "annuaire" *> int)
<|> Folder <$> (route "folder" *> int)
<|> Home <$ lit ""
where
route str = lit "" *> lit str
...
...
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