Skip to content
Snippets Groups Projects
Commit 991db148 authored by Alf Eaton's avatar Alf Eaton
Browse files

Refactor actions components

parent 7976e51f
No related branches found
No related tags found
No related merge requests found
.project-actions {
margin: 20px auto;
width: auto;
text-align: center;
font-size: 120%;
white-space: nowrap;
padding-bottom: 20px;
}
.project-action {
color: #4990E2;
text-decoration-color: #aaa;
text-decoration-skip: ink
}
......@@ -2,35 +2,17 @@ import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router'
import './ProjectActions.css'
import { Button } from 'react-bootstrap'
import './Actions.css'
const ProjectActions = ({ project, approveSubmission }) => (
<div className="project-actions content-metadata">
{project.status === 'submitted' ? (
<div>
<div>
<Button onClick={approveSubmission}>Approve submission</Button>
</div>
<div>
<Link to={`/projects/${project.id}/editor`} className="project-action">assign an editor</Link>
</div>
<div>
<Link to={`/projects/${project.id}/reviewers`} className="project-action">invite reviewers</Link>
</div>
<div className="actions content-metadata">
<div className="action">
<Link to={`/projects/${project.id}/editor`} className="project-action">assign an editor</Link>
</div>
) : (
<div>
<div>
<Link to={`/editor/${project.id}`} target="editor" className="project-action">edit your manuscript</Link>
</div>
<div>
<Link to={`/projects/${project.id}/declarations`} className="project-action">submit for publication</Link>
</div>
<div className="action">
<Link to={`/projects/${project.id}/reviewers`} className="project-action">invite reviewers</Link>
</div>
)}
</div>
)
......
......@@ -2,28 +2,36 @@ import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router'
import './VersionActions.css'
import './Actions.css'
const VersionActions = ({ project, version }) => (
<div className="version-actions">
<div>
<Link to={`/editor/${project.id}/${version.id}`} target="editor"
className="version-action">{version.submitted ? 'view your manuscript' : 'edit your manuscript'}</Link>
<div className="actions">
<div className="action">
<Link to={`/editor/${project.id}/${version.id}`} target="editor">{version.snapshot ? 'view your manuscript' : 'edit your manuscript'}</Link>
</div>
<div>
<Link to={`/projects/${project.id}/declarations`}
className="version-action">{version.submitted ? 'view declarations' : 'submit for peer review'}</Link>
<div className="action">
<Link to={`/projects/${project.id}/declarations`}>{version.snapshot ? 'view declarations' : 'edit declarations'}</Link>
</div>
<div style={{marginTop: 20}}>
<Link to={`/projects/${project.id}/review`}
className="version-action">submit your review</Link>
<div className="action">
<Link to={`/projects/${project.id}/check`}>check submission</Link>
</div>
<div>
<Link to={`/projects/${project.id}/decision`}
className="version-action">submit your decision</Link>
<div className="action">
<Link to={`/projects/${project.id}/submit`}>submit for peer review</Link>
</div>
<div className="action">
<Link to={`/projects/${project.id}/submit`}>publish preprint</Link>
</div>
<div className="action">
<Link to={`/projects/${project.id}/review`}>submit your review</Link>
</div>
<div className="action">
<Link to={`/projects/${project.id}/decision`}>submit your decision</Link>
</div>
</div>
)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment