Sha256: af1d8958ad94e1aeb883ecfef3170eaf3a95972a5ddc0da5c29ab2e62931a41d

Contents?: true

Size: 1.16 KB

Versions: 8

Compression:

Stored size: 1.16 KB

Contents

if defined?(ActiveAdmin)
  ActiveAdmin.register Ecm::Courses::CourseDate do
    # menu config
    menu :parent => I18n.t('ecm.courses.active_admin.menu')
    
    form do |f|
      f.inputs do
        f.input :ecm_courses_course, :as => :select, 
                                     :collection => Ecm::Courses::Course.all.collect { |ecc| [ecc, ecc.id] }
        f.input :start_at
        f.input :end_at
        f.input :description
      end
      
      f.actions
    end
  
    index do
      selectable_column
      column :ecm_courses_course_category
      column :ecm_courses_course
      column :start_at
      column :end_at
      column :duration_in_minutes
      column :description
      default_actions
    end
    
    show :title => :to_s do
      attributes_table do
        row :ecm_courses_course_category
        row :ecm_courses_course
        row :duration_in_minutes
        row :start_at
        row :end_at        
        row :created_at
        row :updated_at        
      end
      
      panel Ecm::Courses::CourseDate.human_attribute_name(:description) do
        div do
          ecm_courses_course_date.description
        end
      end
    end
  end
end  

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ecm_courses-0.0.1 lib/ecm/courses/active_admin/ecm_courses_course_dates.rb
ecm_courses-0.0.7.pre lib/ecm/courses/active_admin/ecm_courses_course_dates.rb
ecm_courses-0.0.6.pre lib/ecm/courses/active_admin/ecm_courses_course_dates.rb
ecm_courses-0.0.5.pre lib/ecm/courses/active_admin/ecm_courses_course_dates.rb
ecm_courses-0.0.4.pre app/admin/ecm_courses_course_dates.rb
ecm_courses-0.0.3.pre app/admin/ecm_courses_course_dates.rb
ecm_courses-0.0.2.pre app/admin/ecm_courses_course_dates.rb
ecm_courses-0.0.1.pre app/admin/ecm_courses_course_dates.rb