Skip to content

Commit 5aed298

Browse files
CORE-4453 update terms (#605)
* [bugfix] Babel runtime * CORE-4453 update terms Co-authored-by: admin <valerij.budko@gmail.com>
1 parent 07e06b3 commit 5aed298

File tree

3 files changed

+19684
-1385
lines changed

3 files changed

+19684
-1385
lines changed

components/application/terms-condition.jsx

Lines changed: 86 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { withGlobalStore } from 'store'
99
const TermsConditionPopup = ({ store, ...passProps }) => {
1010
const { acceptedTCVersion } = passProps
1111
const [tcVersion, setTcVersion] = useState(acceptedTCVersion > 0)
12+
const [showMoreText, setShowMoreText] = useState(false)
13+
1214
const onClickDecline = () => {
1315
const data = {
1416
acceptedTCVersion: -1,
@@ -19,9 +21,12 @@ const TermsConditionPopup = ({ store, ...passProps }) => {
1921
typeof window != 'undefined'
2022
? `${window.location.origin}/login?reason=logout`
2123
: null
22-
const url = new URL(`./logout?continue=${redirectUrl}`, process.env.IDP_URL)
23-
window.location = url
24+
window.location = new URL(
25+
`./logout?continue=${redirectUrl}`,
26+
process.env.IDP_URL
27+
)
2428
}
29+
2530
const onClickAccept = () => {
2631
const data = {
2732
acceptedTCVersion: 1,
@@ -30,67 +35,97 @@ const TermsConditionPopup = ({ store, ...passProps }) => {
3035
setTcVersion(true)
3136
}
3237

38+
const renderTerms = () => {
39+
setShowMoreText(!showMoreText)
40+
}
41+
3342
if (tcVersion) return <></>
3443
const repositoryName = store?.dataProvider?.name ?? 'repository'
3544
return (
3645
<div className={styles.termsCondition}>
3746
<div className={styles.wrapper}>
38-
<div className={styles.popup}>
47+
<div
48+
className={classNames.use(styles.popup, {
49+
[styles.popupCenter]: !showMoreText,
50+
})}
51+
>
3952
<div className={styles.title}>
4053
Accept CORE&apos;s Terms & Conditions
4154
</div>
42-
<div className={styles.subTitle}>
43-
Please review and accept our T&Cs:
44-
</div>
45-
<div className={styles.termsText}>
46-
By accepting these T&Cs, <b>{repositoryName}</b> subscribes to the
47-
vision vision and declares its interest in participating in a global
48-
interoperable network of open repositories (and journal platforms)
49-
as envisioned by the Confederation of Open Access Repositories: “…
50-
the real power of Open Access lies in the possibility of connecting
51-
and tying repositories, which is why we need interoperability. In
52-
order to In order to create a seamless layer of content through
53-
connected repositories from around the world, Open Access relies on
54-
interoperability, the ability for systems to communicate with each
55-
other and pass information back and forth in a usable format.
56-
Interoperability allows us to exploit today’s computational power so
57-
that we can aggregate, data mine, create new tools and services, and
58-
and generate new knowledge from repository content.”
59-
https://www.coar-repositories.org/files/A-Case-for-Interoperability-Final-Version.pdf”
60-
<br />
61-
<br />
62-
“On behalf of <b>{repositoryName}</b>, I give CORE permission to
63-
harvest and use content from <b>{repositoryName}</b> in line with
64-
the principles of the Budapest Open Access Initiative definition of
65-
OA and the vision of the Confederation of Open Access Repositories
66-
(COAR) as detailed below:
67-
<br />
68-
<br />
69-
- “By “open access” to this literature, we mean its free
70-
availability on the public internet, permitting any users to read,
71-
download, copy, distribute, print, search, or link to the full texts
72-
of these articles, crawl them for indexing, pass them as data to
73-
software, or use them for any other lawful purpose, without
74-
financial, legal, or technical barriers other than those inseparable
75-
from gaining access to the internet itself. The only constraint on
76-
reproduction and distribution, and the only role for copyright in
77-
this domain, should be to give authors control over the integrity of
78-
their work and the right to be properly acknowledged and cited.”
79-
https://www.budapestopenaccessinitiative.org/read/
80-
<br />
81-
<br />- Recommendation Self-archiving (I) of the BOAI: “I.
82-
Self-Archiving: First, scholars need the tools and assistance to
83-
deposit their refereed journal articles in open electronic archives,
84-
a practice commonly called, self-archiving. When these archives
85-
conform to standards created by the Open Archives Initiative, then
86-
search engines and other tools can treat the separate archives as
87-
one. Users then need not know which archives exist or where they are
88-
located in order to find and make use of their contents.”
55+
<div
56+
className={classNames.use(styles.termsText, {
57+
[styles.termsTextHeight]: showMoreText,
58+
})}
59+
>
60+
<div className={styles.subTitle}>
61+
CORE needs from <b>{repositoryName}</b> permission to:
62+
</div>
63+
<span className={styles.subText}>
64+
Access and process data from your repository in line with the BOAI
65+
definition of OA.
66+
</span>
67+
{/* eslint-disable-next-line max-len */}
68+
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */}
69+
<div className={styles.termsToggler} onClick={renderTerms}>
70+
Read the full T&Cs document
71+
</div>
72+
{showMoreText ? (
73+
<div>
74+
By accepting these T&Cs, <b>{repositoryName}</b> subscribes to
75+
the vision and declares its interest in participating in a
76+
global interoperable network of open repositories (and journal
77+
platforms) as envisioned by the Confederation of Open Access
78+
Repositories: “… the real power of Open Access lies in the
79+
possibility of connecting and tying together repositories, which
80+
is why we need interoperability. In order to create a seamless
81+
layer of content through connected repositories from around the
82+
world, Open Access relies on interoperability, the ability for
83+
systems to communicate with each other and pass information back
84+
and forth in a usable format. Interoperability allows us to
85+
exploit today&apos;s computational power so that we can
86+
aggregate, data mine, create new tools and services, and
87+
generate new knowledge from repository content.”
88+
https://www.coar-repositories.org/files/A-Case-for-Interoperability-Final-Version.pdf”
89+
<br />
90+
<br />
91+
<b>{repositoryName}</b> gives CORE permission to harvest and use
92+
content from <b>{repositoryName}</b> in line with the principles
93+
of the Budapest Open Access Initiative definition of OA and the
94+
vision of the Confederation of Open Access Repositories (COAR)
95+
as detailed below:
96+
<br />
97+
<br />
98+
“By “open access” to this literature, we mean its free
99+
availability on the public internet, permitting any users to
100+
read, download, copy, distribute, print, search, or link to the
101+
full texts of these articles, crawl them for indexing, pass them
102+
as data to software, or use them for any other lawful purpose,
103+
without financial, legal, or technical barriers other than those
104+
inseparable from gaining access to the internet itself. The only
105+
constraint on reproduction and distribution, and the only role
106+
for copyright in this domain, should be to give authors control
107+
over the integrity of their work and the right to be properly
108+
acknowledged and cited.”
109+
https://www.budapestopenaccessinitiative.org/read/
110+
<br />
111+
<br />
112+
Recommendation Self-archiving (I) of the BOAI: “I.
113+
Self-Archiving: First, scholars need the tools and assistance to
114+
deposit their refereed journal articles in open electronic
115+
archives, a practice commonly called, self-archiving. When these
116+
archives conform to standards created by the Open Archives
117+
Initiative, then search engines and other tools can treat the
118+
separate archives as one. Users then need not know which
119+
archives exist or where they are located in order to find and
120+
make use of their contents.”
121+
</div>
122+
) : (
123+
''
124+
)}
89125
</div>
90126
<div className={styles.blockRight}>
91127
<Button
92128
className={classNames.use('button', styles.termsBtn).from(styles)}
93-
variant="outlined"
94129
tag="div"
95130
onClick={onClickDecline}
96131
>

components/application/terms-condition.module.css

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
1818
}
1919

20+
.popup-center {
21+
position: absolute;
22+
left: 50%;
23+
transform: translate(-50%, 50%);
24+
}
25+
2026
.title {
2127
margin-bottom: 24px;
2228
font-size: 16px;
@@ -32,17 +38,34 @@
3238
line-height: 24px;
3339
}
3440

41+
.sub-text {
42+
display: list-item;
43+
margin-bottom: 18px;
44+
margin-left: 1rem;
45+
}
46+
47+
.terms-toggler {
48+
margin-bottom: 10px;
49+
text-decoration: underline;
50+
cursor: pointer;
51+
}
52+
3553
.terms-text {
3654
width: 568px;
37-
height: 376px;
55+
height: max-content;
56+
min-height: 168px;
3857
padding: 20px;
39-
overflow-y: scroll;
4058
font-size: 16px;
4159
background: #f5f5f5;
4260
border: 1px solid #9e9e9e;
4361
gap: 10px;
4462
}
4563

64+
.terms-text-height {
65+
height: 514px;
66+
overflow-y: scroll;
67+
}
68+
4669
.terms-checkbox {
4770
margin-top: 18px;
4871
font-size: 16px;

0 commit comments

Comments
 (0)