mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
ordering by selected
This commit is contained in:
parent
e473b4c779
commit
65571848fb
@ -54,13 +54,20 @@ let PrizePieceList = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
let orderParams = ['artist_name', 'title'];
|
||||
if (this.state.currentUser.is_jury) {
|
||||
orderParams = ['rating', 'title'];
|
||||
}
|
||||
if (this.state.currentUser.is_judge) {
|
||||
orderParams = ['rating', 'title', 'selected'];
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<PieceList
|
||||
ref="list"
|
||||
redirectTo="register_piece"
|
||||
accordionListItemType={AccordionListItemPrize}
|
||||
orderParams={this.state.currentUser.is_jury ? ['rating', 'title'] : ['artist_name', 'title']}
|
||||
orderParams={orderParams}
|
||||
orderBy={this.state.currentUser.is_jury ? 'rating' : null}
|
||||
filterParams={null}
|
||||
customSubmitButton={this.getButtonSubmit()}/>
|
||||
|
Loading…
Reference in New Issue
Block a user