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
63991233
Commit
63991233
authored
Jun 08, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DESGIGN] flex / rows fix
parent
2d8b3b0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
38 deletions
+61
-38
Add.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
+14
-10
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+46
-27
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+1
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
View file @
63991233
...
...
@@ -106,7 +106,7 @@ addNodeView p@{ dispatch, nodeType, nodeTypes } = R.createElement el p []
-- , showConfig nt
]
else
H.button { className : "btn btn-primary"
H.button { className : "btn btn-primary
flex-center
"
, type : "button"
, onClick : mkEffectFn1 $ \_ -> setNodeType ( const
$ fromMaybe nt
...
...
@@ -119,15 +119,19 @@ addNodeView p@{ dispatch, nodeType, nodeTypes } = R.createElement el p []
panelFooter :: R.State String -> R.State NodeType -> R.Element
panelFooter (name' /\ _) (nt /\ _) =
H.div {className: "panel-footer"}
[ H.button {className: "btn btn-primary text-center"
, type: "button"
, onClick: mkEffectFn1 $ \_ -> do
-- TODO
--setPopupOpen $ const Nothing
launchAff $ dispatch $ AddNode name' nt
} [H.text "Add"]
]
H.div { className: "panel-footer"}
[ H.div {} []
, H.div {className: "flex-center"}
[ H.button {className: "btn btn-primary"
, type: "button"
, style : { width: "100%" }
, onClick: mkEffectFn1 $ \_ -> do
-- TODO
--setPopupOpen $ const Nothing
launchAff $ dispatch $ AddNode name' nt
} [H.text "Add"]
]
]
-- END Create Node
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
63991233
...
...
@@ -55,32 +55,46 @@ uploadFileViewCpt = R.hooksComponent "G.C.F.T.N.A.U.UploadFileView" cpt
fileType :: R.State FileType <- R.useState' CSV
lang :: R.State (Maybe Lang) <- R.useState' (Just EN)
pure $ H.div {} [
H.div {} [ H.input { type: "file"
, placeholder: "Choose file"
, on: {change: onChangeContents mFile}
}
]
, H.div {} [ R2.select {className: "col-md-12 form-control"
, on: {change: onChangeFileType fileType}
}
( map renderOptionFT [ CSV
, CSV_HAL
, WOS
, PresseRIS
]
)
]
, H.div {} [ R2.select {className: "col-md-12 form-control"
, on: {change: onChangeLang lang}
} (map renderOptionLang [EN, FR])
]
, H.div {} [ uploadButton {dispatch, fileType, lang, id, mFile, nodeType } ]
]
pure $
H.div {className:""}
[ H.div {className:"row"}
[ H.div {className:"col-md-6 flex-space-around"}
[ H.input { type: "file"
, placeholder: "Choose file"
, on: {change: onChangeContents mFile}
}
]
, H.div {className:"col-md-3 flex-space-around"}
[ R2.select {className: "form-control"
, on: {change: onChangeFileType fileType}
}
( map renderOptionFT [ CSV
, CSV_HAL
, WOS
, PresseRIS
]
)
]
, H.div {className:"col-md-3 flex-space-around"}
[ R2.select { className: "form-control"
, on: {change: onChangeLang lang}
} (map renderOptionLang [EN, FR])
]
]
, H.div { className : "panel-footer" }
[ H.div {} []
, H.div {className:"flex-center"}
[ uploadButton { dispatch
, fileType
, lang
, id
, mFile
, nodeType
}
]
]
]
renderOptionFT :: FileType -> R.Element
renderOptionFT opt = H.option {} [ H.text $ show opt ]
...
...
@@ -132,7 +146,12 @@ uploadButtonCpt :: R.Component UploadButtonProps
uploadButtonCpt = R.hooksComponent "G.C.F.T.N.A.U.uploadButton" cpt
where
cpt {dispatch, fileType: (fileType /\ setFileType), id, lang: (lang /\ setLang), mFile: (mFile /\ setMFile), nodeType} _ = do
pure $ H.button {className: "btn btn-primary", disabled, on: {click: onClick}} [ H.text "Upload" ]
pure $ H.button { className: "btn btn-primary"
, "type" : "button"
, disabled
, style : { width: "100%" }
, on: {click: onClick}
} [ H.text "Upload" ]
where
disabled = case mFile of
Nothing -> "1"
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
63991233
...
...
@@ -693,7 +693,7 @@ actionDownload GT.Corpus id session = downloadButton href label info
where
href = url session $ Routes.NodeAPI GT.Corpus (Just id) "export"
label = "Download Corpus"
info = "
TODO: fix the backend route
"
info = "
Download as JSON
"
actionDownload GT.Texts id session = downloadButton href label info
where
...
...
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