|
|
@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
|
import { Route, Switch } from 'react-router';
|
|
|
|
import { Route, Switch } from 'react-router';
|
|
|
|
import Button from '@material-ui/core/Button';
|
|
|
|
import Button from '@material-ui/core/Button';
|
|
|
|
import IconEdit from '@material-ui/icons/Edit';
|
|
|
|
import IconEdit from '@material-ui/icons/Edit';
|
|
|
|
import IconCopy from '@material-ui/icons/FileCopy';
|
|
|
|
import IconDuplicate from '@material-ui/icons/FileCopy';
|
|
|
|
import IconChangeHistory from '@material-ui/icons/ChangeHistory';
|
|
|
|
import IconChangeHistory from '@material-ui/icons/ChangeHistory';
|
|
|
|
import { withStyles } from '@material-ui/core/styles';
|
|
|
|
import { withStyles } from '@material-ui/core/styles';
|
|
|
|
|
|
|
|
|
|
|
@ -192,7 +192,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{props.routePrefix === 'pim.events' &&
|
|
|
|
{props.routePrefix === 'pim.events' &&
|
|
|
|
<Route
|
|
|
|
<Route
|
|
|
|
path={routeResolver.getRoute(props.routePrefix + '._id.copy')}
|
|
|
|
path={routeResolver.getRoute(props.routePrefix + '._id.duplicate')}
|
|
|
|
exact
|
|
|
|
exact
|
|
|
|
render={({ match }) => {
|
|
|
|
render={({ match }) => {
|
|
|
|
const itemUid = decodeURIComponent(match.params.itemUid);
|
|
|
|
const itemUid = decodeURIComponent(match.params.itemUid);
|
|
|
@ -210,7 +210,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(
|
|
|
|
onDelete={props.onItemDelete}
|
|
|
|
onDelete={props.onItemDelete}
|
|
|
|
onCancel={props.onItemCancel}
|
|
|
|
onCancel={props.onItemCancel}
|
|
|
|
history={props.history}
|
|
|
|
history={props.history}
|
|
|
|
copy
|
|
|
|
duplicate
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</Container>
|
|
|
|
</Container>
|
|
|
@ -285,12 +285,12 @@ const CollectionRoutes = withStyles(styles)(withRouter(
|
|
|
|
style={{ marginLeft: 15 }}
|
|
|
|
style={{ marginLeft: 15 }}
|
|
|
|
onClick={() =>
|
|
|
|
onClick={() =>
|
|
|
|
history.push(routeResolver.getRoute(
|
|
|
|
history.push(routeResolver.getRoute(
|
|
|
|
props.routePrefix + '._id.copy',
|
|
|
|
props.routePrefix + '._id.duplicate',
|
|
|
|
{ itemUid: match.params.itemUid }))
|
|
|
|
{ itemUid: match.params.itemUid }))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<IconCopy className={classes.leftIcon} />
|
|
|
|
<IconDuplicate className={classes.leftIcon} />
|
|
|
|
Copy
|
|
|
|
Duplicate
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|