diff --git a/webapp/src/main/resources/public/js/actions/branches/BranchTextUnitsPaginatorActions.js b/webapp/src/main/resources/public/js/actions/branches/BranchTextUnitsPaginatorActions.js
index 55e04a53f..3a75f753f 100644
--- a/webapp/src/main/resources/public/js/actions/branches/BranchTextUnitsPaginatorActions.js
+++ b/webapp/src/main/resources/public/js/actions/branches/BranchTextUnitsPaginatorActions.js
@@ -5,7 +5,7 @@ class BranchTextUnitsPaginatorActions {
this.generateActions(
"goToNextPage",
"goToPreviousPage",
- "changeCurrentPageNumber"
+ "changePageSize",
);
}
}
diff --git a/webapp/src/main/resources/public/js/components/branches/BranchesSearchResults.js b/webapp/src/main/resources/public/js/components/branches/BranchesSearchResults.js
index bda7a9165..658f5735a 100644
--- a/webapp/src/main/resources/public/js/components/branches/BranchesSearchResults.js
+++ b/webapp/src/main/resources/public/js/components/branches/BranchesSearchResults.js
@@ -1,7 +1,19 @@
import React from "react";
import PropTypes from 'prop-types';
import {FormattedDate, FormattedMessage, FormattedNumber, injectIntl} from "react-intl";
-import {Button, Col, Collapse, Glyphicon, Grid, Label, OverlayTrigger, Row, Tooltip} from "react-bootstrap";
+import {
+ Button,
+ Col,
+ Collapse,
+ DropdownButton,
+ Glyphicon,
+ Grid,
+ Label,
+ MenuItem,
+ OverlayTrigger,
+ Row,
+ Tooltip
+} from "react-bootstrap";
import {Link, withRouter} from "react-router";
import ClassNames from "classnames";
import {withAppConfig} from "../../utils/AppConfig";
@@ -12,6 +24,7 @@ import BranchTextUnitsPaginatorStore from "../../stores/branches/BranchTextUnits
import BranchTextUnitsPaginatorActions from "../../actions/branches/BranchTextUnitsPaginatorActions";
import BranchTextUnitsPageActions from "../../actions/branches/BranchTextUnitsPageActions";
import BranchesPageActions from "../../actions/branches/BranchesPageActions";
+import BranchesPaginatorActions from "../../actions/branches/BranchesPaginatorActions";
class BranchesSearchResults extends React.Component {
@@ -72,21 +85,44 @@ class BranchesSearchResults extends React.Component {
}
renderBranchTextUnitsPagination() {
+ const branchTextUnitsPaginatorState = BranchTextUnitsPaginatorStore.getState();
+ let pageSizes = [];
+ for (let i of [10, 25, 50, 100]) {
+ pageSizes.push(
+
+ );
+ }
+ const title = ;
return (
-
- {
- BranchesPageActions.changeSelectedBranchTextUnitIds([]);
- BranchTextUnitsPaginatorActions.goToPreviousPage();
- BranchTextUnitsPageActions.getBranchTextUnits();
- }}
- onNextPageClicked={() => {
- BranchesPageActions.changeSelectedBranchTextUnitIds([]);
- BranchTextUnitsPaginatorActions.goToNextPage();
- BranchTextUnitsPageActions.getBranchTextUnits();
- }}/>
-
+
+
+ {pageSizes}
+
+
+ {
+ BranchesPageActions.changeSelectedBranchTextUnitIds([]);
+ BranchTextUnitsPaginatorActions.goToPreviousPage();
+ BranchTextUnitsPageActions.getBranchTextUnits();
+ }}
+ onNextPageClicked={() => {
+ BranchesPageActions.changeSelectedBranchTextUnitIds([]);
+ BranchTextUnitsPaginatorActions.goToNextPage();
+ BranchTextUnitsPageActions.getBranchTextUnits();
+ }}/>
+
+
);
}
diff --git a/webapp/src/main/resources/public/js/stores/branches/BranchTextUnitsPaginatorStore.js b/webapp/src/main/resources/public/js/stores/branches/BranchTextUnitsPaginatorStore.js
index 83be33c4d..2ecc5a67e 100644
--- a/webapp/src/main/resources/public/js/stores/branches/BranchTextUnitsPaginatorStore.js
+++ b/webapp/src/main/resources/public/js/stores/branches/BranchTextUnitsPaginatorStore.js
@@ -35,6 +35,11 @@ class BranchTextUnitsPaginatorStore extends PaginatorStore {
this.resetBranchTextUnitsSearchParams();
}
}
+
+ changePageSize(pageSize) {
+ this.resetBranchTextUnitsSearchParams();
+ this.limit = pageSize;
+ }
}
export default alt.createStore(BranchTextUnitsPaginatorStore, 'BranchTextUnitsPaginatorStore');