|
@@ -48,8 +48,9 @@ class Timeline extends React.Component {
|
48
|
48
|
return <Revision
|
49
|
49
|
customClass={props.customClass}
|
50
|
50
|
createdAt={content.created}
|
51
|
|
- number={props.timelineData.filter(c => c.timelineType === 'revision' && c.revision_id <= content.revision_id).length}
|
|
51
|
+ number={content.number}
|
52
|
52
|
key={`revision_${content.revision_id}`}
|
|
53
|
+ onClickRevision={() => props.onClickRevisionBtn(content)}
|
53
|
54
|
/>
|
54
|
55
|
}
|
55
|
56
|
})}
|
|
@@ -63,6 +64,7 @@ class Timeline extends React.Component {
|
63
|
64
|
placeholder='Taper votre message ici'
|
64
|
65
|
value={props.newComment}
|
65
|
66
|
onChange={props.onChangeNewComment}
|
|
67
|
+ disabled={props.disableComment}
|
66
|
68
|
/>
|
67
|
69
|
</div>
|
68
|
70
|
|
|
@@ -74,6 +76,7 @@ class Timeline extends React.Component {
|
74
|
76
|
`${props.customClass}__texteditor__advancedtext__btn timeline__texteditor__advancedtext__btn btn btn-outline-primary`
|
75
|
77
|
)}
|
76
|
78
|
onClick={props.onClickWysiwygBtn}
|
|
79
|
+ disabled={props.disableComment}
|
77
|
80
|
>
|
78
|
81
|
{props.wysiwyg ? 'Text Simple' : 'Texte Avancé'}
|
79
|
82
|
</button>
|
|
@@ -84,6 +87,7 @@ class Timeline extends React.Component {
|
84
|
87
|
type='button'
|
85
|
88
|
className={classnames(`${props.customClass}__texteditor__submit__btn`, 'timeline__texteditor__submit__btn btn')}
|
86
|
89
|
onClick={props.onClickValidateNewCommentBtn}
|
|
90
|
+ disabled={props.disableComment}
|
87
|
91
|
>
|
88
|
92
|
Envoyer
|
89
|
93
|
<div
|
|
@@ -106,13 +110,16 @@ Timeline.propTypes = {
|
106
|
110
|
newComment: PropTypes.string.isRequired,
|
107
|
111
|
onChangeNewComment: PropTypes.func.isRequired,
|
108
|
112
|
onClickValidateNewCommentBtn: PropTypes.func.isRequired,
|
|
113
|
+ disableComment: PropTypes.bool,
|
109
|
114
|
customClass: PropTypes.string,
|
110
|
115
|
loggedUser: PropTypes.object,
|
111
|
116
|
wysiwyg: PropTypes.bool,
|
112
|
|
- onClickWysiwygBtn: PropTypes.func
|
|
117
|
+ onClickWysiwygBtn: PropTypes.func,
|
|
118
|
+ onClickRevisionBtn: PropTypes.func
|
113
|
119
|
}
|
114
|
120
|
|
115
|
121
|
Timeline.defaultProps = {
|
|
122
|
+ disableComment: false,
|
116
|
123
|
customClass: '',
|
117
|
124
|
loggedUser: {
|
118
|
125
|
id: '',
|