mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
jury dashboard + rating WIP
This commit is contained in:
parent
36aa5b1891
commit
a27415eb86
@ -14,6 +14,8 @@ import Property from '../../../../../components/ascribe_forms/property';
|
|||||||
import InputTextAreaToggable from '../../../../../components/ascribe_forms/input_textarea_toggable';
|
import InputTextAreaToggable from '../../../../../components/ascribe_forms/input_textarea_toggable';
|
||||||
import CollapsibleParagraph from '../../../../../components/ascribe_collapsible/collapsible_paragraph';
|
import CollapsibleParagraph from '../../../../../components/ascribe_collapsible/collapsible_paragraph';
|
||||||
|
|
||||||
|
import StarRating from 'react-star-rating';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the component that implements resource/data specific functionality
|
* This is the component that implements resource/data specific functionality
|
||||||
*/
|
*/
|
||||||
@ -70,6 +72,10 @@ let PrizePieceDetails = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
piece: React.PropTypes.object
|
piece: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onRatingClick(event, position, rating, caption, name) {
|
||||||
|
console.log(rating);
|
||||||
|
},
|
||||||
render() {
|
render() {
|
||||||
if (this.props.piece.prize
|
if (this.props.piece.prize
|
||||||
&& this.props.piece.prize.name
|
&& this.props.piece.prize.name
|
||||||
@ -79,6 +85,13 @@ let PrizePieceDetails = React.createClass({
|
|||||||
title="Prize Details"
|
title="Prize Details"
|
||||||
show={true}
|
show={true}
|
||||||
defaultExpanded={true}>
|
defaultExpanded={true}>
|
||||||
|
<StarRating
|
||||||
|
name="airbnb-rating"
|
||||||
|
caption=""
|
||||||
|
step={1}
|
||||||
|
size='lg'
|
||||||
|
onRatingClick={this.onRatingClick}
|
||||||
|
ratingAmount={5} />
|
||||||
<Form ref='form'>
|
<Form ref='form'>
|
||||||
{Object.keys(this.props.piece.extra_data).map((data) => {
|
{Object.keys(this.props.piece.extra_data).map((data) => {
|
||||||
let label = data.replace('_', ' ');
|
let label = data.replace('_', ' ');
|
||||||
|
@ -84,7 +84,8 @@
|
|||||||
"vinyl-buffer": "^1.0.0",
|
"vinyl-buffer": "^1.0.0",
|
||||||
"vinyl-source-stream": "^1.1.0",
|
"vinyl-source-stream": "^1.1.0",
|
||||||
"watchify": "^3.1.2",
|
"watchify": "^3.1.2",
|
||||||
"yargs": "^3.10.0"
|
"yargs": "^3.10.0",
|
||||||
|
"react-star-rating": "~1.3.2"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"scriptPreprocessor": "node_modules/babel-jest",
|
"scriptPreprocessor": "node_modules/babel-jest",
|
||||||
|
@ -6,6 +6,7 @@ $BASE_URL: '<%= BASE_URL %>';
|
|||||||
@import 'ascribe_variables';
|
@import 'ascribe_variables';
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
@import '../node_modules/bootstrap-sass/assets/stylesheets/bootstrap';
|
@import '../node_modules/bootstrap-sass/assets/stylesheets/bootstrap';
|
||||||
|
@import '../node_modules/react-star-rating/dist/css/react-star-rating.min';
|
||||||
@import '../node_modules/react-datepicker/dist/react-datepicker';
|
@import '../node_modules/react-datepicker/dist/react-datepicker';
|
||||||
@import 'glyphicons-social';
|
@import 'glyphicons-social';
|
||||||
@import 'ascribe_theme';
|
@import 'ascribe_theme';
|
||||||
@ -382,3 +383,8 @@ hr {
|
|||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rating-container .rating-stars {
|
||||||
|
width: 25px;
|
||||||
|
color: #000;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user