Document editing

This commit is contained in:
Jori Lallo
2016-05-25 21:26:06 -07:00
parent 814ed7b2da
commit 4c6964ad07
16 changed files with 261 additions and 52 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { connect } from 'react-redux';
import Link from 'react-router/lib/Link';
import { bindActionCreators } from 'redux';
import { fetchDocumentAsync } from 'actions/DocumentActions';
@@ -19,13 +20,16 @@ class DocumentScene extends React.Component {
render() {
const document = this.props.document;
let title;
let actions;
if (document) {
actions = <Link to={ `/documents/${document.id}/edit` }>Edit</Link>;
title = `${document.atlas.name} - ${document.title}`;
}
return (
<Layout
title={ title }
actions={ actions }
>
<CenteredContent>
{ this.props.isLoading || !document ? (