Commit 9d94fe12 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-doc-table-columns' into dev

parents 43495ef8 bb30e4db
......@@ -271,7 +271,7 @@ renderPage (_ /\ setTableParams) p res = R.createElement el p []
corpusDocument (Just corpusId) = Router.CorpusDocument corpusId
corpusDocument _ = Router.Document
cpt {nodeId, corpusId, listId} _children = do
cpt {nodeId, corpusId, listId, totalRecords} _children = do
localCategories <- R.useState' (mempty :: LocalCategories)
pure $ R2.buff $ T.tableElt
......@@ -287,8 +287,7 @@ renderPage (_ /\ setTableParams) p res = R.createElement el p []
, "Title"
, "Source"
]
-- , totalRecords
, totalRecords: 1000 -- TODO
, totalRecords
}
where
getCategory (localCategories /\ _) {_id, category} = maybe category identity (localCategories ^. at _id)
......
......@@ -26,11 +26,12 @@ 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 (put, post, deleteWithBody)
import Gargantext.Components.Loader as Loader
import Gargantext.Components.Search.Types (Category(..), CategoryQuery(..), favCategory, trashCategory, decodeCategory, putCategories)
import Gargantext.Components.Table as T
import Gargantext.Router as Router
import Gargantext.Utils (toggleSet)
import Gargantext.Utils.DecodeMaybe ((.|))
import React.DOM (a, br', button, div, i, input, p, text, span)
......@@ -387,7 +388,7 @@ renderPage loaderDispatch { totalRecords, dispatch, container
]
-- TODO show date: Year-Month-Day only
, div strikeIfDeleted [text date]
, a (strikeIfDeleted <> [ href (toUrl Front (ListDocument (Just listId)) (Just id))
, a (strikeIfDeleted <> [ href $ toLink $ Router.Document listId id
, target "blank"])
[ text title ]
, div strikeIfDeleted [text source]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment