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
Hide 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
...
@@ -111,7 +111,6 @@ data NodeType = NodeUser
| Folder
| Folder
| Graph
| Graph
| Individu
| Individu
| Project
| Tree
| Tree
| Error
| Error
data End = Back | Front
data End = Back | Front
...
@@ -132,7 +131,6 @@ urlConfig Document = show Document
...
@@ -132,7 +131,6 @@ urlConfig Document = show Document
urlConfig Folder = show Folder
urlConfig Folder = show Folder
urlConfig Graph = show Graph
urlConfig Graph = show Graph
urlConfig Individu = show Individu
urlConfig Individu = show Individu
urlConfig Project = show Project
urlConfig Tree = show Tree
urlConfig Tree = show Tree
urlConfig Error = show Error
urlConfig Error = show Error
------------------------------------------------------------
------------------------------------------------------------
...
@@ -145,7 +143,6 @@ instance showNodeType :: Show NodeType where
...
@@ -145,7 +143,6 @@ instance showNodeType :: Show NodeType where
show Folder = "folder"
show Folder = "folder"
show Graph = "graph"
show Graph = "graph"
show Individu = "individu"
show Individu = "individu"
show Project = "project"
show Tree = "tree"
show Tree = "tree"
show Error = "ErrorNodeType"
show Error = "ErrorNodeType"
...
@@ -157,11 +154,10 @@ readNodeType "NodeCorpus" = Corpus
...
@@ -157,11 +154,10 @@ readNodeType "NodeCorpus" = Corpus
readNodeType "Annuaire" = Annuaire
readNodeType "Annuaire" = Annuaire
readNodeType "Dashboard" = Dashboard
readNodeType "Dashboard" = Dashboard
readNodeType "Document" = Document
readNodeType "Document" = Document
readNodeType "Folder" = Folder
readNodeType "Graph" = Graph
readNodeType "Graph" = Graph
readNodeType "Individu" = Individu
readNodeType "Individu" = Individu
readNodeType "Project" = Project
readNodeType "Tree" = Tree
readNodeType "Tree" = Tree
readNodeType "Folder" = Folder
readNodeType _ = Error
readNodeType _ = Error
------------------------------------------------------------
------------------------------------------------------------
instance ordNodeType :: Ord NodeType where
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
...
@@ -8,7 +8,7 @@ module Gargantext.Pages.Corpus.User.Users.Types
)
)
where
where
import Prelude
(($))
import Prelude
import Gargantext.Pages.Corpus.User.Users.Types.Lens
import Gargantext.Pages.Corpus.User.Users.Types.Lens
import Gargantext.Pages.Corpus.User.Users.Types.Types
import Gargantext.Pages.Corpus.User.Users.Types.Types
...
@@ -16,15 +16,21 @@ import Gargantext.Pages.Corpus.User.Users.Types.States
...
@@ -16,15 +16,21 @@ import Gargantext.Pages.Corpus.User.Users.Types.States
import Gargantext.Pages.Corpus.User.Brevets as B
import Gargantext.Pages.Corpus.User.Brevets as B
import Data.List (fromFoldable)
import Data.List (fromFoldable)
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Gargantext.Pages.Folder as PS
import Gargantext.Components.Tab (tabs)
import Gargantext.Components.Tab (tabs)
import Thermite (
Spec, focus, noState
)
import Thermite (
Render, Spec, focus, noState, defaultPerformAction, simpleSpec
)
brevetSpec :: Spec State {} Action
brevetSpec :: Spec State {} Action
brevetSpec = noState B.brevetsSpec
brevetSpec = noState B.brevetsSpec
projets :: Spec {} {} Void
projets = simpleSpec defaultPerformAction render
where
render :: Render {} {} Void
render dispatch _ state _ =
[]
projectSpec :: Spec State {} Action
projectSpec :: Spec State {} Action
projectSpec = noState
PS.
projets
projectSpec = noState projets
facets :: Spec State {} Action
facets :: Spec State {} Action
facets = tabs _tablens _tabAction $ fromFoldable
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
...
@@ -47,6 +47,12 @@ dispatchAction dispatcher _ (UserPage id) = do
-- dispatcher $ UserPageA TODO
-- dispatcher $ UserPageA TODO
dispatcher $ UserPageA $ U.FetchUser id
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
dispatchAction dispatcher _ (DocAnnotation i) = do
dispatcher $ SetRoute $ DocAnnotation i
dispatcher $ SetRoute $ DocAnnotation i
-- dispatcher $ DocAnnotationViewA TODO
-- dispatcher $ DocAnnotationViewA TODO
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
0038b247
...
@@ -8,8 +8,10 @@ import Data.Maybe (Maybe(Nothing, Just))
...
@@ -8,8 +8,10 @@ import Data.Maybe (Maybe(Nothing, Just))
import Effect (Effect)
import Effect (Effect)
import Gargantext.Components.Data.Lang (Lang(..))
import Gargantext.Components.Data.Lang (Lang(..))
import Gargantext.Components.Login as LN
import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Corpus as CA
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.Annotation as D
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
...
@@ -65,6 +67,8 @@ pagesComponent s =
...
@@ -65,6 +67,8 @@ pagesComponent s =
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec PGraphExplorer = focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec PGraphExplorer = focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec (Annuaire i) = layout0 $ noState A.layoutAnnuaire
selectSpec (Folder i) = layout0 $ noState F.layoutFolder
-- selectSpec _ = simpleSpec defaultPerformAction defaultRender
-- selectSpec _ = simpleSpec defaultPerformAction defaultRender
...
...
src/Gargantext/Router.purs
View file @
0038b247
...
@@ -26,6 +26,8 @@ data Routes
...
@@ -26,6 +26,8 @@ data Routes
| PGraphExplorer
| PGraphExplorer
| NGramsTable
| NGramsTable
| Dashboard
| Dashboard
| Annuaire Int
| Folder Int
instance showRoutes :: Show Routes where
instance showRoutes :: Show Routes where
...
@@ -40,6 +42,8 @@ instance showRoutes :: Show Routes where
...
@@ -40,6 +42,8 @@ instance showRoutes :: Show Routes where
show PGraphExplorer = "graphExplorer"
show PGraphExplorer = "graphExplorer"
show NGramsTable = "NGramsTable"
show NGramsTable = "NGramsTable"
show Dashboard = "Dashboard"
show Dashboard = "Dashboard"
show (Annuaire i) = "Annuaire"
show (Folder i) = "Folder"
show Home = "Home"
show Home = "Home"
int :: Match Int
int :: Match Int
...
@@ -58,6 +62,8 @@ routing =
...
@@ -58,6 +62,8 @@ routing =
<|> PGraphExplorer <$ route "graph"
<|> PGraphExplorer <$ route "graph"
<|> NGramsTable <$ route "ngrams"
<|> NGramsTable <$ route "ngrams"
<|> Dashboard <$ route "dashboard"
<|> Dashboard <$ route "dashboard"
<|> Annuaire <$> (route "annuaire" *> int)
<|> Folder <$> (route "folder" *> int)
<|> Home <$ lit ""
<|> Home <$ lit ""
where
where
route str = lit "" *> lit str
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