Sha256: 068586bb08aa18078b3d9c0c5103f6b683e1cc599265564b3a02593468c757ea

Contents?: true

Size: 629 Bytes

Versions: 15

Compression:

Stored size: 629 Bytes

Contents

module Admin::TopicHelper

  def topic_path(topic)
    "/admin/forums/topic/#{topic.id}"
  end
  
  def edit_topic_path(topic)
    "/admin/forums/topic/#{topic.id}/edit"
  end

  def access_list(current, options={})
    c = current.to_i if current
    c ||= 0
    s = ""
    
    s = "<option value='0' #{'selected' if c==0}>Anyone</option>" unless options[:include_anyone]==false
  
    s += "<option value='1' #{'selected' if c==1}>Any registered user</option>"

    s += [2,3,4,5,6,7,8,9].map { |l|
      "<option value='#{l}' #{'selected' if l==c}>Level #{l} User</option>"
    }.join("") 

    return s.html_safe
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/helpers/admin/topic_helper.rb
kit_cms-2.3.20 app/helpers/admin/topic_helper.rb
kit_cms-2.3.19 app/helpers/admin/topic_helper.rb
kit_cms-2.3.18 app/helpers/admin/topic_helper.rb
kit_cms-2.3.17 app/helpers/admin/topic_helper.rb
kit_cms-2.3.16 app/helpers/admin/topic_helper.rb
kit_cms-2.3.15 app/helpers/admin/topic_helper.rb
kit_cms-2.3.14 app/helpers/admin/topic_helper.rb
kit_cms-2.3.13 app/helpers/admin/topic_helper.rb
kit_cms-2.3.11 app/helpers/admin/topic_helper.rb
kit_cms-2.3.10 app/helpers/admin/topic_helper.rb
kit_cms-2.3.9 app/helpers/admin/topic_helper.rb
kit_cms-2.3.8 app/helpers/admin/topic_helper.rb
kit_cms-2.3.7 app/helpers/admin/topic_helper.rb
kit_cms-2.3.6 app/helpers/admin/topic_helper.rb