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
789cef0d
Commit
789cef0d
authored
Jul 11, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE] user-form
parents
72aeb6ae
20864e01
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
32 deletions
+31
-32
Navigation.purs
src/Gargantext/Navigation.purs
+4
-3
Renders.purs
src/Gargantext/Pages/Corpus/User/Users/Specs/Renders.purs
+5
-7
Router.purs
src/Gargantext/Router.purs
+22
-22
No files found.
src/Gargantext/Navigation.purs
View file @
789cef0d
...
...
@@ -291,7 +291,7 @@ pagesComponent s =
selectSpec Home = layout0 $ focus _landingState _landingAction (L.layoutLanding EN)
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec DocView = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec
UserPage
= layout0 $ focus _userPageState _userPageAction U.layoutUser
selectSpec
(UserPage i)
= layout0 $ focus _userPageState _userPageAction U.layoutUser
selectSpec (DocAnnotation i) = layout0 $ focus _docAnnotationViewState _docAnnotationViewAction D.docview
selectSpec Tabview = layout0 $ focus _tabviewState _tabviewAction TV.tab1
-- To be removed
...
...
@@ -593,9 +593,10 @@ dispatchAction dispatcher _ SearchView = do
_ <- dispatcher $ SearchA $ S.NoOp
pure unit
dispatchAction dispatcher _
UserPage
= do
_ <- dispatcher $ SetRoute $ UserPage
dispatchAction dispatcher _
(UserPage id)
= do
_ <- dispatcher $ SetRoute $ UserPage
id
_ <- dispatcher $ UserPageA $ U.NoOp
_ <- dispatcher $ UserPageA $ U.FetchUser id
pure unit
dispatchAction dispatcher _ (DocAnnotation i) = do
...
...
src/Gargantext/Pages/Corpus/User/Users/Specs/Renders.purs
View file @
789cef0d
...
...
@@ -7,19 +7,18 @@ import Data.Maybe (Maybe(..))
import Data.Tuple (Tuple(..))
import Prelude (($), (<<<))
import React (ReactElement)
import React.DOM (
button, div, h4, h3
, li, span, text, ul, img)
import React.DOM (
div, h3, h1
, li, span, text, ul, img)
import React.DOM.Props (_id, className, src)
import React.DOM.Props as RP
import Thermite (Render)
render :: forall props. Render State props Action
render dispatch _ state _ =
[
button [RP.onClick \_ -> dispatch $ FetchUser 473593] [ text "Fetch User"],
[
div [className "col-md-12"]
$ case state.user of
(Just (User user)) -> display user.name [userInfos user.hyperdata]
Nothing -> display "
No user
" []
Nothing -> display "
User not found
" []
]
display :: forall props. String -> Array ReactElement -> Array ReactElement
...
...
@@ -67,4 +66,3 @@ userInfos (HyperData user) =
[ span [] [text title]
, span [className "badge badge-default badge-pill"] [text content]
]
src/Gargantext/Router.purs
View file @
789cef0d
...
...
@@ -21,7 +21,7 @@ data Routes
| AddCorpus
| DocView
| SearchView
| UserPage
| UserPage
Int
| DocAnnotation Int
| Tabview
| CorpusAnalysis
...
...
@@ -35,7 +35,7 @@ instance showRoutes :: Show Routes where
show AddCorpus = "AddCorpus"
show DocView = "DocView"
show SearchView = "SearchView"
show
UserPage
= "UserPage"
show
(UserPage i)
= "UserPage"
show (DocAnnotation i)= "DocumentView"
show Tabview = "Tabview"
show CorpusAnalysis = "corpus"
...
...
@@ -52,7 +52,7 @@ routing =
Login <$ route "login"
<|> Tabview <$ route "tabview"
<|> DocAnnotation <$> (route "documentView" *> int)
<|> UserPage <$
route "userPage"
<|> UserPage <$
> (route "user" *> int)
<|> SearchView <$ route "search"
<|> DocView <$ route "docView"
<|> AddCorpus <$ route "addCorpus"
...
...
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