1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

register piece returns to piece detail

This commit is contained in:
diminator 2015-07-10 10:30:17 +02:00
parent 5855b163a8
commit 22b201f388
5 changed files with 7 additions and 12 deletions

View File

@ -81,7 +81,9 @@ let AccordionListItem = React.createClass({
</Link> </Link>
<h3>{getLangText('by %s', this.props.content.artist_name)}</h3> <h3>{getLangText('by %s', this.props.content.artist_name)}</h3>
<div> <div>
<span>{this.props.content.date_created.split('-')[0]}, </span> <span>{this.props.content.date_created.split('-')[0]}</span>
</div>
<div>
<AccordionListItemEditionWidget <AccordionListItemEditionWidget
piece={this.props.content}/> piece={this.props.content}/>
{/* <a href={this.props.content.license_type.url} target="_blank" className="pull-right"> {/* <a href={this.props.content.license_type.url} target="_blank" className="pull-right">

View File

@ -78,7 +78,7 @@ let AccordionListItemEditionWidget = React.createClass({
<span <span
onClick={this.toggleTable} onClick={this.toggleTable}
className="ascribe-accordion-list-item-edition-widget"> className="ascribe-accordion-list-item-edition-widget">
Create editions + Editions
</span> </span>
); );
} else if(numEditions === 1) { } else if(numEditions === 1) {
@ -91,14 +91,6 @@ let AccordionListItemEditionWidget = React.createClass({
{editionMapping + ' ' + getLangText('Edition')} {this.getGlyphicon()} {editionMapping + ' ' + getLangText('Edition')} {this.getGlyphicon()}
</span> </span>
); );
} else if(numEditions === 0){
return (
<span
onClick={this.toggleTable}
className="ascribe-accordion-list-item-edition-widget">
{'+ Editions'}
</span>
);
} }
else { else {
return ( return (

View File

@ -35,6 +35,7 @@ let Form = React.createClass({
this.refs[ref].reset(); this.refs[ref].reset();
} }
} }
this.setState(this.getInitialState());
}, },
submit(event){ submit(event){
if (event) { if (event) {

View File

@ -94,7 +94,7 @@ let RegisterPiece = React.createClass( {
this.state.orderBy, this.state.orderBy,
this.state.orderAsc); this.state.orderAsc);
this.transitionTo('piece', {editionId: response.piece.id}); this.transitionTo('piece', {pieceId: response.piece.id});
}, },
getFormData(){ getFormData(){

View File

@ -19,7 +19,7 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
border-right: 0.1em solid rgba(0,0,0,.2); border-right: 0.1em solid rgba(0,0,0,.2);
border-top: 0.1em solid rgba(0,0,0,.2); border-top: 0.1em solid rgba(0,0,0,.2);
border-radius: 1px; border-radius: 1px;
border-bottom: 0.1em solid rgba(0,0,0,0); border-bottom: 0.1em solid rgba(0,0,0,.2);
.wrapper { .wrapper {
&:hover{ &:hover{
background-color: rgba(2, 182, 163, 0.05); background-color: rgba(2, 182, 163, 0.05);