Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
hh1966
chemotion_eln_server
Commits
5c2fbea1
Commit
5c2fbea1
authored
Aug 29, 2019
by
hh1966
Browse files
Move attachments to seperate tab in research plan details
parent
3bbaaea7
Pipeline
#53568
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/components/research_plan/ResearchPlanDetails.js
View file @
5c2fbea1
...
...
@@ -255,35 +255,44 @@ export default class ResearchPlanDetails extends Component {
}
renderPropertiesTab
(
research_plan
,
update
)
{
const
{
name
,
body
,
attachments
}
=
research_plan
const
{
name
,
body
}
=
research_plan
return
(
<
ListGroup
fill
=
"
true
"
>
<
ListGroupItem
>
<
ResearchPlanDetailsName
value
=
{
name
}
disabled
=
{
research_plan
.
isMethodDisabled
(
'
name
'
)}
onChange
=
{
this
.
handleNameChange
.
bind
(
this
)}
edit
=
{
true
}
ref
=
{
this
.
nameRef
}
/
>
disabled
=
{
research_plan
.
isMethodDisabled
(
'
name
'
)}
onChange
=
{
this
.
handleNameChange
.
bind
(
this
)}
edit
=
{
true
}
ref
=
{
this
.
nameRef
}
/
>
<
ResearchPlanDetailsBody
body
=
{
body
}
disabled
=
{
research_plan
.
isMethodDisabled
(
'
body
'
)}
onChange
=
{
this
.
handleBodyChange
.
bind
(
this
)}
onDrop
=
{
this
.
handleBodyDrop
.
bind
(
this
)}
onAdd
=
{
this
.
handleBodyAdd
.
bind
(
this
)}
onDelete
=
{
this
.
handleBodyDelete
.
bind
(
this
)}
onExport
=
{
this
.
handleExportField
.
bind
(
this
)}
update
=
{
update
}
edit
=
{
true
}
ref
=
{
this
.
bodyRef
}
/
>
disabled
=
{
research_plan
.
isMethodDisabled
(
'
body
'
)}
onChange
=
{
this
.
handleBodyChange
.
bind
(
this
)}
onDrop
=
{
this
.
handleBodyDrop
.
bind
(
this
)}
onAdd
=
{
this
.
handleBodyAdd
.
bind
(
this
)}
onDelete
=
{
this
.
handleBodyDelete
.
bind
(
this
)}
onExport
=
{
this
.
handleExportField
.
bind
(
this
)}
update
=
{
update
}
edit
=
{
true
}
ref
=
{
this
.
bodyRef
}
/
>
<
/ListGroupItem
>
<
/ListGroup
>
)
}
renderAttachmentsTab
(
research_plan
)
{
const
{
attachments
}
=
research_plan
return
(
<
ListGroup
fill
=
"
true
"
>
<
ListGroupItem
>
<
ResearchPlanDetailsAttachments
attachments
=
{
attachments
}
onDrop
=
{
this
.
handleAttachmentDrop
.
bind
(
this
)}
onDelete
=
{
this
.
handleAttachmentDelete
.
bind
(
this
)}
onUndoDelete
=
{
this
.
handleAttachmentUndoDelete
.
bind
(
this
)}
onDownload
=
{
this
.
handleAttachmentDownload
.
bind
(
this
)}
onEdit
=
{
this
.
handleAttachmentEdit
.
bind
(
this
)}
edit
=
{
true
}
/
>
onDrop
=
{
this
.
handleAttachmentDrop
.
bind
(
this
)}
onDelete
=
{
this
.
handleAttachmentDelete
.
bind
(
this
)}
onUndoDelete
=
{
this
.
handleAttachmentUndoDelete
.
bind
(
this
)}
onDownload
=
{
this
.
handleAttachmentDownload
.
bind
(
this
)}
onEdit
=
{
this
.
handleAttachmentEdit
.
bind
(
this
)}
/
>
<
/ListGroupItem
>
<
/ListGroup
>
)
...
...
@@ -343,7 +352,10 @@ export default class ResearchPlanDetails extends Component {
<
Tab
eventKey
=
{
1
}
title
=
{
'
Properties
'
}
>
{
this
.
renderPropertiesTab
(
research_plan
,
update
)}
<
/Tab
>
<
Tab
eventKey
=
{
2
}
title
=
{
'
Literature
'
}
>
<
Tab
eventKey
=
{
2
}
title
=
{
'
Attachments
'
}
>
{
this
.
renderAttachmentsTab
(
research_plan
)}
<
/Tab
>
<
Tab
eventKey
=
{
3
}
title
=
{
'
Literature
'
}
>
{
this
.
renderLiteratureTab
(
research_plan
)}
<
/Tab
>
<
/Tabs
>
...
...
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