unepwcmc/SAPI

View on GitHub
app/assets/javascripts/species/views/documents/documents_results_component.js.coffee

Summary

Maintainability
Test Coverage
Species.DocumentsResultsComponent = Ember.Component.extend
  layoutName: 'species/components/documents-results'
  tagName: 'tr'
  classNames: ['table-row']

  searchContextInfo: ( ->
    if @get('species')
      "#{@get('searchContext')} search for #{@get('species')}"
    else
      "#{@get('searchContext')} search"
  ).property('searchContext', 'species')

  signedInInfo: ( ->
    'Logged in: ' + if @get('isSignedIn')
      'yes'
    else
      'no'
  ).property('isSignedIn')