<commit_before>/** @jsx React.DOM */

var React = require('react');
var marty = require('marty');
var Link = require('react-router').Link;
var orderStore = require('../stores/orderStore.js');
var routerState = require('react-router').State;

var orderStateMixin = marty.createStateMixin({
  listenTo: orderStore,
  getState: function() {
    return orderStore.getOrder(this.getParams().id)
  }
});

module.exports = React.createClass({
  mixins: [ routerState, orderStateMixin ],
  
  render: function() {
    return this.state.when({
      pending: function() { return <div className="row">Pending</div> },
      failed: function(err) { return <div className="row">{err}</div> },
      done: function(order) {
        return <div className="row">
          <div className="page-header">
            <h1>{order.name} <small>Order {order.id}</small></h1>
          </div>
          <Link to="create-flight" params={{ id: order.id }} className="btn btn-info">
            <span className="glyphicon glyphicon-plus"></span> Flights
          </Link>
        </div>
      }
    });
  }
});<commit_msg>Moved +flights button on order page to inline with title<commit_after>/** @jsx React.DOM */

var React = require('react');
var marty = require('marty');
var Link = require('react-router').Link;
var orderStore = require('../stores/orderStore.js');
var routerState = require('react-router').State;

var orderStateMixin = marty.createStateMixin({
  listenTo: orderStore,
  getState: function() {
    return orderStore.getOrder(this.getParams().id)
  }
});

module.exports = React.createClass({
  mixins: [ routerState, orderStateMixin ],
  
  render: function() {
    return this.state.when({
      pending: function() { return <div className="row">Pending</div> },
      failed: function(err) { return <div className="row">{err}</div> },
      done: function(order) {
        return <div className="row">
          <div className="page-header">
            <h1>{order.name} <small>Order {order.id}</small>
            <Link to="create-flight" params={{ id: order.id }} className="btn btn-info pull-right">
              <span className="glyphicon glyphicon-plus"></span> Flights
            </Link>
          </h1>
          </div>
        </div>
      }
    });
  }
});
{'fraction_non_alphanumeric': 0.1704194260485651, 'fraction_numerical': 0.0017660044150110375, 'mean_word_length': 3.097649186256781, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5414417', 'n_tokens_mistral': 691, 'n_tokens_neox': 688, 'n_words': 151}