Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
oauth-play
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ASM
oauth-play
Commits
77e57e2b
Commit
77e57e2b
authored
Mar 16, 2018
by
Andreas Åkre Solberg
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to the embedded view
parent
4358328d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
10 deletions
+30
-10
src/containers/ORCIDController.js
src/containers/ORCIDController.js
+30
-10
No files found.
src/containers/ORCIDController.js
View file @
77e57e2b
...
@@ -3,7 +3,7 @@ import React from 'react'
...
@@ -3,7 +3,7 @@ import React from 'react'
import
FontAwesome
from
'
react-fontawesome
'
import
FontAwesome
from
'
react-fontawesome
'
// import HostnameInput from '../components/HostnameInput'
// import HostnameInput from '../components/HostnameInput'
// import { discoveryStart } from '../actions/'
// import { discoveryStart } from '../actions/'
import
{
ListGroup
,
Label
,
ListGroupItem
,
Alert
,
Navbar
,
Nav
,
NavItem
,
NavDropdown
,
MenuItem
,
Glyphicon
,
Jumbotron
,
Button
}
from
'
react-bootstrap
'
import
{
Radio
,
ListGroup
,
Label
,
ListGroupItem
,
Alert
,
Navbar
,
Nav
,
NavItem
,
NavDropdown
,
MenuItem
,
Glyphicon
,
Jumbotron
,
Button
}
from
'
react-bootstrap
'
import
API
from
'
../utils/API
'
import
API
from
'
../utils/API
'
class
XController
extends
React
.
Component
{
class
XController
extends
React
.
Component
{
...
@@ -12,18 +12,37 @@ class XController extends React.Component {
...
@@ -12,18 +12,37 @@ class XController extends React.Component {
this
.
props
.
orcidRemove
(
id
)
this
.
props
.
orcidRemove
(
id
)
}
}
radioSelect
(
id
)
{
console
.
error
(
"
RADIO SELECT
"
,
id
)
}
getORCIDentry
(
orcid
)
{
if
(
this
.
props
.
embedded
)
{
return
(
<
ListGroupItem
key
=
{
orcid
.
orcid
}
>
<
Button
key
=
{
orcid
.
orcid
}
onClick
=
{
this
.
orcidRemove
.
bind
(
this
,
orcid
.
orcid
)}
className
=
"
pull-right
"
bsSize
=
"
small
"
bsStyle
=
"
danger
"
>
Fjern
<
/Button
>
<
Radio
name
=
"
orcidSelector
"
onChange
=
{
this
.
radioSelect
.
bind
(
this
,
orcid
.
orcid
)}
inline
>
<
h4
>
{
orcid
.
orcid
}
{
orcid
.
verified
?
<
FontAwesome
name
=
'
check-circle-o
'
/>
:
<
Label
bsStyle
=
"
danger
"
>
unverified
<
/Label> }</
h4
>
<
/Radio
>
<
/ListGroupItem
>
)
}
return
(
<
ListGroupItem
key
=
{
orcid
.
orcid
}
>
<
Button
key
=
{
orcid
.
orcid
}
onClick
=
{
this
.
orcidRemove
.
bind
(
this
,
orcid
.
orcid
)}
className
=
"
pull-right
"
bsSize
=
"
small
"
bsStyle
=
"
danger
"
>
Fjern
<
/Button
>
<
h4
>
{
orcid
.
orcid
}
{
orcid
.
verified
?
<
FontAwesome
name
=
'
check-circle-o
'
/>
:
<
Label
bsStyle
=
"
danger
"
>
unverified
<
/Label> }</
h4
>
<
/ListGroupItem
>
)
}
render
()
{
render
()
{
var
content
var
content
if
(
this
.
props
.
orcids
.
items
.
length
>
0
)
{
if
(
this
.
props
.
orcids
.
items
.
length
>
0
)
{
content
=
this
.
props
.
orcids
.
items
.
map
((
orcid
)
=>
content
=
this
.
props
.
orcids
.
items
.
map
((
orcid
)
=>
this
.
getORCIDentry
(
orcid
))
(
<
ListGroupItem
key
=
{
orcid
.
orcid
}
>
<
Button
key
=
{
orcid
.
orcid
}
onClick
=
{
this
.
orcidRemove
.
bind
(
this
,
orcid
.
orcid
)}
className
=
"
pull-right
"
bsSize
=
"
small
"
bsStyle
=
"
danger
"
>
Fjern
<
/Button
>
<
h4
>
{
orcid
.
orcid
}
{
orcid
.
verified
?
<
FontAwesome
name
=
'
check-circle-o
'
/>
:
<
Label
bsStyle
=
"
danger
"
>
unverified
<
/Label> }</
h4
>
<
/ListGroupItem
>
)
)
}
else
{
}
else
{
content
=
(
content
=
(
<
div
>
Ingen
ORCIDs
registrert
på
din
bruker
.
<
/div
>
<
div
>
Ingen
ORCIDs
registrert
på
din
bruker
.
<
/div
>
...
@@ -46,7 +65,8 @@ class XController extends React.Component {
...
@@ -46,7 +65,8 @@ class XController extends React.Component {
const
mapStateToProps
=
(
state
)
=>
({
const
mapStateToProps
=
(
state
)
=>
({
orcids
:
state
.
orcids
orcids
:
state
.
orcids
,
embedded
:
state
.
embedded
})
})
const
mapDispatchToProps
=
{
const
mapDispatchToProps
=
{
...
...
Andreas Åkre Solberg
@andreas.solberg
mentioned in commit
fc0abc25
·
Mar 21, 2018
mentioned in commit
fc0abc25
mentioned in commit fc0abc2574a25d8095f5ed38122b33789ff7a59d
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment