rocket_cms 0.8.0.pre.6 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/app/controllers/concerns/rs_menu.rb +4 -2
- data/app/controllers/concerns/rs_pages.rb +6 -1
- data/app/models/concerns/seoable.rb +4 -2
- data/lib/rocket_cms/models/page.rb +6 -2
- data/lib/rocket_cms/version.rb +1 -1
- data/template.rb +1 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bde856fee99a7ce815e3452f2df4d3db50795fdc
|
4
|
+
data.tar.gz: dded2bab36ed3115148be3ff23f77ed94bc96cdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 879158b201d8da62949347753f70e88f998b16dbf6240202806068738527742da297a58085562e10dec6d462971f435fc3e81c52e6552b7f57486298aaf19b0d
|
7
|
+
data.tar.gz: b6a0bc88d9b26853a62f961b8cb43ad2cd63ae332f12a087df95c3ab4abf7a67cdce071586b1881b7ad901adcb04239a0fef9cf902c845816e3d62cf03dfa96b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rocket_cms (0.8.0
|
4
|
+
rocket_cms (0.8.0)
|
5
5
|
addressable
|
6
6
|
coffee-rails
|
7
7
|
devise
|
@@ -160,7 +160,7 @@ GEM
|
|
160
160
|
sass-rails (>= 4.0, < 6)
|
161
161
|
rails_admin_nested_set (0.4.2)
|
162
162
|
rails_admin (~> 0.6.6)
|
163
|
-
rails_admin_settings (1.0.
|
163
|
+
rails_admin_settings (1.0.1)
|
164
164
|
rails_admin_toggleable (0.5.0)
|
165
165
|
rails_admin (~> 0.6.6)
|
166
166
|
railties (4.2.3)
|
@@ -19,7 +19,7 @@ module RsMenu
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def navigation_item(primary, item, block=nil)
|
22
|
-
url = item
|
22
|
+
url = nav_get_url(item)
|
23
23
|
if block.nil?
|
24
24
|
primary.item(item.slug, item.name, url, item.nav_options)
|
25
25
|
else
|
@@ -46,10 +46,12 @@ module RsMenu
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
def nav_get_url(item)
|
50
|
+
item.redirect.blank? ? item.fullpath : item.redirect
|
51
|
+
end
|
49
52
|
def nav_get_menu_items(type)
|
50
53
|
::Menu.find(type.to_s).pages.enabled.sorted.to_a
|
51
54
|
end
|
52
|
-
|
53
55
|
def nav_extra_data_before(type, primary)
|
54
56
|
# override for additional config or items
|
55
57
|
end
|
@@ -22,8 +22,12 @@ module RsPages
|
|
22
22
|
path = path[0..-2]
|
23
23
|
do_redirect = true
|
24
24
|
end
|
25
|
-
|
26
25
|
page = Page.enabled.where(fullpath: path).first
|
26
|
+
|
27
|
+
if page.nil? && !params[:slug].blank?
|
28
|
+
page = Page.enabled.where(fullpath: "/" + params[:slug]).first
|
29
|
+
end
|
30
|
+
|
27
31
|
if page.nil?
|
28
32
|
do_redirect = true
|
29
33
|
spath = path.chomp(File.extname(path))
|
@@ -31,6 +35,7 @@ module RsPages
|
|
31
35
|
page = Page.enabled.where(fullpath: spath).first
|
32
36
|
end
|
33
37
|
end
|
38
|
+
|
34
39
|
if !page.nil? && do_redirect
|
35
40
|
redirect_to path, status: :moved_permanently
|
36
41
|
end
|
@@ -6,11 +6,13 @@ module Seoable
|
|
6
6
|
if Seo.table_exists?
|
7
7
|
included do
|
8
8
|
has_one :seo, as: :seoable, autosave: true
|
9
|
-
after_create :create_seo
|
10
9
|
accepts_nested_attributes_for :seo
|
11
10
|
delegate *FIELDS, to: :seo
|
12
11
|
delegate *(FIELDS.map {|f| "#{f}=".to_sym }), to: :seo
|
13
|
-
|
12
|
+
alias seo_without_build seo
|
13
|
+
def seo
|
14
|
+
seo_without_build || build_seo
|
15
|
+
end
|
14
16
|
if RocketCMS.config.localize
|
15
17
|
delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations".to_sym }), to: :seo
|
16
18
|
delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations=".to_sym }), to: :seo
|
@@ -53,10 +53,14 @@ module RocketCMS
|
|
53
53
|
url.match(clean_regexp)
|
54
54
|
end
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
|
+
def regexp_prefix
|
58
|
+
""
|
59
|
+
end
|
60
|
+
|
57
61
|
def clean_regexp
|
58
62
|
if regexp.blank?
|
59
|
-
/^#{Regexp.escape(fullpath)}$/
|
63
|
+
/^#{regexp_prefix}#{Regexp.escape(fullpath)}$/
|
60
64
|
else
|
61
65
|
begin
|
62
66
|
/#{regexp}/
|
data/lib/rocket_cms/version.rb
CHANGED
data/template.rb
CHANGED
@@ -301,10 +301,7 @@ create_file 'app/assets/stylesheets/rails_admin/custom/theming.css.sass' do <<-T
|
|
301
301
|
font-size: 20px
|
302
302
|
|
303
303
|
.remove_nested_fields
|
304
|
-
|
305
|
-
z-index: 5
|
306
|
-
right: 0
|
307
|
-
left: auto
|
304
|
+
opacity: 1 !important
|
308
305
|
|
309
306
|
.model-dialog
|
310
307
|
width: 800px !important
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocket_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
@@ -494,9 +494,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
494
494
|
version: '0'
|
495
495
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
496
496
|
requirements:
|
497
|
-
- - "
|
497
|
+
- - ">="
|
498
498
|
- !ruby/object:Gem::Version
|
499
|
-
version:
|
499
|
+
version: '0'
|
500
500
|
requirements: []
|
501
501
|
rubyforge_project:
|
502
502
|
rubygems_version: 2.4.5
|