Skip to content

Commit

Permalink
CORE-4453 update terms (#605)
Browse files Browse the repository at this point in the history
* [bugfix] Babel runtime

* CORE-4453 update terms

Co-authored-by: admin <[email protected]>
  • Loading branch information
ekachxaidze98 and valeriibudko authored Jan 25, 2023
1 parent 07e06b3 commit 5aed298
Show file tree
Hide file tree
Showing 3 changed files with 19,684 additions and 1,385 deletions.
137 changes: 86 additions & 51 deletions components/application/terms-condition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { withGlobalStore } from 'store'
const TermsConditionPopup = ({ store, ...passProps }) => {
const { acceptedTCVersion } = passProps
const [tcVersion, setTcVersion] = useState(acceptedTCVersion > 0)
const [showMoreText, setShowMoreText] = useState(false)

const onClickDecline = () => {
const data = {
acceptedTCVersion: -1,
Expand All @@ -19,9 +21,12 @@ const TermsConditionPopup = ({ store, ...passProps }) => {
typeof window != 'undefined'
? `${window.location.origin}/login?reason=logout`
: null
const url = new URL(`./logout?continue=${redirectUrl}`, process.env.IDP_URL)
window.location = url
window.location = new URL(
`./logout?continue=${redirectUrl}`,
process.env.IDP_URL
)
}

const onClickAccept = () => {
const data = {
acceptedTCVersion: 1,
Expand All @@ -30,67 +35,97 @@ const TermsConditionPopup = ({ store, ...passProps }) => {
setTcVersion(true)
}

const renderTerms = () => {
setShowMoreText(!showMoreText)
}

if (tcVersion) return <></>
const repositoryName = store?.dataProvider?.name ?? 'repository'
return (
<div className={styles.termsCondition}>
<div className={styles.wrapper}>
<div className={styles.popup}>
<div
className={classNames.use(styles.popup, {
[styles.popupCenter]: !showMoreText,
})}
>
<div className={styles.title}>
Accept CORE&apos;s Terms & Conditions
</div>
<div className={styles.subTitle}>
Please review and accept our T&Cs:
</div>
<div className={styles.termsText}>
By accepting these T&Cs, <b>{repositoryName}</b> subscribes to the
vision vision and declares its interest in participating in a global
interoperable network of open repositories (and journal platforms)
as envisioned by the Confederation of Open Access Repositories: “…
the real power of Open Access lies in the possibility of connecting
and tying repositories, which is why we need interoperability. In
order to In order to create a seamless layer of content through
connected repositories from around the world, Open Access relies on
interoperability, the ability for systems to communicate with each
other and pass information back and forth in a usable format.
Interoperability allows us to exploit today’s computational power so
that we can aggregate, data mine, create new tools and services, and
and generate new knowledge from repository content.”
https://www.coar-repositories.org/files/A-Case-for-Interoperability-Final-Version.pdf”
<br />
<br />
“On behalf of <b>{repositoryName}</b>, I give CORE permission to
harvest and use content from <b>{repositoryName}</b> in line with
the principles of the Budapest Open Access Initiative definition of
OA and the vision of the Confederation of Open Access Repositories
(COAR) as detailed below:
<br />
<br />
- “By “open access” to this literature, we mean its free
availability on the public internet, permitting any users to read,
download, copy, distribute, print, search, or link to the full texts
of these articles, crawl them for indexing, pass them as data to
software, or use them for any other lawful purpose, without
financial, legal, or technical barriers other than those inseparable
from gaining access to the internet itself. The only constraint on
reproduction and distribution, and the only role for copyright in
this domain, should be to give authors control over the integrity of
their work and the right to be properly acknowledged and cited.”
https://www.budapestopenaccessinitiative.org/read/
<br />
<br />- Recommendation Self-archiving (I) of the BOAI: “I.
Self-Archiving: First, scholars need the tools and assistance to
deposit their refereed journal articles in open electronic archives,
a practice commonly called, self-archiving. When these archives
conform to standards created by the Open Archives Initiative, then
search engines and other tools can treat the separate archives as
one. Users then need not know which archives exist or where they are
located in order to find and make use of their contents.”
<div
className={classNames.use(styles.termsText, {
[styles.termsTextHeight]: showMoreText,
})}
>
<div className={styles.subTitle}>
CORE needs from <b>{repositoryName}</b> permission to:
</div>
<span className={styles.subText}>
Access and process data from your repository in line with the BOAI
definition of OA.
</span>
{/* eslint-disable-next-line max-len */}
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */}
<div className={styles.termsToggler} onClick={renderTerms}>
Read the full T&Cs document
</div>
{showMoreText ? (
<div>
By accepting these T&Cs, <b>{repositoryName}</b> subscribes to
the vision and declares its interest in participating in a
global interoperable network of open repositories (and journal
platforms) as envisioned by the Confederation of Open Access
Repositories: “… the real power of Open Access lies in the
possibility of connecting and tying together repositories, which
is why we need interoperability. In order to create a seamless
layer of content through connected repositories from around the
world, Open Access relies on interoperability, the ability for
systems to communicate with each other and pass information back
and forth in a usable format. Interoperability allows us to
exploit today&apos;s computational power so that we can
aggregate, data mine, create new tools and services, and
generate new knowledge from repository content.”
https://www.coar-repositories.org/files/A-Case-for-Interoperability-Final-Version.pdf”
<br />
<br />
<b>{repositoryName}</b> gives CORE permission to harvest and use
content from <b>{repositoryName}</b> in line with the principles
of the Budapest Open Access Initiative definition of OA and the
vision of the Confederation of Open Access Repositories (COAR)
as detailed below:
<br />
<br />
“By “open access” to this literature, we mean its free
availability on the public internet, permitting any users to
read, download, copy, distribute, print, search, or link to the
full texts of these articles, crawl them for indexing, pass them
as data to software, or use them for any other lawful purpose,
without financial, legal, or technical barriers other than those
inseparable from gaining access to the internet itself. The only
constraint on reproduction and distribution, and the only role
for copyright in this domain, should be to give authors control
over the integrity of their work and the right to be properly
acknowledged and cited.”
https://www.budapestopenaccessinitiative.org/read/
<br />
<br />
Recommendation Self-archiving (I) of the BOAI: “I.
Self-Archiving: First, scholars need the tools and assistance to
deposit their refereed journal articles in open electronic
archives, a practice commonly called, self-archiving. When these
archives conform to standards created by the Open Archives
Initiative, then search engines and other tools can treat the
separate archives as one. Users then need not know which
archives exist or where they are located in order to find and
make use of their contents.”
</div>
) : (
''
)}
</div>
<div className={styles.blockRight}>
<Button
className={classNames.use('button', styles.termsBtn).from(styles)}
variant="outlined"
tag="div"
onClick={onClickDecline}
>
Expand Down
27 changes: 25 additions & 2 deletions components/application/terms-condition.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.popup-center {
position: absolute;
left: 50%;
transform: translate(-50%, 50%);
}

.title {
margin-bottom: 24px;
font-size: 16px;
Expand All @@ -32,17 +38,34 @@
line-height: 24px;
}

.sub-text {
display: list-item;
margin-bottom: 18px;
margin-left: 1rem;
}

.terms-toggler {
margin-bottom: 10px;
text-decoration: underline;
cursor: pointer;
}

.terms-text {
width: 568px;
height: 376px;
height: max-content;
min-height: 168px;
padding: 20px;
overflow-y: scroll;
font-size: 16px;
background: #f5f5f5;
border: 1px solid #9e9e9e;
gap: 10px;
}

.terms-text-height {
height: 514px;
overflow-y: scroll;
}

.terms-checkbox {
margin-top: 18px;
font-size: 16px;
Expand Down
Loading

0 comments on commit 5aed298

Please sign in to comment.