Merge branch 'master' of https://github.com/senaduka/ribica
This commit is contained in:
@@ -66,4 +66,5 @@ post '/cart/confirmation' do
|
||||
cart.ordered = true
|
||||
cart.save!
|
||||
end
|
||||
"OK".to_json
|
||||
end
|
||||
@@ -17,21 +17,24 @@ var RootApp = React.createClass({
|
||||
<h1 className="main-heading">
|
||||
|
||||
<Link to="app"><span style={{color: "#cd3071"}}>ribica.ba</span></Link>
|
||||
</h1> <CartIcon />
|
||||
</h1>
|
||||
<div style={{float:'right'}}>
|
||||
<div style={{display: 'inline-block'}}>
|
||||
<Link to="korpa">Završi narudžbu</Link><CartIcon /> |
|
||||
</div>
|
||||
<LoginStatus />
|
||||
</div>
|
||||
</div>
|
||||
<div className='row'>
|
||||
<div className='col-md-12' id='header'>
|
||||
<SectionsListComponent />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='row'>
|
||||
<RouteHandler />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,19 +32,17 @@ var LoginStatus = React.createClass({
|
||||
UserActions.userLogout();
|
||||
},
|
||||
render : function() {
|
||||
|
||||
|
||||
var content;
|
||||
var content;
|
||||
|
||||
if(this.state.loggedIn){
|
||||
content = (<div>Dobrodosli, {this.state.user.first_name} {this.state.user.last_name} | <a onClick={this.logout}>Odjavite se</a>
|
||||
|
||||
</div>)
|
||||
content = (<div style={{display: 'inline-block'}}>Dobrodosli, {this.state.user.first_name} {this.state.user.last_name} | <a onClick={this.logout}>Odjavite se</a></div>)
|
||||
} else {
|
||||
content = (<div>
|
||||
<Link to="registracija">Registracija</Link> | <Link to="login">Prijava</Link>
|
||||
</div>)
|
||||
content = (<div style={{display: 'inline-block'}}><Link to="registracija">Registracija</Link> | <Link to="login">Prijava</Link></div>)
|
||||
}
|
||||
return (<div>{content}</div>)
|
||||
|
||||
return content;
|
||||
}
|
||||
})
|
||||
module.exports = LoginStatus;
|
||||
|
||||
Reference in New Issue
Block a user