Skip to content
Snippets Groups Projects
Commit 8865cd97 authored by pabois's avatar pabois
Browse files

menu

parent fb62bcb6
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ class Communication::Website::Menu::Item < ApplicationRecord
foreign_key: :parent_id,
dependent: :destroy
enum kind: { blank: 0, url: 10, page: 20 }, _prefix: :kind
enum kind: { blank: 0, url: 10, page: 20, programs: 30 }, _prefix: :kind
validates :title, presence: true
......@@ -59,6 +59,7 @@ class Communication::Website::Menu::Item < ApplicationRecord
def jekyll_target
return url if kind_url?
return about&.path if kind_page?
return '/programs' if kind_programs?
return nil if kind_blank?
end
......
......@@ -118,4 +118,5 @@ en:
kind:
blank: Title
page: Page
programs: Programs
url: URL
......@@ -118,4 +118,5 @@ fr:
kind:
blank: Titre intermédiaire
page: Page
programs: Formations
url: URL
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment