Sha256: 358837ceff0a466bbd4063decd6369c6f335f5427e1630c29fb8500b04ae7e0a

Contents?: true

Size: 959 Bytes

Versions: 33

Compression:

Stored size: 959 Bytes

Contents

module MuckServicesFeedsHelper

  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, profile_path(feed.contributor)
    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

33 entries across 33 versions & 1 rubygems

Version Path
muck-services-3.3.3 app/helpers/muck_services_feeds_helper.rb
muck-services-3.3.2 app/helpers/muck_services_feeds_helper.rb
muck-services-3.3.1 app/helpers/muck_services_feeds_helper.rb
muck-services-3.3.0 app/helpers/muck_services_feeds_helper.rb
muck-services-3.2.2 app/helpers/muck_services_feeds_helper.rb
muck-services-3.2.1 app/helpers/muck_services_feeds_helper.rb
muck-services-3.2.0 app/helpers/muck_services_feeds_helper.rb
muck-services-3.1.1 app/helpers/muck_services_feeds_helper.rb
muck-services-3.1.0 app/helpers/muck_services_feeds_helper.rb
muck-services-3.0.0 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.46 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.44 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.43 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.42 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.41 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.40 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.39 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.38 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.37 app/helpers/muck_services_feeds_helper.rb
muck-services-0.1.36 app/helpers/muck_services_feeds_helper.rb