Sha256: 0cc96748b95c9bb26044c85086ba5b0e7fbcfd4dcca4495889eaebab2ace02fd

Contents?: true

Size: 747 Bytes

Versions: 7

Compression:

Stored size: 747 Bytes

Contents

module EducodeSales
  module SubjectHelper


    def status(d)
      d.public == 2 ? "已公开" : d.public == 1 ? "待审核" : d.status == 2 ? "已发布" : "编辑中"
    end

    def school_name(item)
      item.business ? item.business.school.name : item.school_name
    end

    # def deliver_date(item)
    #   item.business ? item.business.p_course_time : item.deliver_date.strft审核中ime("%Y-%m-%d")
    # end


    # def b_name(item)
    #   item.business ? item.business.name : ''
    # end

    def staffs(item)
      item.business ? item.business.staff.name : item.staffs_name
    end

    def manges(item)
      item.business ? item.business.business_deliver_subjects.take.subject_manages : item.manges_name
    end



  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
educode_sales-1.10.74 app/helpers/educode_sales/subject_helper.rb
educode_sales-1.10.73 app/helpers/educode_sales/subject_helper.rb
educode_sales-1.10.72 app/helpers/educode_sales/subject_helper.rb
educode_sales-1.10.71 app/helpers/educode_sales/subject_helper.rb
educode_sales-1.10.70 app/helpers/educode_sales/subject_helper.rb
educode_sales-1.10.59 app/helpers/educode_sales/subject_helper.rb
educode_sales-1.10.58 app/helpers/educode_sales/subject_helper.rb