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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
27895371
Commit
27895371
authored
Jan 09, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[docs] fixes to CSV/JSON download of texts
parent
9a6cdd1e
Pipeline
#3531
canceled with stage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Download.purs
...rgantext/Components/Forest/Tree/Node/Action/Download.purs
+8
-2
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Download.purs
View file @
27895371
...
...
@@ -101,7 +101,13 @@ actionDownloadNodeListCpt = here.component "actionDownloadNodeList" cpt where
data NodeTextsDownloadFormat = NT_CSV | NT_JSON
derive instance Eq NodeTextsDownloadFormat
derive instance Generic NodeTextsDownloadFormat _
instance Show NodeTextsDownloadFormat where show = genericShow
instance Show NodeTextsDownloadFormat where
show NT_CSV = "CSV"
show NT_JSON = "JSON"
urlNodeTextsDownloadFormat :: NodeTextsDownloadFormat -> String
urlNodeTextsDownloadFormat NT_CSV = "csv"
urlNodeTextsDownloadFormat NT_JSON = "json"
readNodeTextsDownloadFormat :: String -> NodeTextsDownloadFormat
readNodeTextsDownloadFormat "CSV" = NT_CSV
...
...
@@ -131,7 +137,7 @@ actionDownloadNodeTextsCpt = here.component "actionDownloadNodeTexts" cpt where
onClick _ = T.write_ t downloadFormat
onChange downloadFormat e = T.write_ (readNodeTextsDownloadFormat $ R.unsafeEventValue e) downloadFormat
href :: NodeTextsDownloadFormat -> String
href t = url session $ Routes.NodeAPI GT.NodeTexts (Just id) ("export/" <>
(toLower $ show t)
)
href t = url session $ Routes.NodeAPI GT.NodeTexts (Just id) ("export/" <>
urlNodeTextsDownloadFormat t
)
info :: NodeTextsDownloadFormat -> String
info t = "Info about the Documents as " <> show t <> " format"
...
...
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