-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.rb
executable file
·70 lines (58 loc) · 2.27 KB
/
settings.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class Settings < ActiveRecord::Base
include Skyline::Settings
include Skyline::ContentItem
referable_serialized_content :news_items_overview_page,
:news_item_detail_page,
:calendar_items_overview_page,
:results_page,
:sitemap_page,
:error404_page
page :content, :title => "Content pages" do |p|
p.description "Instellingen voor content paginas."
p.field_group :news, :title => "News" do |g|
g.field :news_item_detail_page_id do |f|
f.editor = :page_browser
f.label = ["Detail",""]
f.description = "The page used to display a news item."
end
end
p.field_group :calendar, :title => "Agenda" do |g|
g.field :calendar_items_overview_page_id do |f|
f.editor = :page_browser
f.label = ["agenda overzicht",""]
f.description = "The page used for displaying the calendar."
end
end
end
if Skyline::Configuration.solr_indexing
page :search, :title => "Search" do |p|
p.description "Settings for search"
p.field :results_page_id do |f|
f.editor = :page_browser
f.label = ["Search results",""]
f.description = "The page used for displaying search results."
end
end
end
page :specials, :title => "Special pages" do |p|
p.description "Settings for special pages"
p.field :sitemap_page_id do |f|
f.editor = :page_browser
f.label = ["Sitemap",""]
f.description = "Page used for the sitemap. The sitemap will be rendered automatically on this page."
end
p.field :error404_page_id do |f|
f.editor = :page_browser
f.label = ["404",""]
f.description = "Page used in case of a 404 error."
end
end
page :fragments, :title => "Standard fragments" do |p|
p.field :footer_fragment_id do |f|
f.editor = :list
f.list = Proc.new{|owner| [["-",nil]] + Skyline::PageFragment.ordered_by_title.all.map{|p| [p.default_variant_data.title, p.id.to_s]}}
f.label = ["Footer",""]
f.description = "This fragment will be used as the footer."
end
end
end