|
@@ -9,21 +9,23 @@ import AppContainer from '../../services/AppContainer';
|
|
|
import PageContainer from '../../services/PageContainer';
|
|
import PageContainer from '../../services/PageContainer';
|
|
|
import OutsideShareLinkModal from '../OutsideShareLinkModal';
|
|
import OutsideShareLinkModal from '../OutsideShareLinkModal';
|
|
|
|
|
|
|
|
-import ArchiveCreateModal from '../ArchiveCreateModal';
|
|
|
|
|
|
|
+// TODO GW-2746 bulk export pages
|
|
|
|
|
+// import ArchiveCreateModal from '../ArchiveCreateModal';
|
|
|
|
|
|
|
|
const PageShareManagement = (props) => {
|
|
const PageShareManagement = (props) => {
|
|
|
const { t, appContainer, pageContainer } = props;
|
|
const { t, appContainer, pageContainer } = props;
|
|
|
|
|
|
|
|
|
|
+ // TODO GW-2746 bulk export pages
|
|
|
|
|
+ // eslint-disable-next-line no-unused-vars
|
|
|
const { path, pageId } = pageContainer.state;
|
|
const { path, pageId } = pageContainer.state;
|
|
|
const { currentUser } = appContainer;
|
|
const { currentUser } = appContainer;
|
|
|
|
|
|
|
|
const [isOutsideShareLinkModalShown, setIsOutsideShareLinkModalShown] = useState(false);
|
|
const [isOutsideShareLinkModalShown, setIsOutsideShareLinkModalShown] = useState(false);
|
|
|
|
|
|
|
|
- const [isArchiveCreateModalShown, setIsArchiveCreateModalShown] = useState(false);
|
|
|
|
|
-
|
|
|
|
|
- const [totalPages, setTotalPages] = useState(null);
|
|
|
|
|
-
|
|
|
|
|
- const [errorMessage, setErrorMessage] = useState(null);
|
|
|
|
|
|
|
+ // TODO GW-2746 bulk export pages
|
|
|
|
|
+ // const [isArchiveCreateModalShown, setIsArchiveCreateModalShown] = useState(false);
|
|
|
|
|
+ // const [totalPages, setTotalPages] = useState(null);
|
|
|
|
|
+ // const [errorMessage, setErrorMessage] = useState(null);
|
|
|
|
|
|
|
|
function openOutsideShareLinkModalHandler() {
|
|
function openOutsideShareLinkModalHandler() {
|
|
|
setIsOutsideShareLinkModalShown(true);
|
|
setIsOutsideShareLinkModalShown(true);
|
|
@@ -33,15 +35,16 @@ const PageShareManagement = (props) => {
|
|
|
setIsOutsideShareLinkModalShown(false);
|
|
setIsOutsideShareLinkModalShown(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- async function getArchivePageData() {
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await appContainer.apiv3Get('page/count-children-pages', { pageId });
|
|
|
|
|
- setTotalPages(res.data.dummy);
|
|
|
|
|
- }
|
|
|
|
|
- catch (err) {
|
|
|
|
|
- setErrorMessage(t('export_bulk.failed_to_count_pages'));
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // TODO GW-2746 bulk export pages
|
|
|
|
|
+ // async function getArchivePageData() {
|
|
|
|
|
+ // try {
|
|
|
|
|
+ // const res = await appContainer.apiv3Get('page/count-children-pages', { pageId });
|
|
|
|
|
+ // setTotalPages(res.data.dummy);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // catch (err) {
|
|
|
|
|
+ // setErrorMessage(t('export_bulk.failed_to_count_pages'));
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
async function exportPageHandler(format) {
|
|
async function exportPageHandler(format) {
|
|
|
const { pageId, revisionId } = pageContainer.state;
|
|
const { pageId, revisionId } = pageContainer.state;
|
|
@@ -52,16 +55,15 @@ const PageShareManagement = (props) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// TODO GW-2746 create api to bulk export pages
|
|
// TODO GW-2746 create api to bulk export pages
|
|
|
- // eslint-disable-next-line no-unused-vars
|
|
|
|
|
- function openArchiveModalHandler() {
|
|
|
|
|
- setIsArchiveCreateModalShown(true);
|
|
|
|
|
- getArchivePageData();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // function openArchiveModalHandler() {
|
|
|
|
|
+ // setIsArchiveCreateModalShown(true);
|
|
|
|
|
+ // getArchivePageData();
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
- function closeArchiveCreateModalHandler() {
|
|
|
|
|
- setIsArchiveCreateModalShown(false);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // TODO GW-2746 create api to bulk export pages
|
|
|
|
|
+ // function closeArchiveCreateModalHandler() {
|
|
|
|
|
+ // setIsArchiveCreateModalShown(false);
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
|
|
|
|
function renderModals() {
|
|
function renderModals() {
|
|
@@ -76,13 +78,14 @@ const PageShareManagement = (props) => {
|
|
|
onClose={closeOutsideShareLinkModalHandler}
|
|
onClose={closeOutsideShareLinkModalHandler}
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <ArchiveCreateModal
|
|
|
|
|
|
|
+ {/* TODO GW-2746 bulk export pages */}
|
|
|
|
|
+ {/* <ArchiveCreateModal
|
|
|
isOpen={isArchiveCreateModalShown}
|
|
isOpen={isArchiveCreateModalShown}
|
|
|
onClose={closeArchiveCreateModalHandler}
|
|
onClose={closeArchiveCreateModalHandler}
|
|
|
path={path}
|
|
path={path}
|
|
|
errorMessage={errorMessage}
|
|
errorMessage={errorMessage}
|
|
|
totalPages={totalPages}
|
|
totalPages={totalPages}
|
|
|
- />
|
|
|
|
|
|
|
+ /> */}
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|