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
1
Merge Requests
1
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
Przemyslaw Kaminski
purescript-gargantext
Commits
195e2cc3
Commit
195e2cc3
authored
6 years ago
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Docs Table generate correct document links
parent
b42e73e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+3
-2
Config.purs
src/Gargantext/Config.purs
+20
-0
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
195e2cc3
...
...
@@ -29,12 +29,13 @@ import React as React
import React (ReactClass, ReactElement, Children)
------------------------------------------------------------------------
import Gargantext.Prelude
import Gargantext.Config (End(..), NodeType(..), OrderBy(..), Path(..), TabType, toUrl)
import Gargantext.Config (End(..), NodeType(..), OrderBy(..), Path(..), TabType, toUrl
, toLink
)
import Gargantext.Config.REST (get, put, post, deleteWithBody)
import Gargantext.Components.Loader as Loader
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.Table as T
import Gargantext.Utils.DecodeMaybe ((.|))
import Gargantext.Router as R
import React.DOM (a, br', button, div, i, input, p, text)
import React.DOM.Props (_type, className, href, onClick, placeholder, style, checked, target)
import Thermite (PerformAction, Render, Spec, defaultPerformAction, modifyState_, simpleSpec, hideState)
...
...
@@ -307,7 +308,7 @@ renderPage loaderDispatch { totalRecords, dispatch, listId
else
div [ ][text (show r.date)]
, if (toDelete $ DocumentsView r) then
a [ href (to
Url Front Url_Document (Just r._id)
)
a [ href (to
Link $ R.Document listId r._id
)
, style {textDecoration : "line-through"}
, target "_blank"
] [ text r.title ]
...
...
This diff is collapsed.
Click to expand it.
src/Gargantext/Config.purs
View file @
195e2cc3
...
...
@@ -18,6 +18,7 @@ import Data.Map (Map)
import Data.Map as DM
import Data.Maybe (Maybe(..), maybe)
import Data.Tuple (Tuple(..))
import Gargantext.Router as R
import Gargantext.Types
...
...
@@ -192,6 +193,25 @@ pathUrl c (Chart {chartType, tabType}) i =
------------------------------------------------------------
routesPath R.Home = ""
routesPath R.Login = "login"
routesPath R.SearchView = "search"
routesPath (R.Folder i) = "folder/" <> show i
routesPath (R.Corpus i) = "corpus/" <> show i
routesPath R.AddCorpus = "addCorpus"
routesPath (R.Document l i) = "list/" <> show l <> "/document/" <> show i
routesPath (R.PGraphExplorer i) = "#/"
routesPath R.Dashboard = "dashboard"
routesPath (R.Annuaire i) = "annuaire/" <> show i
routesPath (R.UserPage i) = "user/" <> show i
routesPath (R.ContactPage i) = "contact/" <> show i
class Linkable a where
toLink :: a -> String
instance linkableRoutes :: Linkable R.Routes where
toLink l = endConfig.front.baseUrl <> endConfig.front.prePath <> routesPath l
class ToUrl a where
toUrl :: End -> a -> Maybe Id -> Url
...
...
This diff is collapsed.
Click to expand it.
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