mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
piece bitcoin id
This commit is contained in:
parent
7afb3d68b8
commit
ffdb4847db
@ -28,6 +28,11 @@ import DeleteButton from '../ascribe_buttons/delete_button';
|
|||||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||||
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
||||||
|
|
||||||
|
import Form from '../ascribe_forms/form';
|
||||||
|
import Property from '../ascribe_forms/property';
|
||||||
|
import InputTextAreaToggable from '../ascribe_forms/input_textarea_toggable';
|
||||||
|
|
||||||
|
import ApiUrls from '../../constants/api_urls';
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
import { mergeOptions } from '../../utils/general_utils';
|
import { mergeOptions } from '../../utils/general_utils';
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
@ -159,6 +164,7 @@ let PieceContainer = React.createClass({
|
|||||||
subheader={
|
subheader={
|
||||||
<div className="ascribe-detail-header">
|
<div className="ascribe-detail-header">
|
||||||
<DetailProperty label={getLangText('REGISTREE')} value={ this.state.piece.user_registered } />
|
<DetailProperty label={getLangText('REGISTREE')} value={ this.state.piece.user_registered } />
|
||||||
|
<DetailProperty label={getLangText('ID')} value={ this.state.piece.bitcoin_id } ellipsis={true} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
buttons={
|
buttons={
|
||||||
@ -192,6 +198,11 @@ let PieceContainer = React.createClass({
|
|||||||
otherData={this.state.piece.other_data}
|
otherData={this.state.piece.other_data}
|
||||||
handleSuccess={this.loadPiece}/>
|
handleSuccess={this.loadPiece}/>
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
|
{
|
||||||
|
//<PersonalNote
|
||||||
|
// piece={this.state.piece}
|
||||||
|
// currentUser={this.state.currentUser}/>
|
||||||
|
}
|
||||||
</Piece>
|
</Piece>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -204,4 +215,43 @@ let PieceContainer = React.createClass({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
let PersonalNote = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
piece: React.PropTypes.object,
|
||||||
|
currentUser: React.PropTypes.object
|
||||||
|
},
|
||||||
|
showNotification(){
|
||||||
|
let notification = new GlobalNotificationModel(getLangText('Jury note saved'), 'success');
|
||||||
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
|
},
|
||||||
|
|
||||||
|
render() {
|
||||||
|
if (this.props.currentUser.username && true || false) {
|
||||||
|
return (
|
||||||
|
<Form
|
||||||
|
url={ApiUrls.note_notes}
|
||||||
|
handleSuccess={this.showNotification}>
|
||||||
|
<Property
|
||||||
|
name='value'
|
||||||
|
label={getLangText('Jury note')}
|
||||||
|
editable={true}>
|
||||||
|
<InputTextAreaToggable
|
||||||
|
rows={1}
|
||||||
|
editable={true}
|
||||||
|
defaultValue={this.props.piece.note_from_user ? this.props.piece.note_from_user.note : null}
|
||||||
|
placeholder={getLangText('Enter your comments...')}/>
|
||||||
|
</Property>
|
||||||
|
<Property hidden={true} name='piece_id'>
|
||||||
|
<input defaultValue={this.props.piece.id}/>
|
||||||
|
</Property>
|
||||||
|
<hr />
|
||||||
|
</Form>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
export default PieceContainer;
|
export default PieceContainer;
|
||||||
|
@ -256,7 +256,7 @@ let PersonalNote = React.createClass({
|
|||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return nul
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user