- removed our copy jquery & bootstrap. using cdn instead
- added search box to the header - made reindex rake task
This commit is contained in:
11
front-ui/app/components/shared/breadCrumbs.js
Normal file
11
front-ui/app/components/shared/breadCrumbs.js
Normal file
@@ -0,0 +1,11 @@
|
||||
var React = require('react');
|
||||
|
||||
var Breadcrumbs = React.createClass({
|
||||
render: function() {
|
||||
var bcText = "Ribica.ba -> " + this.props.text;
|
||||
|
||||
return (<div>{bcText}</div>);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Breadcrumbs;
|
||||
@@ -33,13 +33,13 @@ var LoginStatus = React.createClass({
|
||||
},
|
||||
render : function() {
|
||||
|
||||
|
||||
var content;
|
||||
|
||||
var content;
|
||||
|
||||
if(this.state.loggedIn){
|
||||
content = (<div style={{display: 'inline-block', paddingTop: '18px', paddingRight: '30px'}}>{this.state.user.first_name} {this.state.user.last_name} <a onClick={this.logout} style={{ paddingLeft: '30px' }}>Odjavite se</a></div>)
|
||||
content = (<div style={{display: 'inline-block', paddingTop: '18px', paddingRight: '10px'}}>{this.state.user.first_name} {this.state.user.last_name} <a onClick={this.logout} style={{ paddingLeft: '10px' }}>Odjavite se</a></div>)
|
||||
} else {
|
||||
content = (<div style={{display: 'inline-block', paddingTop: '18px', paddingRight: '30px'}}><Link to="registracija" style={{ paddingRight: '30px' }}>Registracija</Link> <Link to="login">Prijava</Link></div>)
|
||||
content = (<div style={{display: 'inline-block', paddingTop: '18px', paddingRight: '10px'}}><Link to="registracija" style={{ paddingRight: '10px' }}>Registracija</Link> <Link to="login">Prijava</Link></div>)
|
||||
}
|
||||
|
||||
return content;
|
||||
|
||||
@@ -36,15 +36,25 @@ var SearchBox = React.createClass({
|
||||
var enterKeyCode = 13;
|
||||
if(e.which == enterKeyCode) {
|
||||
this.doSearch();
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
render: function() {
|
||||
return (<div className="input-group">
|
||||
<input type="text" onKeyPress={this.onKeyPress} className="form-control" value={this.state.q} onChange={this.onSearchBoxChange} placeholder="Pretraga"> </input>
|
||||
<span className="input-group-btn">
|
||||
<button className="btn btn-default" type="button" onClick={this.onSearchClick}>Traži</button>
|
||||
</span>
|
||||
</div>)
|
||||
return (<form style={ {marginLeft: '60px', width: '100%'} } className="form-inline">
|
||||
<div className="left-inner-addon">
|
||||
<i className="glyphicon glyphicon-search"></i>
|
||||
<input style={{width: '75%'}} type="search" onKeyPress={this.onKeyPress}
|
||||
className="search-box form-control"
|
||||
value={this.state.q} onChange={this.onSearchBoxChange}
|
||||
aria-hidden="true">
|
||||
|
||||
</input>
|
||||
|
||||
<button className="btn btn-default search-button" type="button"
|
||||
onClick={this.onSearchClick}>Traži</button>
|
||||
|
||||
</div>
|
||||
</form>)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user