|
|
@@ -24,88 +24,38 @@ export const DropendMenu = React.memo((props: DropendMenuProps): JSX.Element =>
|
|
|
const { t } = useTranslation('commons');
|
|
|
|
|
|
return (
|
|
|
- <>
|
|
|
- {/* <ul className="dropdown-menu">
|
|
|
- <li>
|
|
|
- <button
|
|
|
- className="dropdown-item"
|
|
|
- onClick={onClickCreateNewPageButtonHandler}
|
|
|
- type="button"
|
|
|
- >
|
|
|
- {t('create_page_dropdown.new_page')}
|
|
|
- </button>
|
|
|
- </li>
|
|
|
- {todaysPath != null && (
|
|
|
- <>
|
|
|
- <li><hr className="dropdown-divider" /></li>
|
|
|
- <li><span className="text-muted px-3">{t('create_page_dropdown.todays.desc')}</span></li>
|
|
|
- <li>
|
|
|
- <button
|
|
|
- className="dropdown-item"
|
|
|
- onClick={onClickCreateTodaysButtonHandler}
|
|
|
- type="button"
|
|
|
- >
|
|
|
- {todaysPath}
|
|
|
- </button>
|
|
|
- </li>
|
|
|
- </>
|
|
|
- )}
|
|
|
- <li><hr className="dropdown-divider" /></li>
|
|
|
- <li><span className="text-muted text-nowrap px-3">{t('create_page_dropdown.template.desc')}</span></li>
|
|
|
- <li>
|
|
|
- <button
|
|
|
- className="dropdown-item"
|
|
|
- onClick={() => onClickTemplateButtonHandler('_template')}
|
|
|
- type="button"
|
|
|
- >
|
|
|
- {t('create_page_dropdown.template.children')}
|
|
|
- </button>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <button
|
|
|
- className="dropdown-item"
|
|
|
- onClick={() => onClickTemplateButtonHandler('__template')}
|
|
|
- type="button"
|
|
|
+ <DropdownMenu
|
|
|
+ container="body"
|
|
|
+ >
|
|
|
+ <DropdownItem
|
|
|
+ onClick={onClickCreateNewPageButtonHandler}
|
|
|
+ >
|
|
|
+ {t('create_page_dropdown.new_page')}
|
|
|
+ </DropdownItem>
|
|
|
+ {todaysPath != null && (
|
|
|
+ <>
|
|
|
+ <DropdownItem divider />
|
|
|
+ <li><span className="text-muted px-3">{t('create_page_dropdown.todays.desc')}</span></li>
|
|
|
+ <DropdownItem
|
|
|
+ onClick={onClickCreateTodaysButtonHandler}
|
|
|
>
|
|
|
- {t('create_page_dropdown.template.descendants')}
|
|
|
- </button>
|
|
|
- </li>
|
|
|
- </ul> */}
|
|
|
-
|
|
|
- <DropdownMenu
|
|
|
- container="body"
|
|
|
- style={{ zIndex: 1055 }}
|
|
|
+ {todaysPath}
|
|
|
+ </DropdownItem>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
+ <DropdownItem divider />
|
|
|
+ <li><span className="text-muted text-nowrap px-3">{t('create_page_dropdown.template.desc')}</span></li>
|
|
|
+ <DropdownItem
|
|
|
+ onClick={() => onClickTemplateButtonHandler('_template')}
|
|
|
+ >
|
|
|
+ {t('create_page_dropdown.template.children')}
|
|
|
+ </DropdownItem>
|
|
|
+ <DropdownItem
|
|
|
+ onClick={() => onClickTemplateButtonHandler('__template')}
|
|
|
>
|
|
|
- <DropdownItem
|
|
|
- onClick={onClickCreateNewPageButtonHandler}
|
|
|
- >
|
|
|
- {t('create_page_dropdown.new_page')}
|
|
|
- </DropdownItem>
|
|
|
- {todaysPath != null && (
|
|
|
- <>
|
|
|
- <DropdownItem divider />
|
|
|
- <li><span className="text-muted px-3">{t('create_page_dropdown.todays.desc')}</span></li>
|
|
|
- <DropdownItem
|
|
|
- onClick={onClickCreateTodaysButtonHandler}
|
|
|
- >
|
|
|
- {todaysPath}
|
|
|
- </DropdownItem>
|
|
|
- </>
|
|
|
- )}
|
|
|
- <DropdownItem divider />
|
|
|
- <li><span className="text-muted text-nowrap px-3">{t('create_page_dropdown.template.desc')}</span></li>
|
|
|
- <DropdownItem
|
|
|
- onClick={() => onClickTemplateButtonHandler('_template')}
|
|
|
- >
|
|
|
- {t('create_page_dropdown.template.children')}
|
|
|
- </DropdownItem>
|
|
|
- <DropdownItem
|
|
|
- onClick={() => onClickTemplateButtonHandler('__template')}
|
|
|
- >
|
|
|
- {t('create_page_dropdown.template.descendants')}
|
|
|
- </DropdownItem>
|
|
|
- </DropdownMenu>
|
|
|
- </>
|
|
|
+ {t('create_page_dropdown.template.descendants')}
|
|
|
+ </DropdownItem>
|
|
|
+ </DropdownMenu>
|
|
|
);
|
|
|
});
|
|
|
DropendMenu.displayName = 'DropendMenu';
|