0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 20:52:40 +00:00

Adding in the print view button to the status bar

This commit is contained in:
Scott Tolksdorf
2016-01-13 17:06:09 -05:00
parent 1a3cd1d8ce
commit 8aca0ef0e8
4 changed files with 47 additions and 19 deletions

View File

@@ -11,6 +11,7 @@ var Statusbar = React.createClass({
return {
//editId: null,
shareId : null,
printId : null,
isPending : false,
lastUpdated : null,
info : null,
@@ -62,6 +63,14 @@ var Statusbar = React.createClass({
</a>
},
renderPrintButton : function(){
if(!this.props.printId) return null;
return <a className='printField' key='print' href={'/homebrew/print/' + this.props.printId} target="_blank">
Print View <i className='fa fa-print' />
</a>
},
renderStatus : function(){
if(!this.props.editId) return null;
@@ -87,6 +96,7 @@ var Statusbar = React.createClass({
<div className='controls right'>
{this.renderStatus()}
{this.renderInfo()}
{this.renderPrintButton()}
{this.renderShare()}
{this.renderNewButton()}
</div>