<commit_before>_ = require 'underscore'
React = require 'react'
BS = require 'react-bootstrap'
TutorLink = require './link'

CourseGroupingLabel = require './course-grouping-label'

NoPeriods = React.createClass

  propTypes:
    courseId: React.PropTypes.string.isRequired
    noPanel:  React.PropTypes.bool
    link:  React.PropTypes.bool

  getDefaultProps: ->
    link: true

  getMessage: ->
    [
      <span key='no-periods-start'>You have no </span>
      <CourseGroupingLabel
        key='no-periods-label'
        lowercase
        courseId={@props.courseId} />
      <span key='no-periods-end'> in this course.</span>
    ]

  render: ->
    {courseId, link} = @props

    if link
      message =
        <TutorLink
          className='no-periods-text'
          to='courseSettings'
          params={{courseId}}>
          {@getMessage()}
        </TutorLink>
    else
      message =
        <span className='no-periods-text'>
          {@getMessage()}
        </span>

    if @props.noPanel
      message
    else
      <BS.Panel>
        {message}
      </BS.Panel>

module.exports = NoPeriods<commit_msg>Use updated wording for help<commit_after>_ = require 'underscore'
React = require 'react'
BS = require 'react-bootstrap'
TutorLink = require './link'
CourseGroupingLabel = require './course-grouping-label'

NoPeriods = React.createClass

  propTypes:
    courseId: React.PropTypes.string.isRequired
    noPanel:  React.PropTypes.bool
    link:  React.PropTypes.bool

  onAddSection: ->


  render: ->
    <div className="no-periods">
      <p>
        Please add at least
        one <CourseGroupingLabel courseId={@props.courseId} lowercase /> to the course.
      </p>

      <BS.Button bsStyle="primary" onClick={@onAddSection}>
        Add a <CourseGroupingLabel courseId={@props.courseId} />
      </BS.Button>

    </div>

module.exports = NoPeriods
{'fraction_non_alphanumeric': 0.1241342567927544, 'fraction_numerical': 0.0, 'mean_word_length': 2.543396226415094, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 27, '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': '5200001', 'n_tokens_mistral': 602, 'n_tokens_neox': 589, 'n_words': 125}