Sha256: 29b1d8790ad1d2c9e05eabb089a9ad806b7a958346e9a1d96e959abcde786623

Contents?: true

Size: 1.72 KB

Versions: 17

Compression:

Stored size: 1.72 KB

Contents

class Menu
  def self.generate(selection)
    [continue_learning(selection), personal_report(selection), certification, featured, topics]
  end

  def self.continue_learning(selection)
    {
      links: [ { name: 'Continue Learning', url: '/', featured: true, selected: (selection == 'continue-learning')  } ]
    }
  end

  def self.personal_report(selection)
    {
      links: [ { name: 'Progress Report', url: '/report/personal', featured: true, selected: (selection == 'personal-report')  } ]
    }
  end

  def self.certification
    {
      name: 'Certification',
      links: [
        { name: 'Progress',    url: '#', featured: true, certification_badge: 'red' },
        { name: 'Essential',   url: '#', featured: true, badge: '5 courses' },
        { name: 'Elective',    url: '#', featured: true, badge: '44 points' },
        { name: 'Live Events', url: '#', featured: true }
      ]
    }
  end

  def self.featured
    {
      name: 'Featured',
      links: [
        { name: 'Popular', url: '#', featured: true },
        { name: 'Favourites', url: '#', featured: true }
      ]
    }
  end

  def self.topics
    {
      name: 'Topics',
      links: category_names.collect { |name| cat(name) }
    }
  end

  def self.category_names
    [
      "Advice",
      "Agency Best Practices",
      "Allstate Workout 1",
      "Allstate Workout 2",
      "Allstate Workout 2012",
      "Allstate Workout 3",
      "California Region",
      "Care Sell Quote Close",
      "Executive Messages",
      "Grid Square",
      "Interviews",
      "Leadership",
      "Live Events",
      "Motivation",
      "Personal Development",
      "Sales Quick Tips",
      "Woople Help"
    ]
  end

  def self.cat(name)
    { name: name, url: '#' }
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
woople-theme-0.8.2 spec/dummy/app/models/menu.rb
woople-theme-0.8.1 spec/dummy/app/models/menu.rb
woople-theme-0.8.0 spec/dummy/app/models/menu.rb
woople-theme-0.6.27 spec/dummy/app/models/menu.rb
woople-theme-0.6.26 spec/dummy/app/models/menu.rb
woople-theme-0.6.25 spec/dummy/app/models/menu.rb
woople-theme-0.6.24 spec/dummy/app/models/menu.rb
woople-theme-0.6.23 spec/dummy/app/models/menu.rb
woople-theme-0.6.22 spec/dummy/app/models/menu.rb
woople-theme-0.6.21 spec/dummy/app/models/menu.rb
woople-theme-0.6.20 spec/dummy/app/models/menu.rb
woople-theme-0.6.19 spec/dummy/app/models/menu.rb
woople-theme-0.6.18 spec/dummy/app/models/menu.rb
woople-theme-0.6.17 spec/dummy/app/models/menu.rb
woople-theme-0.6.14 spec/dummy/app/models/menu.rb
woople-theme-0.6.13 spec/dummy/app/models/menu.rb
woople-theme-0.6.12 spec/dummy/app/models/menu.rb