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

boilerplate for piece registration

This commit is contained in:
Tim Daubenschütz 2015-06-17 17:48:52 +02:00
parent 8a0ac74da0
commit cd9c561ddf
3 changed files with 22 additions and 0 deletions

View File

@ -1,9 +1,13 @@
'use strict';
import React from 'react';
import Router from 'react-router';
import Input from 'react-bootstrap/lib/Input';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import Button from 'react-bootstrap/lib/Button';
let Link = Router.Link;
let PieceListToolbar = React.createClass({
@ -30,6 +34,9 @@ let PieceListToolbar = React.createClass({
<Input type='text' ref="search" placeholder="Search..." onChange={this.searchFor} addonAfter={searchIcon} />
&nbsp;&nbsp;
{/*<PieceListToolbarFilterWidgetFilter />*/}
<Link to="register_piece">
<Button>+ Artwork</Button>
</Link>
</div>
</div>
</div>

View File

@ -0,0 +1,13 @@
'use strict';
import React from 'react';
let RegisterPiece = React.createClass( {
render() {
return (
<span>test</span>
);
}
});
export default RegisterPiece;

View File

@ -8,6 +8,7 @@ import PieceList from './components/piece_list';
import EditionContainer from './components/edition_container';
import PasswordResetContainer from './components/password_reset_container';
import AppConstants from './constants/application_constants';
import RegisterPiece from './components/register_piece';
//import LoginModalHandler from './components/login_modal_handler';
let Route = Router.Route;
@ -20,6 +21,7 @@ let routes = (
<Route name="pieces" path="collection" handler={PieceList} />
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
<Route name="password_reset" path="password_reset" handler={PasswordResetContainer} />
<Route name="register_piece" path="register_piece" handler={RegisterPiece} />
<Redirect from={baseUrl} to="pieces" />
<Redirect from={baseUrl + '/'} to="pieces" />