Add a wiki page for the Dashboard

This commit is contained in:
Patrick Gansterer 2017-10-20 12:10:54 +02:00
parent cef951e421
commit 0de7fc0da5
2 changed files with 7 additions and 0 deletions

View file

@ -28,6 +28,10 @@ class Page < ActiveRecord::Base
permalink == "Home" permalink == "Home"
end end
def self.dashboard
where(permalink: "Dashboard").first
end
def self.public_front_page def self.public_front_page
where(permalink: "Public_frontpage").first where(permalink: "Public_frontpage").first
end end

View file

@ -0,0 +1,3 @@
/ insert_after 'erb[silent]:contains("<dashboard_top_mark>")'
- if FoodsoftWiki.enabled? && (page = Page.dashboard)
= wikified_body page.body, page.title