refinerycms-pages 2.0.10 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/refinery/admin/pages_controller.rb +23 -17
- data/app/controllers/refinery/admin/pages_dialogs_controller.rb +8 -45
- data/app/controllers/refinery/pages/admin/preview_controller.rb +38 -0
- data/app/controllers/refinery/pages_controller.rb +26 -43
- data/app/helpers/refinery/admin/pages_helper.rb +19 -14
- data/app/models/refinery/page.rb +133 -194
- data/app/models/refinery/page_part.rb +1 -1
- data/{lib → app/presenters}/refinery/pages/content_page_presenter.rb +1 -5
- data/{lib → app/presenters}/refinery/pages/content_presenter.rb +1 -15
- data/app/presenters/refinery/pages/menu_presenter.rb +118 -0
- data/{lib → app/presenters}/refinery/pages/page_part_section_presenter.rb +0 -0
- data/{lib → app/presenters}/refinery/pages/section_presenter.rb +0 -0
- data/{lib → app/presenters}/refinery/pages/title_section_presenter.rb +0 -0
- data/app/sweepers/refinery/pages/page_sweeper.rb +29 -0
- data/app/views/refinery/admin/pages/_form.html.erb +4 -4
- data/app/views/refinery/admin/pages/_form_advanced_options.html.erb +3 -18
- data/app/views/refinery/admin/pages/_form_page_parts.html.erb +2 -2
- data/app/views/refinery/admin/pages/_page.html.erb +5 -5
- data/app/views/refinery/admin/pages/_records.html.erb +1 -3
- data/app/views/refinery/admin/pages/_sortable_list.html.erb +1 -1
- data/app/views/refinery/admin/pages/index.html.erb +1 -1
- data/app/views/refinery/admin/pages_dialogs/link_to.html.erb +0 -2
- data/config/locales/bg.yml +0 -11
- data/config/locales/cs.yml +1 -3
- data/config/locales/da.yml +15 -5
- data/config/locales/de.yml +16 -5
- data/config/locales/el.yml +0 -3
- data/config/locales/en.yml +1 -12
- data/config/locales/es.yml +0 -3
- data/config/locales/fi.yml +0 -3
- data/config/locales/fr.yml +0 -11
- data/config/locales/hu.yml +85 -0
- data/config/locales/it.yml +0 -10
- data/config/locales/ja.yml +0 -3
- data/config/locales/ko.yml +0 -11
- data/config/locales/lt.yml +0 -3
- data/config/locales/lv.yml +0 -3
- data/config/locales/nb.yml +0 -3
- data/config/locales/nl.yml +51 -40
- data/config/locales/pl.yml +23 -4
- data/config/locales/pt-BR.yml +0 -3
- data/config/locales/pt.yml +85 -0
- data/config/locales/rs.yml +0 -3
- data/config/locales/ru.yml +0 -3
- data/config/locales/sk.yml +0 -11
- data/config/locales/sl.yml +0 -3
- data/config/locales/sv.yml +0 -3
- data/config/locales/tr.yml +85 -0
- data/config/locales/uk.yml +82 -0
- data/config/locales/vi.yml +0 -3
- data/config/locales/zh-CN.yml +8 -11
- data/config/locales/zh-TW.yml +0 -3
- data/config/routes.rb +11 -5
- data/db/seeds.rb +16 -14
- data/lib/generators/refinery/pages/templates/config/initializers/refinery/pages.rb.erb +8 -4
- data/lib/refinery/pages.rb +5 -9
- data/lib/refinery/pages/caching.rb +60 -0
- data/lib/refinery/pages/configuration.rb +11 -7
- data/lib/refinery/pages/engine.rb +7 -8
- data/lib/refinery/pages/instance_methods.rb +4 -11
- data/lib/refinery/pages/render_options.rb +27 -0
- data/lib/refinery/pages/tab.rb +15 -4
- data/lib/refinery/pages/url.rb +74 -0
- data/refinerycms-pages.gemspec +4 -3
- data/spec/controllers/refinery/pages_controller_spec.rb +24 -0
- data/spec/factories/pages.rb +1 -1
- data/spec/{requests → features}/refinery/admin/pages_spec.rb +125 -42
- data/spec/{requests → features}/refinery/pages_spec.rb +139 -23
- data/spec/helpers/refinery/pages/admin/pages_helper_spec.rb +25 -25
- data/spec/lib/refinery/pages/caching_spec.rb +90 -0
- data/spec/lib/refinery/pages/tab_spec.rb +89 -0
- data/spec/lib/refinery/pages/url_spec.rb +74 -0
- data/spec/models/refinery/page_spec.rb +196 -71
- data/spec/{lib → presenters/refinery}/pages/content_page_presenter_spec.rb +0 -0
- data/spec/{lib → presenters/refinery}/pages/content_presenter_spec.rb +0 -0
- data/spec/presenters/refinery/pages/menu_presenter_spec.rb +58 -0
- data/spec/{lib → presenters/refinery}/pages/page_part_section_presenter_spec.rb +0 -0
- data/spec/{lib → presenters/refinery}/pages/section_presenter_spec.rb +0 -0
- data/spec/{lib → presenters/refinery}/pages/title_section_presenter_spec.rb +0 -0
- data/spec/support/refinery/pages/caching.rb +19 -0
- data/spec/support/refinery/pages/caching_helpers.rb +22 -0
- metadata +77 -33
- data/app/controllers/refinery/page_sweeper.rb +0 -34
- data/app/helpers/refinery/pages_helper.rb +0 -20
- data/app/views/refinery/admin/pages/_locale_picker.html.erb +0 -11
- data/config/locales/pt-PT.yml +0 -75
- data/spec/controllers/refinery/admin/pages_controller_spec.rb +0 -17
- data/spec/helpers/refinery/pages/pages_helper_spec.rb +0 -30
File without changes
|
File without changes
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
module Pages
|
5
|
+
describe MenuPresenter do
|
6
|
+
|
7
|
+
let(:menu_presenter) do
|
8
|
+
menu_items = []
|
9
|
+
menu_items.stub(:roots)
|
10
|
+
|
11
|
+
MenuPresenter.new(menu_items, view)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "config" do
|
15
|
+
it "has default values" do
|
16
|
+
expect(menu_presenter.roots).to eq(nil)
|
17
|
+
expect(menu_presenter.dom_id).to eq("menu")
|
18
|
+
expect(menu_presenter.css).to eq("menu clearfix")
|
19
|
+
expect(menu_presenter.menu_tag).to eq(:nav)
|
20
|
+
expect(menu_presenter.list_tag).to eq(:ul)
|
21
|
+
expect(menu_presenter.list_item_tag).to eq(:li)
|
22
|
+
expect(menu_presenter.selected_css).to eq(:selected)
|
23
|
+
expect(menu_presenter.first_css).to eq(:first)
|
24
|
+
expect(menu_presenter.last_css).to eq(:last)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#roots" do
|
29
|
+
context "when #roots is configured" do
|
30
|
+
it "returns config.roots" do
|
31
|
+
menu_presenter.config.stub(:roots).and_return(["one", "two", "three"])
|
32
|
+
expect(menu_presenter.roots).to eq(["one", "two", "three"])
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "when #roots isn't configured" do
|
37
|
+
it "returns roots from passed in collection" do
|
38
|
+
menu_items = double()
|
39
|
+
menu_items.stub(:roots).and_return(["three", "two", "one"])
|
40
|
+
|
41
|
+
menu_presenter = MenuPresenter.new(menu_items, view)
|
42
|
+
expect(menu_presenter.roots).to eq(["three", "two", "one"])
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "#to_html" do
|
48
|
+
it "returns menu items wrapped in html" do
|
49
|
+
menu_items = Refinery::Menu.new(FactoryGirl.create(:page, :title => "Refinery CMS"))
|
50
|
+
|
51
|
+
menu_presenter = MenuPresenter.new(menu_items, view)
|
52
|
+
expect(menu_presenter.to_html).to eq(%Q{<nav class="menu clearfix" id="menu"><ul><li class="first last"><a href="/refinery-cms">Refinery CMS</a></li></ul></nav>})
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
config.before(:each) do
|
3
|
+
Refinery::Pages::PageSweeper.any_instance.stub(:expire_cache!)
|
4
|
+
end
|
5
|
+
|
6
|
+
config.before(:each, :caching => true) do
|
7
|
+
FileUtils.rm_rf "spec/dummy/public/refinery/cache"
|
8
|
+
ActionController::Base.perform_caching = true
|
9
|
+
Refinery::Pages.cache_pages_full = true
|
10
|
+
Refinery::Pages::PageSweeper.any_instance.stub(:cache_directory).and_return(ActionController::Base.page_cache_directory)
|
11
|
+
Refinery::Pages::PageSweeper.any_instance.unstub(:expire_cache!)
|
12
|
+
end
|
13
|
+
|
14
|
+
config.after(:each, :caching => true) do
|
15
|
+
FileUtils.rm_rf "spec/dummy/public/refinery/cache"
|
16
|
+
ActionController::Base.perform_caching = false
|
17
|
+
Refinery::Pages.cache_pages_full = false
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module CachingHelpers
|
2
|
+
def cached_directory
|
3
|
+
"spec/dummy/public/refinery/cache/pages"
|
4
|
+
end
|
5
|
+
|
6
|
+
def cached_file_path(page)
|
7
|
+
"#{cached_directory}#{refinery.page_path(page)}.html"
|
8
|
+
end
|
9
|
+
|
10
|
+
def cache_page(page)
|
11
|
+
Refinery::PagesController.any_instance.stub(:refinery_user?).and_return(false)
|
12
|
+
visit refinery.page_path(page)
|
13
|
+
Refinery::PagesController.any_instance.unstub(:refinery_user?)
|
14
|
+
end
|
15
|
+
|
16
|
+
RSpec::Matchers.define :be_cached do
|
17
|
+
match do |page|
|
18
|
+
File.exists?(cached_file_path(page))
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Arndt
|
@@ -10,8 +10,36 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: friendly_id
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 4.0.9
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 4.0.9
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: globalize3
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ~>
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.3.0
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ~>
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.3.0
|
15
43
|
- !ruby/object:Gem::Dependency
|
16
44
|
name: awesome_nested_set
|
17
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -32,28 +60,28 @@ dependencies:
|
|
32
60
|
requirements:
|
33
61
|
- - ~>
|
34
62
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.
|
63
|
+
version: 1.4.0
|
36
64
|
type: :runtime
|
37
65
|
prerelease: false
|
38
66
|
version_requirements: !ruby/object:Gem::Requirement
|
39
67
|
requirements:
|
40
68
|
- - ~>
|
41
69
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
70
|
+
version: 1.4.0
|
43
71
|
- !ruby/object:Gem::Dependency
|
44
72
|
name: refinerycms-core
|
45
73
|
requirement: !ruby/object:Gem::Requirement
|
46
74
|
requirements:
|
47
75
|
- - '='
|
48
76
|
- !ruby/object:Gem::Version
|
49
|
-
version: 2.0
|
77
|
+
version: 2.1.0
|
50
78
|
type: :runtime
|
51
79
|
prerelease: false
|
52
80
|
version_requirements: !ruby/object:Gem::Requirement
|
53
81
|
requirements:
|
54
82
|
- - '='
|
55
83
|
- !ruby/object:Gem::Version
|
56
|
-
version: 2.0
|
84
|
+
version: 2.1.0
|
57
85
|
- !ruby/object:Gem::Dependency
|
58
86
|
name: babosa
|
59
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,16 +106,22 @@ files:
|
|
78
106
|
- app/controllers/refinery/admin/page_parts_controller.rb
|
79
107
|
- app/controllers/refinery/admin/pages_controller.rb
|
80
108
|
- app/controllers/refinery/admin/pages_dialogs_controller.rb
|
81
|
-
- app/controllers/refinery/
|
109
|
+
- app/controllers/refinery/pages/admin/preview_controller.rb
|
82
110
|
- app/controllers/refinery/pages_controller.rb
|
83
111
|
- app/helpers/refinery/admin/page_parts_helper.rb
|
84
112
|
- app/helpers/refinery/admin/pages_dialogs_helper.rb
|
85
113
|
- app/helpers/refinery/admin/pages_helper.rb
|
86
114
|
- app/helpers/refinery/pages/content_pages_helper.rb
|
87
|
-
- app/helpers/refinery/pages_helper.rb
|
88
115
|
- app/models/refinery/page.rb
|
89
116
|
- app/models/refinery/page_part.rb
|
90
117
|
- app/presenters/refinery/page_presenter.rb
|
118
|
+
- app/presenters/refinery/pages/content_page_presenter.rb
|
119
|
+
- app/presenters/refinery/pages/content_presenter.rb
|
120
|
+
- app/presenters/refinery/pages/menu_presenter.rb
|
121
|
+
- app/presenters/refinery/pages/page_part_section_presenter.rb
|
122
|
+
- app/presenters/refinery/pages/section_presenter.rb
|
123
|
+
- app/presenters/refinery/pages/title_section_presenter.rb
|
124
|
+
- app/sweepers/refinery/pages/page_sweeper.rb
|
91
125
|
- app/views/refinery/admin/pages/_actions.html.erb
|
92
126
|
- app/views/refinery/admin/pages/_form.html.erb
|
93
127
|
- app/views/refinery/admin/pages/_form_advanced_options.html.erb
|
@@ -95,7 +129,6 @@ files:
|
|
95
129
|
- app/views/refinery/admin/pages/_form_fields_after_title.html.erb
|
96
130
|
- app/views/refinery/admin/pages/_form_new_page_parts.html.erb
|
97
131
|
- app/views/refinery/admin/pages/_form_page_parts.html.erb
|
98
|
-
- app/views/refinery/admin/pages/_locale_picker.html.erb
|
99
132
|
- app/views/refinery/admin/pages/_page.html.erb
|
100
133
|
- app/views/refinery/admin/pages/_page_part_field.html.erb
|
101
134
|
- app/views/refinery/admin/pages/_records.html.erb
|
@@ -118,6 +151,7 @@ files:
|
|
118
151
|
- config/locales/es.yml
|
119
152
|
- config/locales/fi.yml
|
120
153
|
- config/locales/fr.yml
|
154
|
+
- config/locales/hu.yml
|
121
155
|
- config/locales/it.yml
|
122
156
|
- config/locales/ja.yml
|
123
157
|
- config/locales/ko.yml
|
@@ -127,12 +161,14 @@ files:
|
|
127
161
|
- config/locales/nl.yml
|
128
162
|
- config/locales/pl.yml
|
129
163
|
- config/locales/pt-BR.yml
|
130
|
-
- config/locales/pt
|
164
|
+
- config/locales/pt.yml
|
131
165
|
- config/locales/rs.yml
|
132
166
|
- config/locales/ru.yml
|
133
167
|
- config/locales/sk.yml
|
134
168
|
- config/locales/sl.yml
|
135
169
|
- config/locales/sv.yml
|
170
|
+
- config/locales/tr.yml
|
171
|
+
- config/locales/uk.yml
|
136
172
|
- config/locales/vi.yml
|
137
173
|
- config/locales/zh-CN.yml
|
138
174
|
- config/locales/zh-TW.yml
|
@@ -143,35 +179,38 @@ files:
|
|
143
179
|
- lib/generators/refinery/pages/templates/config/initializers/refinery/pages.rb.erb
|
144
180
|
- lib/refinery/pages.rb
|
145
181
|
- lib/refinery/pages/admin/instance_methods.rb
|
182
|
+
- lib/refinery/pages/caching.rb
|
146
183
|
- lib/refinery/pages/configuration.rb
|
147
|
-
- lib/refinery/pages/content_page_presenter.rb
|
148
|
-
- lib/refinery/pages/content_presenter.rb
|
149
184
|
- lib/refinery/pages/engine.rb
|
150
185
|
- lib/refinery/pages/instance_methods.rb
|
151
|
-
- lib/refinery/pages/
|
152
|
-
- lib/refinery/pages/section_presenter.rb
|
186
|
+
- lib/refinery/pages/render_options.rb
|
153
187
|
- lib/refinery/pages/tab.rb
|
154
|
-
- lib/refinery/pages/title_section_presenter.rb
|
155
188
|
- lib/refinery/pages/type.rb
|
156
189
|
- lib/refinery/pages/types.rb
|
190
|
+
- lib/refinery/pages/url.rb
|
157
191
|
- lib/refinerycms-pages.rb
|
158
192
|
- license.md
|
159
193
|
- refinerycms-pages.gemspec
|
160
|
-
- spec/controllers/refinery/
|
194
|
+
- spec/controllers/refinery/pages_controller_spec.rb
|
161
195
|
- spec/factories/pages.rb
|
196
|
+
- spec/features/refinery/admin/pages_spec.rb
|
197
|
+
- spec/features/refinery/pages_spec.rb
|
162
198
|
- spec/helpers/refinery/pages/admin/pages_helper_spec.rb
|
163
199
|
- spec/helpers/refinery/pages/content_pages_helper_spec.rb
|
164
|
-
- spec/helpers/refinery/pages/pages_helper_spec.rb
|
165
200
|
- spec/lib/generators/refinery/pages/pages_generator_spec.rb
|
166
|
-
- spec/lib/pages/content_page_presenter_spec.rb
|
167
|
-
- spec/lib/pages/content_presenter_spec.rb
|
168
|
-
- spec/lib/pages/page_part_section_presenter_spec.rb
|
169
|
-
- spec/lib/pages/section_presenter_spec.rb
|
170
|
-
- spec/lib/pages/title_section_presenter_spec.rb
|
171
201
|
- spec/lib/pages_spec.rb
|
202
|
+
- spec/lib/refinery/pages/caching_spec.rb
|
203
|
+
- spec/lib/refinery/pages/tab_spec.rb
|
204
|
+
- spec/lib/refinery/pages/url_spec.rb
|
172
205
|
- spec/models/refinery/page_spec.rb
|
173
|
-
- spec/
|
174
|
-
- spec/
|
206
|
+
- spec/presenters/refinery/pages/content_page_presenter_spec.rb
|
207
|
+
- spec/presenters/refinery/pages/content_presenter_spec.rb
|
208
|
+
- spec/presenters/refinery/pages/menu_presenter_spec.rb
|
209
|
+
- spec/presenters/refinery/pages/page_part_section_presenter_spec.rb
|
210
|
+
- spec/presenters/refinery/pages/section_presenter_spec.rb
|
211
|
+
- spec/presenters/refinery/pages/title_section_presenter_spec.rb
|
212
|
+
- spec/support/refinery/pages/caching.rb
|
213
|
+
- spec/support/refinery/pages/caching_helpers.rb
|
175
214
|
homepage: http://refinerycms.com
|
176
215
|
licenses:
|
177
216
|
- MIT
|
@@ -197,18 +236,23 @@ signing_key:
|
|
197
236
|
specification_version: 4
|
198
237
|
summary: Pages extension for Refinery CMS
|
199
238
|
test_files:
|
200
|
-
- spec/controllers/refinery/
|
239
|
+
- spec/controllers/refinery/pages_controller_spec.rb
|
201
240
|
- spec/factories/pages.rb
|
241
|
+
- spec/features/refinery/admin/pages_spec.rb
|
242
|
+
- spec/features/refinery/pages_spec.rb
|
202
243
|
- spec/helpers/refinery/pages/admin/pages_helper_spec.rb
|
203
244
|
- spec/helpers/refinery/pages/content_pages_helper_spec.rb
|
204
|
-
- spec/helpers/refinery/pages/pages_helper_spec.rb
|
205
245
|
- spec/lib/generators/refinery/pages/pages_generator_spec.rb
|
206
|
-
- spec/lib/pages/content_page_presenter_spec.rb
|
207
|
-
- spec/lib/pages/content_presenter_spec.rb
|
208
|
-
- spec/lib/pages/page_part_section_presenter_spec.rb
|
209
|
-
- spec/lib/pages/section_presenter_spec.rb
|
210
|
-
- spec/lib/pages/title_section_presenter_spec.rb
|
211
246
|
- spec/lib/pages_spec.rb
|
247
|
+
- spec/lib/refinery/pages/caching_spec.rb
|
248
|
+
- spec/lib/refinery/pages/tab_spec.rb
|
249
|
+
- spec/lib/refinery/pages/url_spec.rb
|
212
250
|
- spec/models/refinery/page_spec.rb
|
213
|
-
- spec/
|
214
|
-
- spec/
|
251
|
+
- spec/presenters/refinery/pages/content_page_presenter_spec.rb
|
252
|
+
- spec/presenters/refinery/pages/content_presenter_spec.rb
|
253
|
+
- spec/presenters/refinery/pages/menu_presenter_spec.rb
|
254
|
+
- spec/presenters/refinery/pages/page_part_section_presenter_spec.rb
|
255
|
+
- spec/presenters/refinery/pages/section_presenter_spec.rb
|
256
|
+
- spec/presenters/refinery/pages/title_section_presenter_spec.rb
|
257
|
+
- spec/support/refinery/pages/caching.rb
|
258
|
+
- spec/support/refinery/pages/caching_helpers.rb
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
class PageSweeper < ActionController::Caching::Sweeper
|
3
|
-
observe Page
|
4
|
-
|
5
|
-
def after_create(page)
|
6
|
-
expire_cache
|
7
|
-
end
|
8
|
-
|
9
|
-
def after_update(page)
|
10
|
-
expire_cache
|
11
|
-
end
|
12
|
-
|
13
|
-
def after_destroy(page)
|
14
|
-
expire_cache
|
15
|
-
end
|
16
|
-
|
17
|
-
protected
|
18
|
-
def expire_cache
|
19
|
-
# TODO: Where does page_cache_directory come from??
|
20
|
-
return unless page_cache_directory
|
21
|
-
page_cache_directory_path = Pathname.new(page_cache_directory.to_s)
|
22
|
-
|
23
|
-
# Delete the full Cache
|
24
|
-
if (cache_root = page_cache_directory_path.join('refinery', 'cache', 'pages')).directory?
|
25
|
-
cache_root.rmtree
|
26
|
-
end
|
27
|
-
|
28
|
-
# Delete the pages index files (/refinery/cache/pages.html*)
|
29
|
-
Pathname.glob(page_cache_directory_path.join('refinery', 'cache', 'pages.html*')).each do |cache_index|
|
30
|
-
cache_index.delete
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module PagesHelper
|
3
|
-
|
4
|
-
def sanitize_hash(input_hash)
|
5
|
-
sanitized_hash = HashWithIndifferentAccess.new
|
6
|
-
input_hash.each do |key, value|
|
7
|
-
# ActionPack's sanitize calls html_safe on sanitized input.
|
8
|
-
sanitized_hash[key] = if value.respond_to? :html_safe
|
9
|
-
sanitize value
|
10
|
-
elsif value.respond_to? :each
|
11
|
-
sanitize_hash value
|
12
|
-
else
|
13
|
-
value
|
14
|
-
end
|
15
|
-
end
|
16
|
-
sanitized_hash
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<input type='hidden' name='switch_locale' id='switch_locale' value='<%= local_assigns[:current_locale] %>' />
|
2
|
-
<% if (locales ||= Refinery::I18n.frontend_locales).present? and locales.many? %>
|
3
|
-
<ul id='switch_locale_picker' class='clearfix'>
|
4
|
-
<% locales.each do |locale| %>
|
5
|
-
<li<%= " class='selected'".html_safe if locale.to_s == local_assigns[:current_locale].to_s %>>
|
6
|
-
<%= link_to refinery_icon_tag("flags/#{locale}.png", :size => "32x22"),
|
7
|
-
refinery.url_for(params.merge(:switch_locale => locale)) %>
|
8
|
-
</li>
|
9
|
-
<% end %>
|
10
|
-
</ul>
|
11
|
-
<% end %>
|
data/config/locales/pt-PT.yml
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
pt-PT:
|
2
|
-
refinery:
|
3
|
-
plugins:
|
4
|
-
refinery_pages:
|
5
|
-
title: Páginas
|
6
|
-
article: a
|
7
|
-
description: Gerir páginas
|
8
|
-
admin:
|
9
|
-
pages_dialogs:
|
10
|
-
page_link:
|
11
|
-
link_to_this_page: Link para esta página
|
12
|
-
link_to:
|
13
|
-
insert: Inserir
|
14
|
-
your_page:
|
15
|
-
tab_name: Sua página
|
16
|
-
web_address:
|
17
|
-
tab_name: Website
|
18
|
-
location: Localização
|
19
|
-
new_window: Nova janela
|
20
|
-
new_window_label: Marque esta opção para que o link abra uma nova janela.
|
21
|
-
not_sure: Não sabe ao certo o que colocar na caixa acima?
|
22
|
-
step1: Procure o site na web para onde quer redirecionar.
|
23
|
-
step2: "Copie o endereço do site da barra de navegação do seu browser e cole na caixa acima."
|
24
|
-
email_address:
|
25
|
-
tab_name: Endereço de email
|
26
|
-
subject_line_optional: Título opcional
|
27
|
-
body_optional: Corpo opcional
|
28
|
-
not_sure: Não sabe ao certo o que colocar na caixa acima?
|
29
|
-
step1_html: "Escreva ou copie e cole (ex. do seu catálogo de email) o endereço de email e coloque dentro do <strong>Endereço de email</strong> na caixa acima."
|
30
|
-
step2_html: "Use o <strong>Título opcional</strong> na caixa acima se você quer que a mensagem seja composta por <strong>título pré-preenchido</strong>."
|
31
|
-
step3_html: "Use o <strong>Corpo opcional</strong> na caixa acima se você quer que a mensagem seja composta por uma <strong>mensagem pré-preenchida</strong>."
|
32
|
-
your_resource:
|
33
|
-
tab_name: Seu ficheiro
|
34
|
-
link_to_this_resource: Link para este ficheiro
|
35
|
-
pages:
|
36
|
-
delete: Remover esta página para sempre
|
37
|
-
edit: Editar esta página
|
38
|
-
page:
|
39
|
-
view_live_html: Ver esta página agora <br/><em>(uma nova janela será aberta)</em>
|
40
|
-
hidden: escondida
|
41
|
-
draft: Rascunho
|
42
|
-
form_new_page_parts:
|
43
|
-
title: Título
|
44
|
-
form_page_parts:
|
45
|
-
create_content_section: Criar secção de conteúdo
|
46
|
-
delete_content_section: Apagar secção de conteúdo
|
47
|
-
form_advanced_options:
|
48
|
-
toggle_advanced_options: Clique aqui para aceder às configurações de meta tag e opções do menu
|
49
|
-
page_options: Opções de página
|
50
|
-
parent_page: Página pai
|
51
|
-
advanced_options: Opções avançadas
|
52
|
-
custom_title: Título opcional
|
53
|
-
show_in_menu_title: Mostrar no menu
|
54
|
-
show_in_menu_description: Mostra esta página no menu do site
|
55
|
-
show_in_menu_help: "Desmarque esta opção caso queira remover a página do menu do site. Pode ser útil caso queira ligar outra página a esta, mas não quer que esta apareça no menu do site."
|
56
|
-
save_as_draft: Guardar como rascunho
|
57
|
-
skip_to_first_child: Saltar esta página
|
58
|
-
skip_to_first_child_label: Redireciona os visitante para a primeira página abaixo desta no menu.
|
59
|
-
skip_to_first_child_help: "Esta opção faz com que o link desta página aponte para o primeiro link do menu abaixo dessa. Usado quando existem sub-páginas."
|
60
|
-
link_url: "Redirecionar esta página para outro site ou página."
|
61
|
-
link_url_help: "Se você quer que esta página seja redicionada para outro site ou página quando você clicar nesta página no menu, escreva o URL. ex. http://google.com ou deixe em branco."
|
62
|
-
parent_page_help: "Se você quer colocar esta página abaixo de outra página no menu, selecione aqui qual é a página ou deixe em branco caso queria a página na raiz do menu."
|
63
|
-
custom_title_help: "Se você quer que a página tenha um título diferente do que é mostrado no menu então selecione 'Texto' e escreva o novo título."
|
64
|
-
actions:
|
65
|
-
create_new_page: Criar uma nova página
|
66
|
-
reorder_pages: Reordenar as Páginas
|
67
|
-
reorder_pages_done: Terminei de reordenar as Páginas
|
68
|
-
records:
|
69
|
-
no_pages_yet: Ainda não existem páginas. Clique em "Criar Nova Página" para adicionar a sua primeira página.
|
70
|
-
activerecord:
|
71
|
-
models:
|
72
|
-
refinery/page: Página
|
73
|
-
attributes:
|
74
|
-
refinery/page:
|
75
|
-
title: Título
|