@@ -15,6 +15,7 @@ import { ShareButton } from "./ShareOptions/ShareButton";
15
15
import { NewVersionButton } from "@js/invenio_rdm_records/" ;
16
16
import PropTypes from "prop-types" ;
17
17
import Overridable from "react-overridable" ;
18
+ import { ManageButton } from "./ManageButton" ;
18
19
19
20
export class RecordManagement extends Component {
20
21
constructor ( props ) {
@@ -32,19 +33,24 @@ export class RecordManagement extends Component {
32
33
isPreviewSubmissionRequest,
33
34
currentUserId,
34
35
accessLinksSearchConfig,
36
+ recordOwnerUsername,
35
37
} = this . props ;
36
38
const { error } = this . state ;
37
39
const { id : recid } = record ;
38
-
39
40
const handleError = ( errorMessage ) => {
40
41
console . error ( errorMessage ) ;
41
42
this . setState ( { error : errorMessage } ) ;
42
43
} ;
43
44
44
45
return (
45
46
< Grid columns = { 1 } className = "record-management" >
46
- { permissions . can_edit && ! isDraft && (
47
+ { permissions . can_moderate && (
47
48
< Grid . Column className = "pb-5" >
49
+ < ManageButton recid = { recid } recordOwnerUsername = { recordOwnerUsername } />
50
+ </ Grid . Column >
51
+ ) }
52
+ { permissions . can_edit && ! isDraft && (
53
+ < Grid . Column className = { permissions . can_manage ? "pb-5 pt-5" : "pb-5" } >
48
54
< EditButton recid = { recid } onError = { handleError } />
49
55
</ Grid . Column >
50
56
) }
@@ -111,5 +117,6 @@ RecordManagement.propTypes = {
111
117
isDraft : PropTypes . bool . isRequired ,
112
118
isPreviewSubmissionRequest : PropTypes . bool . isRequired ,
113
119
currentUserId : PropTypes . string . isRequired ,
120
+ recordOwnerUsername : PropTypes . object . isRequired ,
114
121
accessLinksSearchConfig : PropTypes . object . isRequired ,
115
122
} ;
0 commit comments