           })
         ])
       }.bind(this))}
-      {isMultilingual ? null : this.addPhraseButton()}
+      {this.addPhraseButton()}
     </span>`

    else
      `<a href="" title={title} onClick={onClick}>{name}</a>`

  searchInputLinks: (isMultilingual) ->
    `<div className="row-fluid search-input-links">
      {this.searchInput("Simple", "Simple search box", this.showSimple, "simple")}&nbsp;|&nbsp;
      {this.searchInput("Extended", "Search for grammatical categories etc.", this.showMultiword, "multiword")}&nbsp;|&nbsp;
      {this.searchInput("Regexp", "Regular expressions", this.showRegex, "regex")}
      {this.searchButton(isMultilingual)}
      {isMultilingual ? this.languageAddButton() : null}
    </div>`

  render: ->
    {corpus, searchQueries, handleQueryChanged, handleSearch} = @props
    isMultilingual = corpusNs.isMultilingual(@props.corpus)

    if @state.statechart.pathContains('simple')
      component = CwbSimpleInput

    @state.statechart.handleAction('showRegex')

  languageSelect: (query) ->
    if @isMultilingual()
      `<LanguageSelect
        corpus={this.props.corpus}
        selectedValue={query.lang} />`

  languageAddButton: ->
    if @isMultilingual()
      `<button className="btn" style={{marginLeft: 20}} onClick={this.props.handleAddLanguage}>Add language</button>`

  searchButton: () ->
    marginLeft = if @isMultilingual() then 80 else 40  # adjust position relative to the language select
    `<button type="button" className="btn btn-success"
        style={{marginLeft: marginLeft}} onClick={this.props.handleSearch}>Search</button>`

  addPhraseButton: ->
    unless @isMultilingual()
      `<button className="btn add-phrase-btn" onClick={this.props.handleAddPhrase}>Or...</button>`

  updateChineseIME: ->
    $("input[type='text']").chineseInput
