Commit 5c935aa5 authored by Audrey Hamelers's avatar Audrey Hamelers
parent 27bec300
Pipeline #12984 passed with stages
in 5 minutes and 39 seconds
......@@ -3,7 +3,7 @@ import { Mutation } from 'react-apollo'
import styled from 'styled-components'
import ReactHtmlParser from 'react-html-parser'
import { th, lighten } from '@pubsweet/ui-toolkit'
import { Action, Button, H1, H2, H3, H4 } from '@pubsweet/ui'
import { Action, Button, H1, H2, H3, H4, Icon } from '@pubsweet/ui'
import {
B,
Buttons,
......@@ -120,6 +120,7 @@ const AnnotateHTML = Annotator(HTMLPreview)
class Review extends React.Component {
state = {
open: true,
pane: 'web',
showManuscript: false,
showAll: false,
......@@ -137,7 +138,7 @@ class Review extends React.Component {
['xml-triage', 'tagging'].includes(this.props.manuscript.status) &&
this.props.currentUser.admin
) {
this.setState({ pane: 'files' })
this.setState({ pane: 'files', open: false })
}
}
}
......@@ -146,7 +147,7 @@ class Review extends React.Component {
}
render() {
const { manuscript, currentUser, review } = this.props
const { pane, showManuscript, showAll, startProcessing } = this.state
const { open, pane, showManuscript, showAll, startProcessing } = this.state
const { files: allfiles, status, teams, pdfDepositState } = manuscript
if (teams && allfiles) {
const sourceFile =
......@@ -435,30 +436,41 @@ class Review extends React.Component {
</React.Fragment>
)}
<React.Fragment>
<Header>
<H3>Submitted files</H3>
</Header>
<Content>
{sourceFile && (
<ManuscriptDiv>
<H4>Manuscript file</H4>
<FileLightbox
file={allfiles.find(
f => f.type === 'manuscript',
)}
/>
<Button
className="hide-mobile"
onClick={() =>
this.setState({ showManuscript: true })
}
>
View manuscript file alongside preview
</Button>
</ManuscriptDiv>
)}
<FileThumbnails files={originalFiles} />
</Content>
<Action
onClick={() => this.setState({ open: !open })}
style={{ width: '100%', textDecoration: 'none' }}
title="Show files"
>
<Header>
<H3>Submitted files</H3>
<Icon color="currentColor">
chevron-{open ? 'down' : 'right'}
</Icon>
</Header>
</Action>
{open && (
<Content>
{sourceFile && (
<ManuscriptDiv>
<H4>Manuscript file</H4>
<FileLightbox
file={allfiles.find(
f => f.type === 'manuscript',
)}
/>
<Button
className="hide-mobile"
onClick={() =>
this.setState({ showManuscript: true })
}
>
View manuscript file alongside preview
</Button>
</ManuscriptDiv>
)}
<FileThumbnails files={originalFiles} />
</Content>
)}
</React.Fragment>
<ReviewForm
manuscript={manuscript}
......
Markdown is supported
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