1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Move loan request action at the end of a prize to be sluice specific

This commit is contained in:
Brett Sun 2015-12-21 16:16:41 +01:00
parent 8ff747e117
commit 1cf8ca006a
4 changed files with 29 additions and 11 deletions

View File

@ -12,6 +12,8 @@ import SPPieceContainer from './simple_prize/components/ascribe_detail/prize_pie
import SPSettingsContainer from './simple_prize/components/prize_settings_container';
import SPApp from './simple_prize/prize_app';
import SluicePieceContainer from './sluice/components/sluice_detail/sluice_piece_container';
import PRApp from './portfolioreview/pr_app';
import PRLanding from './portfolioreview/components/pr_landing';
import PRRegisterPiece from './portfolioreview/components/pr_register_piece';
@ -53,7 +55,7 @@ const ROUTES = {
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
headerTitle='COLLECTION'/>
<Route path='pieces/:pieceId' component={SPPieceContainer} />
<Route path='pieces/:pieceId' component={SluicePieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />

View File

@ -6,8 +6,6 @@ import Moment from 'moment';
import StarRating from 'react-star-rating';
import SelectedPrizeLoanRequestButton from '../ascribe_buttons/selected_prize_loan_request_button';
import ReactError from '../../../../../../mixins/react_error';
import { ResourceNotFoundError } from '../../../../../../models/errors';
@ -60,12 +58,6 @@ let PrizePieceContainer = React.createClass({
mixins: [ReactError],
getDefaultProps() {
return {
selectedPrizeActionButton: SelectedPrizeLoanRequestButton
};
},
getInitialState() {
return mergeOptions(
PieceStore.getState(),

View File

@ -14,7 +14,7 @@ import ApiUrls from '../../../../../../constants/api_urls';
import { getLangText } from '../../../../../../utils/lang_utils';
const SelectedPrizeLoanRequestButton = React.createClass({
const SluiceSelectedPrizeActionButton = React.createClass({
propTypes: {
piece: React.PropTypes.object,
currentUser: React.PropTypes.object,
@ -66,4 +66,5 @@ const SelectedPrizeLoanRequestButton = React.createClass({
}
});
export default SelectedPrizeLoanRequestButton;
export default SluiceSelectedPrizeActionButton;

View File

@ -0,0 +1,23 @@
'use strict';
import React from 'react';
import SluiceSelectedPrizeActionButton from '../sluice_buttons/sluice_selected_prize_action_button';
import PrizePieceContainer from '../../../simple_prize/components/ascribe_detail/prize_piece_container';
const SluicePieceContainer = React.createClass({
propTypes: {
params: React.PropTypes.object
},
render() {
return (
<PrizePieceContainer
{...this.props}
selectedPrizeActionButton={SluiceSelectedPrizeActionButton} />
);
}
});
export default SluicePieceContainer;