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

define(
  [
    'react',
    './ProjectItems.react',
    './ProjectDescription.react',
    'backbone'
  ],
  function (React, ProjectItems, ProjectDescription, Backbone) {

    return React.createClass({

      propTypes: {
        project: React.PropTypes.instanceOf(Backbone.Model).isRequired,
        projects: React.PropTypes.instanceOf(Backbone.Collection).isRequired
      },

      render: function () {
        var project = this.props.project;

        if(project.id){
          return (
            <li>
              <h2>{project.get('name')}</h2>
              <a href="#" className="btn btn-primary update-project-btn">+</a>
              <ProjectDescription project={project}/>
              <ProjectItems project={project} projects={this.props.projects}/>
            </li>
          );

        }else{
          return (
            <li>
              <h2>{project.get('name')} ...creating project...</h2>
              <div className="project-description">
                <p>{project.get('description')}</p>
              </div>
            </li>
          );
        }

      }
    });

  });
<commit_msg>add alert to show communicate feature is not implemented<commit_after>/** @jsx React.DOM */

define(
  [
    'react',
    './ProjectItems.react',
    './ProjectDescription.react',
    'backbone'
  ],
  function (React, ProjectItems, ProjectDescription, Backbone) {

    return React.createClass({

      propTypes: {
        project: React.PropTypes.instanceOf(Backbone.Model).isRequired,
        projects: React.PropTypes.instanceOf(Backbone.Collection).isRequired
      },

      onAddResourceToProject: function(e){
        e.preventDefault();
        alert("Creating resources directly in projects not yet implemented");
      },

      render: function () {
        var project = this.props.project;

        if(project.id){
          return (
            <li>
              <h2>{project.get('name')}</h2>
              <a href="#" className="btn btn-primary update-project-btn" onClick={this.onAddResourceToProject}>+</a>
              <ProjectDescription project={project}/>
              <ProjectItems project={project} projects={this.props.projects}/>
            </li>
          );

        }else{
          return (
            <li>
              <h2>{project.get('name')} ...creating project...</h2>
              <div className="project-description">
                <p>{project.get('description')}</p>
              </div>
            </li>
          );
        }

      }
    });

  });

{'fraction_non_alphanumeric': 0.1485959438377535, 'fraction_numerical': 0.0031201248049922, 'mean_word_length': 1.8280044101433297, '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': '1465197', 'n_tokens_mistral': 711, 'n_tokens_neox': 705, 'n_words': 122}