Sha256: 185d32ea211dbc4545ef3f8f4024bcecd5d50b15b7367c5d556ad147ef3cd963

Contents?: true

Size: 878 Bytes

Versions: 4

Compression:

Stored size: 878 Bytes

Contents

module Admin::FeedbackHelper
  def link_to_article_edit(article)
    link_to truncate(article.title, 60), :controller => '/admin/content', :action => 'edit', :id => article.id
  end

  # Define if all_feedback is the current
  def all_feedback
    if params[:confirmed] != 'f' and params[:published] != 'f'
      return 'current'
    end
  end

  # Define if limit to spam is the current
  def limit_to_spam
    if params[:published] == 'f' and params[:confirmed] != 'f'
      return 'current'
    end
  end

  # Define if limit to unconfirmed is the current
  def limit_to_unconfirmed
    if params[:published] != 'f' and params[:confirmed] == 'f'
      return 'current'
    end
  end

  # Define if limit to unconfirmed spam is the current
  def limit_to_unconfirmed_spam
    if params[:published] == 'f' and params[:confirmed] == 'f'
      return 'current'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typo-5.1.2 app/helpers/admin/feedback_helper.rb
typo-5.1.1 app/helpers/admin/feedback_helper.rb
typo-5.1.3 app/helpers/admin/feedback_helper.rb
typo-5.1 app/helpers/admin/feedback_helper.rb