Skip to content
Snippets Groups Projects
Commit beb16183 authored by vkovtun's avatar vkovtun
Browse files

SSDM-13579: Added other buttons to the panel.

parent 1d8cc704
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -264,6 +264,7 @@ const keys = {
UNSAVED_CHANGES: 'UNSAVED_CHANGES',
UPDATE_IF_EXISTS: 'UPDATE_IF_EXISTS',
UPDATE_MODE: "UPDATE_MODE",
UPLOAD: "UPLOAD",
URL_TEMPLATE: 'URL_TEMPLATE',
USAGES: 'USAGES',
USER: 'USER',
......@@ -563,6 +564,7 @@ const messages_en = {
[keys.UNSAVED_CHANGES]: 'You have unsaved changes',
[keys.UPDATE_IF_EXISTS]: 'Update if exists',
[keys.UPDATE_MODE]: 'Update Mode',
[keys.UPLOAD]: 'Upload',
[keys.URL_TEMPLATE]: 'URL Template',
[keys.USAGES]: 'Usages',
[keys.USERS]: 'Users',
......
import React from 'react'
import { withStyles } from '@material-ui/core/styles'
import messages from '@src/js/common/messages.js'
import Container from '@src/js/components/common/form/Container.jsx'
import Button from '@src/js/components/common/form/Button.jsx'
import ViewComfyIcon from '@material-ui/icons/ViewComfy'
import ViewListIcon from '@material-ui/icons/ViewList'
import PublishIcon from '@material-ui/icons/Publish'
import SettingsIcon from '@material-ui/icons/Settings'
import SearchIcon from '@material-ui/icons/Search'
import InfoIcon from '@material-ui/icons/InfoOutlined'
import CreateNewFolderIcon from '@material-ui/icons/CreateNewFolderOutlined'
const styles = theme => ({
containerDefault: {
......@@ -16,11 +22,16 @@ const styles = theme => ({
class Toolbar extends React.Component {
render() {
const { viewType, onViewTypeChange } = this.props
const { viewType, onViewTypeChange, classes } = this.props
return (
<Container>
{viewType === 'list' && <Button label={<ViewComfyIcon/>} onClick={() => onViewTypeChange('grid')} />}
{viewType === 'grid' && <Button label={<ViewListIcon/>} onClick={() => onViewTypeChange('list')} />}
<Button styles={{ root: classes.button }} label={<CreateNewFolderIcon />} />
<Button styles={{ root: classes.button }} label={<InfoIcon />} />
<Button styles={{ root: classes.button }} label={<SearchIcon />} />
{viewType === 'list' && <Button styles={{ root: classes.button }} label={<ViewComfyIcon />} onClick={() => onViewTypeChange('grid')} />}
{viewType === 'grid' && <Button styles={{ root: classes.button }} label={<ViewListIcon />} onClick={() => onViewTypeChange('list')} />}
<Button styles={{ root: classes.button }} label={<SettingsIcon />} />
<Button styles={{ root: classes.button }} label={<><PublishIcon /> {messages.get(messages.UPLOAD)}</>} />
</Container>
)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment