From 0de7fc0da536a2a5d2ba480c6f3c637a662dc2fe Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 20 Oct 2017 12:10:54 +0200 Subject: [PATCH] Add a wiki page for the Dashboard --- plugins/wiki/app/models/page.rb | 4 ++++ .../wiki/app/overrides/home/index/dashboard.html.haml.deface | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 plugins/wiki/app/overrides/home/index/dashboard.html.haml.deface diff --git a/plugins/wiki/app/models/page.rb b/plugins/wiki/app/models/page.rb index bd36e92c..60b62694 100644 --- a/plugins/wiki/app/models/page.rb +++ b/plugins/wiki/app/models/page.rb @@ -28,6 +28,10 @@ class Page < ActiveRecord::Base permalink == "Home" end + def self.dashboard + where(permalink: "Dashboard").first + end + def self.public_front_page where(permalink: "Public_frontpage").first end diff --git a/plugins/wiki/app/overrides/home/index/dashboard.html.haml.deface b/plugins/wiki/app/overrides/home/index/dashboard.html.haml.deface new file mode 100644 index 00000000..1dd94c89 --- /dev/null +++ b/plugins/wiki/app/overrides/home/index/dashboard.html.haml.deface @@ -0,0 +1,3 @@ +/ insert_after 'erb[silent]:contains("")' +- if FoodsoftWiki.enabled? && (page = Page.dashboard) + = wikified_body page.body, page.title