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
6d0e4a5e
Commit
6d0e4a5e
authored
May 18, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams] add pagination links, set DESC score by default
parent
dd7c94bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+18
-6
Core.purs
src/Gargantext/Components/NgramsTable/Core.purs
+4
-2
No files found.
src/Gargantext/Components/NgramsTable.purs
View file @
6d0e4a5e
...
@@ -184,14 +184,26 @@ tableContainerCpt { dispatch
...
@@ -184,14 +184,26 @@ tableContainerCpt { dispatch
]
]
]
]
, editor
, editor
, selectButtons (selectionsExist ngramsSelection)
, H.li {className: "list-group-item"} [
selectButtons (selectionsExist ngramsSelection)
]
, H.div {id: "terms_table", className: "panel-body"}
, H.div {id: "terms_table", className: "panel-body"}
[ H.table {className: "table able"}
[ H.table {className: "table able"}
[ H.thead {className: "tableHeader"} [props.tableHead]
[ H.thead {className: "tableHeader"} [props.tableHead]
, H.tbody {} props.tableBody
]
, H.tbody {} props.tableBody
]
]
, selectButtons (selectionsExist ngramsSelection)
, H.li {className: "list-group-item"} [
H.div { className: "row" } [
H.div { className: "col-md-4" } [
selectButtons (selectionsExist ngramsSelection)
]
, H.div { className: "col-md-4 col-md-offset-4" } [
props.paginationLinks
]
]
]
]
]
]
]
]
]
]
...
@@ -224,7 +236,7 @@ tableContainerCpt { dispatch
...
@@ -224,7 +236,7 @@ tableContainerCpt { dispatch
selectButtons false = H.div {} []
selectButtons false = H.div {} []
selectButtons true =
selectButtons true =
H.
li {className: " list-group-item"
} [
H.
div {
} [
H.button { className: "btn btn-primary"
H.button { className: "btn btn-primary"
, on: { click: const $ setSelection GraphTerm }
, on: { click: const $ setSelection GraphTerm }
} [ H.text "Map" ]
} [ H.text "Map" ]
...
@@ -281,7 +293,7 @@ loadedNgramsTableCpt = R.hooksComponent "G.C.NT.loadedNgramsTable" cpt
...
@@ -281,7 +293,7 @@ loadedNgramsTableCpt = R.hooksComponent "G.C.NT.loadedNgramsTable" cpt
, ngramsSelection
, ngramsSelection
}
}
}
}
]
]
<> resetSaveButtons
where
where
autoUpdate :: Array R.Element
autoUpdate :: Array R.Element
autoUpdate = if withAutoUpdate then [ R2.buff $ autoUpdateElt { duration: 5000, effect: performAction Synchronize } ] else []
autoUpdate = if withAutoUpdate then [ R2.buff $ autoUpdateElt { duration: 5000, effect: performAction Synchronize } ] else []
...
...
src/Gargantext/Components/NgramsTable/Core.purs
View file @
6d0e4a5e
...
@@ -76,7 +76,7 @@ import Data.Lens.Record (prop)
...
@@ -76,7 +76,7 @@ import Data.Lens.Record (prop)
import Data.List ((:), List(Nil))
import Data.List ((:), List(Nil))
import Data.Map (Map)
import Data.Map (Map)
import Data.Map as Map
import Data.Map as Map
import Data.Maybe (Maybe(..),
isNothing,
maybe)
import Data.Maybe (Maybe(..), maybe)
import Data.Newtype (class Newtype)
import Data.Newtype (class Newtype)
import Data.Set (Set)
import Data.Set (Set)
import Data.Set as Set
import Data.Set as Set
...
@@ -126,7 +126,7 @@ initialPageParams :: Session -> Int -> Array Int -> TabType -> PageParams
...
@@ -126,7 +126,7 @@ initialPageParams :: Session -> Int -> Array Int -> TabType -> PageParams
initialPageParams session nodeId listIds tabType =
initialPageParams session nodeId listIds tabType =
{ nodeId
{ nodeId
, listIds
, listIds
, params
: T.initialParams
, params
, tabType
, tabType
, termSizeFilter: Nothing
, termSizeFilter: Nothing
, termListFilter: Just GraphTerm
, termListFilter: Just GraphTerm
...
@@ -134,6 +134,8 @@ initialPageParams session nodeId listIds tabType =
...
@@ -134,6 +134,8 @@ initialPageParams session nodeId listIds tabType =
, scoreType: Occurrences
, scoreType: Occurrences
, session
, session
}
}
where
params = T.initialParams { orderBy = Just (T.DESC $ T.ColumnName "Score") }
newtype NgramsTerm = NormNgramsTerm String
newtype NgramsTerm = NormNgramsTerm String
...
...
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