Commit e2ec2e00 authored by Audrey Hamelers's avatar Audrey Hamelers

Merge branch 'dev' into 'master'

Dev

See merge request !191
parents 996ce7a3 ee5011a3
Pipeline #13410 failed with stages
in 11 seconds
......@@ -122,7 +122,7 @@
ol, ul {
margin-left: 1em;
padding-left: 1em;
padding-left: 1.1em;
}
li {
......@@ -1717,7 +1717,8 @@
}
.list-label{
display: inline-block;
text-indent: -1.1em;
margin-left: -1.2em;
padding-right: .1em;
}
.super,
.fn-label,
......
......@@ -154,7 +154,7 @@ const MetaEdit = withTheme(
}
}}
close={close}
linkAndDelete={v => linkAndDelete(v)}
linkAndDelete={linkAndDelete}
manuscript={manuscript}
/>
)
......
......@@ -100,17 +100,18 @@ class MetaSec extends React.Component {
linkDelete === pmcid &&
manuscript.status !== 'xml-complete'
) {
const { data } = await linkDeleteManuscript({
variables: { id: manuscript.id },
})
const result = data.linkDeleteManuscript
;(() =>
this.setState({
linkDelete: null,
notif: {
type: result.success ? 'success' : 'error',
message: result.message,
},
this.setState({ linkDelete: null }, async () => {
const { data } = await linkDeleteManuscript({
variables: { id: manuscript.id },
})
const result = data.linkDeleteManuscript
this.setState({
notif: {
type: result.success ? 'success' : 'error',
message: result.message,
},
})
}))()
}
}
......
......@@ -373,8 +373,8 @@ class PubMedSearch extends React.Component {
<FlexP>
<Button
onClick={() => {
adminRemove(inPMC.pmcid)
this.selectResult(inPMC.result, inPMC.journal)
adminRemove(inPMC.pmcid)
}}
>
Remove submission
......
import React from 'react'
import { Field } from 'formik'
import { isEmpty } from 'lodash'
import { ErrorText, H1, Link, Button, TextField, Checkbox } from '@pubsweet/ui'
import { th } from '@pubsweet/ui-toolkit'
import {
ErrorText,
H1,
Link,
Button,
TextField,
Checkbox,
Icon,
} from '@pubsweet/ui'
import { th, lighten } from '@pubsweet/ui-toolkit'
import styled from 'styled-components'
import { Page, Notification } from '../ui'
import SignInFooter from '../SignInFooter'
......@@ -24,6 +32,18 @@ const PasswordField = styled.div`
max-width: 500px;
`
const Christmas = styled(Notification)`
background-color: ${lighten('colorWarning', 70)};
div {
display: flex;
align-items: flex-start;
.text {
margin-left: 8px;
}
}
`
const Container = styled.form`
margin: 0 0;
max-width: 350px;
......@@ -64,10 +84,20 @@ class Login extends React.Component {
<Page>
<H1>Sign in with your Europe PMC plus account</H1>
{!isEmpty(errors) && <Notification type="error">{errors}</Notification>}
<Notification type="info">
The Europe PMC plus website has recently been upgraded. Please use the
email address associated with your account to log in.
</Notification>
<Christmas>
<Icon color="green" size={2.5}>
gift
</Icon>
<Icon color="#a80202" size={2.5}>
gift
</Icon>
<span className="text">
Please note that the Helpdesk will be unavailable from Wednesday, 25
December to Tuesday 2 January. Any calls or e-mails will be saved
and responded to on our return. Happy Holidays from the Europe PMC
team.{' '}
</span>
</Christmas>
<Container onSubmit={handleSubmit}>
<Field component={EmailInput} name="email" />
<PasswordField>
......
......@@ -77,9 +77,11 @@ const NotifIcon = {
const Notification = ({ children, type, className, ...props }) => (
<Container className={`${className || ''} ${type}`} {...props}>
<Icon color="currentColor" size={2}>
{NotifIcon[type]}
</Icon>
{NotifIcon[type] && (
<Icon color="currentColor" size={2}>
{NotifIcon[type]}
</Icon>
)}
<div>{children}</div>
</Container>
)
......
......@@ -272,6 +272,18 @@ class UploadFileListItem extends React.Component {
setLoading={v => this.setState({ loading: v })}
setNotification={setNotification}
/>
{currentUser.admin && (
<LabeledDiv>
<Action onClick={() => deleteFileHandler(file.id)}>
<Label>Remove</Label>
<Delete>
<Icon color="currentColor" size={3.25}>
x
</Icon>
</Delete>
</Action>
</LabeledDiv>
)}
</ButtonDiv>
</FileListItem>
)
......
......@@ -8,7 +8,7 @@ export const Requirements = () => (
<H3>Funding and open access policies</H3>
<p>
{`The manuscripts submitted must be peer-reviewed, original (primary) research publications that have direct costs supported, in whole or in part, by one or more `}
<A href="//http://europepmc.org/Funders" target="_blank">
<A href="https://europepmc.org/Funders/" target="_blank">
Europe PMC funders
</A>
{`. Typically this applies to all research grant and career development award mechanisms, cooperative agreements and contracts.`}
......@@ -23,7 +23,7 @@ export const Requirements = () => (
</p>
<p>
{`Europe PMC funders expect research outputs they have funded to be freely available. For more information about the open access policies of individual funders, please see the `}
<A href="//http://europepmc.org/Funders" target="_blank">
<A href="https://europepmc.org/Funders/" target="_blank">
Europe PMC Funders page
</A>
{`. Manuscripts are then made freely available through Europe PMC and PubMed Central (PMC).`}
......
This diff is collapsed.
......@@ -13,7 +13,9 @@
"url": "https://gitlab.coko.foundation/xpub/xpub-epmc.git"
},
"dependencies": {
"@babel/core": "^7.3.4",
"@babel/polyfill": "^7.4.4",
"@europepmc/express-middleware-minio": "^3.2.5",
"@pubsweet/base-model": "^1.0.9",
"@pubsweet/component-send-email": "^0.2.4",
"@pubsweet/db-manager": "^2.2.3",
......@@ -25,10 +27,20 @@
"apollo-boost": "^0.1.22",
"apollo-client": "^2.3.7",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.2",
"babel-jest": "^24.5.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"benmark": "^1.1.2",
"chokidar": "^2.0.4",
"clean-webpack-plugin": "^0.1.17",
"config": "^1.26.2",
"configstore": "^4.0.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"curl-request": "^1.1.1",
"dateformat": "^3.0.3",
"decode-html": "^2.0.0",
......@@ -36,8 +48,19 @@
"download": "^7.1.0",
"email-validator": "^2.0.4",
"es6-promise": "^4.2.6",
"express-middleware-minio": "^3.1.0",
"eslint": "^4.12.0",
"eslint-config-pubsweet": "^0.0.6",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.4.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^3.0.0",
"faker": "^4.1.0",
"file-loader": "^1.1.5",
"font-awesome": "^4.7.0",
"form-data": "^2.3.2",
"formik": "^1.3.2",
......@@ -48,10 +71,15 @@
"graphql-type-json": "^0.2.1",
"gunzip-maybe": "^1.4.1",
"history": "^4.7.2",
"html-webpack-plugin": "^2.24.0",
"husky": "^0.14.3",
"isomorphic-fetch": "^2.2.1",
"jest": "^24.5.0",
"joi": "^13.5.2",
"joi-browser": "^10.0.6",
"kue": "^0.11.6",
"libxmljs": "^0.19.5",
"lint-staged": "^4.1.3",
"loadable-components": "^0.3.0",
"md5-file": "^4.0.0",
"mime-types": "^2.1.21",
......@@ -59,7 +87,9 @@
"node-cron": "^2.0.3",
"node-fetch": "^2.2.0",
"node-pre-gyp": "^0.11.0",
"node-sass": "^4.5.3",
"pdfjs-dist": "^2.0.489",
"prettier": "^1.16.3",
"prom-client": "^11.2.1",
"promise-ftp": "^1.3.5",
"prop-types": "^15.5.10",
......@@ -72,10 +102,13 @@
"react-css-modules": "^4.7.7",
"react-dom": "^16.2.0",
"react-dropzone": "^10.1.3",
"react-hot-loader": "^3.1.1",
"react-html-parser": "^2.0.2",
"react-mathjax-preview": "^0.1.10",
"react-redux": "^5.0.2",
"react-router-dom": "^4.2.2",
"react-router-redux": "^5.0.0-alpha.9",
"react-test-renderer": "^16.8.4",
"recompose": "^0.26.0",
"redux": "^3.6.0",
"redux-form": "^7.0.3",
......@@ -84,16 +117,25 @@
"request-promise": "^4.2.4",
"rfr": "^1.2.3",
"rimraf": "^2.6.3",
"sass-loader": "^6.0.6",
"stream-to-array": "^2.3.0",
"string-replace-loader": "^1.3.0",
"style-loader": "^0.19.0",
"stylelint": "^8.2.0",
"stylelint-config-pubsweet": "^0.0.3",
"supertest": "^3.0.0",
"tar": "^4.4.8",
"tar-fs": "^1.16.3",
"tmp": "0.0.33",
"typeface-lora": "^0.0.54",
"typeface-open-sans": "^0.0.54",
"uglifyjs-webpack-plugin": "^1.1.2",
"url-search-params": "^1.1.0",
"waait": "^1.0.2",
"wax-prose-mirror": "^0.0.16",
"webpack": "^3.8.1",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.20.0",
"whatwg-fetch": "^3.0.0",
"winston-daily-rotate-file": "^3.6.0",
"xml2json": "^0.11.2",
......@@ -103,50 +145,7 @@
"xpub-selectors": "^0.1.0",
"xpub-theme": "^0.0.7",
"xslt4node": "^0.3.2",
"yup": "^0.26.6",
"@babel/core": "^7.3.4",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.2",
"babel-jest": "^24.5.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"clean-webpack-plugin": "^0.1.17",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"eslint": "^4.12.0",
"eslint-config-pubsweet": "^0.0.6",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.4.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.5",
"html-webpack-plugin": "^2.24.0",
"husky": "^0.14.3",
"jest": "^24.5.0",
"joi-browser": "^10.0.6",
"lint-staged": "^4.1.3",
"node-sass": "^4.5.3",
"prettier": "^1.16.3",
"react-hot-loader": "^3.1.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-test-renderer": "^16.8.4",
"sass-loader": "^6.0.6",
"string-replace-loader": "^1.3.0",
"style-loader": "^0.19.0",
"stylelint": "^8.2.0",
"stylelint-config-pubsweet": "^0.0.3",
"uglifyjs-webpack-plugin": "^1.1.2",
"webpack": "^3.8.1",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.20.0"
"yup": "^0.26.6"
},
"resolutions": {
"graphql": "^0.13.0"
......
......@@ -9,7 +9,7 @@ const gql = require('graphql-tag')
const fetch = require('node-fetch')
*/
const uuidv4 = require('uuid/v4')
const { minioClient } = require('express-middleware-minio')
const { minioClient } = require('@europepmc/express-middleware-minio')
const Manuscript = require('../xpub-model/entities/manuscript/data-access')
const ManuscriptManager = require('../xpub-model/entities/manuscript/index')
const Journal = require('../xpub-model/entities/journal/data-access')
......
const config = require('config')
const expressMinio = require('express-middleware-minio')
const expressMinio = require('@europepmc/express-middleware-minio')
const rfr = require('rfr')
const FileModel = rfr('server/xpub-model/entities/file/data-access')
......
......@@ -67,7 +67,13 @@ module.exports.deleteTaggingFiles = async function deleteTaggingFiles(
userId,
) {
const manFiles = await FileModel.selectByManuscriptId(manuscriptId)
const submissionFilesTypes = ['manuscript', 'figure', 'table', 'supplement']
const submissionFilesTypes = [
'manuscript',
'figure',
'table',
'supplement',
'citation',
]
const taggingFiles = manFiles.filter(
el => !submissionFilesTypes.includes(el.type),
)
......
......@@ -8,7 +8,7 @@ const fetch = require('node-fetch')
const dateFormat = require('dateformat')
const rimraf = require('rimraf')
const { minioClient } = require('express-middleware-minio')
const { minioClient } = require('@europepmc/express-middleware-minio')
module.exports.getManifestFilename = function getManifestFilename(tmpPath) {
return new Promise((resolve, reject) => {
......
......@@ -122,7 +122,7 @@ module.exports.pushXML = async function pushXML(fileUrl, manuscriptId, userId) {
// now we will transform the nXML into HTML:
const html = await transformXML(
nxml,
path.resolve(__dirname, 'xsl/nxml2html.xsl'),
path.resolve(__dirname, 'xsl/jats2html.xsl'),
filelist,
)
......
......@@ -452,8 +452,8 @@ const Manuscript = {
}
trx = await transaction.start(Team.knex())
if (revTeam) {
lodash.assign(revTeam, teamInput)
await revTeam.saveWithTrx(trx)
teamInput.id = revTeam.id
await Team.update(teamInput, userId)
} else {
const team = new Team(teamInput)
await team.saveWithTrx(trx)
......@@ -475,6 +475,9 @@ const Manuscript = {
inReview = true
}
} else {
if (revTeam) {
await Team.delete(revTeam.id, userId)
}
inReview = true
}
} else if (
......@@ -626,12 +629,12 @@ const Manuscript = {
}
trx = await transaction.start(Team.knex())
if (revTeam) {
team = await Team.find(revTeam.id)
lodash.assign(team, teamInput)
teamInput.id = revTeam.id
await Team.update(teamInput, userId)
} else {
team = new Team(teamInput)
await team.saveWithTrx(trx)
}
await team.saveWithTrx(trx)
await NoteAccess.delete(revNote.id, userId)
await trx.commit()
} catch (error) {
......
......@@ -135,7 +135,9 @@ class User extends EpmcBaseModel {
throw new Error('No user with that email')
}
const identities = user.identities.filter(id => id.email === email)
const identities = user.identities.filter(
id => id.email.toLowerCase() === email.toLowerCase(),
)
const identity = identities[0]
const Identity = require('../identity/data-access')
......
const uuidv1 = require('uuid/v1')
const config = require('config')
const logger = require('@pubsweet/logger')
const { minioClient } = require('express-middleware-minio')
const { minioClient } = require('@europepmc/express-middleware-minio')
const { Readable } = require('stream')
const rfr = require('rfr')
......
......@@ -2,7 +2,7 @@ const uuidv1 = require('uuid/v1')
const logger = require('@pubsweet/logger')
const config = require('config')
const rfr = require('rfr')
const { minioClient } = require('express-middleware-minio')
const { minioClient } = require('@europepmc/express-middleware-minio')
const { timer } = require('benmark')
const fs = require('fs')
const http = require('http')
......
This diff is collapsed.
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