Addressed user feedback

This commit is contained in:
Jori Lallo
2017-09-24 13:51:33 -07:00
parent 3648c11a41
commit a5a1e286d4
5 changed files with 89 additions and 42 deletions

View File

@ -16,8 +16,11 @@ import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu';
document: Document,
};
onCreateDocument = () => {
this.props.history.push(`${this.props.document.collection.url}/new`);
handleNewChild = () => {
const { history, document } = this.props;
history.push(
`${document.collection.url}/new?parentDocument=${document.id}`
);
};
handleDelete = () => {
@ -52,7 +55,12 @@ import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu';
Unstar
</DropdownMenuItem>
: <DropdownMenuItem onClick={this.handleStar}>Star</DropdownMenuItem>}
<DropdownMenuItem
onClick={this.handleNewChild}
title="Create a new child document for the current document"
>
New child
</DropdownMenuItem>
<DropdownMenuItem onClick={this.handleMove}>Move</DropdownMenuItem>
<DropdownMenuItem onClick={this.handleExport}>Export</DropdownMenuItem>
{allowDelete &&