Sha256: 9fdf45b55bcad16a6f3fe1cbe2717eb11d66cf728da3d181a278386145d37f76

Contents?: true

Size: 956 Bytes

Versions: 22

Compression:

Stored size: 956 Bytes

Contents

module MuckRakerFeedsHelper

  def add_feed(parent = nil)
    render :partial => 'parts/add_feed', :locals => {:parent => parent}
  end

  def new_feed_path_with_parent(parent, options = {})
    if parent
      feeds_path(make_parent_params(parent).merge(options))
    else
      feeds_path(options)
    end
  end

  def feed_contributor_link(feed)
    if feed.contributor_id.nil?
      admin = Feed.find_by_login('admin')
      'unknown'
    else
      link_to feed.contributor.display_name, user_path(feed.contributor_id)
    end
  end

  def sort_feeds_link(current_order, current_asc, new_order, admin = false)
    if admin == true
      admin_feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'true' || current_asc == nil)) ? 'false' : 'true')
    else
      feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'true' || current_asc == nil)) ? 'false' : 'true')
    end
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
muck-raker-0.2.11 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.10 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.9 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.8 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.7 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.6 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.5 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.4 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.3 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.2 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.2.0 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.49 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.48 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.47 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.46 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.45 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.43 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.42 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.41 app/helpers/muck_raker_feeds_helper.rb
muck-raker-0.1.40 app/helpers/muck_raker_feeds_helper.rb