Skip to content

Commit

Permalink
Add collection actions to the top of the element list
Browse files Browse the repository at this point in the history
  • Loading branch information
maiwald committed Oct 28, 2024
1 parent f78c813 commit 9c65396
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
31 changes: 23 additions & 8 deletions app/packs/src/apps/mydb/elements/list/ElementsList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Immutable from 'immutable';
import React from 'react';
import { Tabs, Tab, Tooltip, OverlayTrigger, Button } from 'react-bootstrap';
import { Tabs, Tab, Tooltip, OverlayTrigger, Button, ButtonGroup } from 'react-bootstrap';
import KeyboardActions from 'src/stores/alt/actions/KeyboardActions';
import UIActions from 'src/stores/alt/actions/UIActions';
import UserActions from 'src/stores/alt/actions/UserActions';
Expand All @@ -14,6 +14,10 @@ import UserStore from 'src/stores/alt/stores/UserStore';
import { StoreContext } from 'src/stores/mobx/RootStore';
import ArrayUtils from 'src/utilities/ArrayUtils';
import PropTypes from 'prop-types';
import ManagingActions from 'src/components/managingActions/ManagingActions';
import CreateButton from 'src/components/contextActions/CreateButton';
import SplitElementButton from 'src/components/contextActions/SplitElementButton';
import ExportImportButton from 'src/components/contextActions/ExportImportButton';

function getSortedHash(inputHash) {
const resultHash = {};
Expand Down Expand Up @@ -259,14 +263,25 @@ export default class ElementsList extends React.Component {
Remove search result
</Button>
)}
<div className="position-relative h-100">
<div className="position-absolute top-0 end-0">
<ElementsTableSettings
visible={visible}
hidden={hidden}
/>
<div className="d-flex flex-column gap-1 h-100">
<div className="d-flex gap-2">
<ButtonGroup className="d-flex align-items-center">
<SplitElementButton />
<CreateButton />
</ButtonGroup>

<ManagingActions />

<ExportImportButton />
</div>
<div className="tabs-container--with-full-height">
<div className="tabs-container--with-full-height position-relative">
<div className="position-absolute top-0 end-0">
<ElementsTableSettings
visible={visible}
hidden={hidden}
/>
</div>

<Tabs
id="tabList"
defaultActiveKey={0}
Expand Down
10 changes: 0 additions & 10 deletions app/packs/src/apps/mydb/layout/Topbar.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React from 'react';
import { ButtonGroup } from 'react-bootstrap';

import Search from 'src/components/navigation/search/Search';
import CreateButton from 'src/components/contextActions/CreateButton';
import SplitElementButton from 'src/components/contextActions/SplitElementButton';
import ReportUtilButton from 'src/components/contextActions/ReportUtilButton';
import ExportImportButton from 'src/components/contextActions/ExportImportButton';
import ScanCodeButton from 'src/components/contextActions/ScanCodeButton';
import SupportMenuButton from 'src/components/navigation/SupportMenuButton';
import UserAuth from 'src/components/navigation/UserAuth';
Expand All @@ -16,12 +12,6 @@ export default function Topbar() {
<Search />

<div className="d-flex align-items-center gap-2">
<ButtonGroup className="d-flex align-items-center">
<SplitElementButton />
<CreateButton />
</ButtonGroup>

<ExportImportButton />
<ReportUtilButton />
<ScanCodeButton />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default class ManagingActions extends React.Component {

return (
<>
<ButtonGroup className="d-flex align-items-center">
<ButtonGroup>
<DropdownButton
as={ButtonGroup}
variant="success"
Expand Down

0 comments on commit 9c65396

Please sign in to comment.