Sha256: 3e78c7d301297e9f9ff8cc93a35fd824a2e7b1ea13c689eaaa3cc551e5ed83ff
Contents?: true
Size: 911 Bytes
Versions: 12
Compression:
Stored size: 911 Bytes
Contents
# Dashboard Courses class EffectiveLearndashCoursesDatatable < Effective::Datatable filters do # Registerable should be first here, so when displayed as a simple datatable on the dashboard they only see registerable courses scope :registerable scope :all end datatable do order :title col :id, visible: false col :title do |learndash_course| learndash_course.to_s end actions_col show: false do |learndash_course| if current_user.learndash_enrollment(course: learndash_course).present? 'Registered. Please access from the home dashboard or applicant wizard.' elsif learndash_course.can_register? dropdown_link_to('Register', effective_learndash.new_learndash_course_course_registration_path(learndash_course)) end end end collection do Effective::LearndashCourse.deep.learndash_courses(user: current_user) end end
Version data entries
12 entries across 12 versions & 1 rubygems