[graph] add count of documents to sidebar

parent 5f83b235
...@@ -263,7 +263,8 @@ initialPageGQL { corpusId, ngramsTerms, session } = ...@@ -263,7 +263,8 @@ initialPageGQL { corpusId, ngramsTerms, session } =
loadPageGQL :: Record PageGQLParams -> AffRESTError Rows loadPageGQL :: Record PageGQLParams -> AffRESTError Rows
loadPageGQL { corpusId loadPageGQL { corpusId
, params: { limit, offset, orderBy } -- NOTE: unused
-- , params: { limit, offset, orderBy }
, ngramsTerms , ngramsTerms
, session } = do , session } = do
......
...@@ -239,23 +239,27 @@ docListCpt = here.component "main" cpt where ...@@ -239,23 +239,27 @@ docListCpt = here.component "main" cpt where
, ,
R2.when (not $ eq results Seq.empty) $ R2.when (not $ eq results Seq.empty) $
H.ul H.div {}
{ className: intercalate " " [
[ "graph-doc-list" H.h6 {} [ H.text $ show (Seq.length results) <> " related documents"]
, "list-group" , H.ul
] { className: intercalate " "
} $ [ "graph-doc-list"
Seq.toUnfoldable $ flip Seq.map results \r -> , "list-group"
]
item } $
{ documentView: (r :: DocumentsView) Seq.toUnfoldable $ flip Seq.map results \r ->
, callback: callback showDoc'
, isSelected: isSelected showDoc' (r :: DocumentsView) item
, listId { documentView: (r :: DocumentsView)
, corpusId: nodeId , callback: callback showDoc'
, session , isSelected: isSelected showDoc' (r :: DocumentsView)
, frontends , listId
} , corpusId: nodeId
, session
, frontends
}
]
] ]
......
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