import React from 'react'; import UserDate from '../Common/UserDate'; import Icon from '../Common/Icon'; import UserPicture from '../User/UserPicture'; import RevisionDiff from './RevisionDiff'; export default class Revision extends React.Component { constructor(props) { super(props); this.openRevisionDiff = this.openRevisionDiff.bind(this); } componentDidMount() { } openRevisionDiff() { this.props.fetchPreviousRevision(this.props.revision); } render() { const revision = this.props.revision; const author = revision.author; let pic = ''; if (typeof author === 'object') { pic = ; } // {{ t('View this version') }} return (
{pic}
{author.username}

View this version View diff
); } /*
{% if tt.author %}{{ tt.author.username }}{% else %}-{% endif %}
{{ tt.createdAt|datetz('Y-m-d H:i:s') }}
{{ t('View this version') }} {{ t('View diff') }}
*/ } Revision.propTypes = { revision: React.PropTypes.object, previousRevisionText: React.PropTypes.string, }