import React from 'react';
import {Nav, Navbar, NavItem} from 'react-bootstrap';
import {browserHistory} from 'react-router';
import {LinkContainer, IndexLinkContainer} from 'react-router-bootstrap';
import {t} from '../util.js';
import {AddIcon} from '../controls.js';

const Header = () => (
  <Navbar>
  <Navbar.Header>
      <Navbar.Brand>
        <a href="https://itenium.be" target="_blank" style={{marginTop: -4}}>
          <img src="/img/itenium.png" role="presentation" />
        </a>
      </Navbar.Brand>
    </Navbar.Header>
    <Nav>
    <IndexLinkContainer to="/quotations" data-tst="link-quotations">
      <NavItem eventKey={4}>{t('nav.quotations')}</NavItem>
    </IndexLinkContainer>
      <IndexLinkContainer to="/" data-tst="link-invoices">
        <NavItem eventKey={1}>{t('title')}</NavItem>
      </IndexLinkContainer>
      <LinkContainer to={{pathname: '/clients'}} data-tst="link-clients">
        <NavItem eventKey={3} href="#">{t('nav.clients')}</NavItem>
      </LinkContainer>
      <LinkContainer to={{pathname: '/config'}} data-tst="link-config">
        <NavItem eventKey={2} href="#">{t('nav.config')}</NavItem>
      </LinkContainer>
    </Nav>
    <button
      className="btn btn-success"
      style={{top: 8, position: 'absolute', right: 35}}
      onClick={() => browserHistory.push('/invoice/create')}>
      <AddIcon size={1} style={{marginRight: 15}} data-tst="invoice-create" />
      {t('invoice.createNew')}
    </button>
  </Navbar>
);

export default Header;

@@ -28,16 +28,24 @@
 import %7B
+Button, 
 Nav, Nav
@@ -90,30 +90,20 @@
 import %7B
-browserHistory
+Link
 %7D from '
@@ -121,24 +121,29 @@
 r';%0Aimport %7B
+Index
 LinkContaine
@@ -145,21 +145,16 @@
 tainer, 
-Index
 LinkCont
@@ -1181,49 +1181,102 @@
     
-%3Cbutton%0A      className=%22btn btn-
+  %3CLink onlyActiveOnIndex=%7Bfalse%7D to=%7B%22/invoice/create%22%7D%3E%0A          %3CButton bsStyle=%7B%22
 success%22
 %0A   
@@ -1271,22 +1271,17 @@
 success%22
-%0A     
+%7D
  style=%7B
@@ -1326,71 +1326,12 @@
 35%7D%7D
+%3E
 %0A  
-    onClick=%7B() =%3E browserHistory.push('/invoice/create')%7D%3E%0A
     
@@ -1411,16 +1411,18 @@
 %3E%0A      
+  
 %7Bt('invo
@@ -1442,22 +1442,42 @@
 ')%7D%0A
+      
     %3C/
-b
+B
 utton%3E%0A
+      %3C/Link%3E%0A
   %3C/

Move new invoice button to react router Link