ack_rocket_cms 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -13
- data/README.md +6 -0
- data/app/controllers/concerns/rs_errors.rb +1 -1
- data/app/controllers/concerns/rs_localizeable.rb +5 -1
- data/app/controllers/concerns/rs_menu.rb +5 -2
- data/app/views/errors/_base.html.slim +1 -1
- data/app/views/news/show.html.slim +1 -1
- data/app/views/shared/_obj.html.slim +2 -2
- data/config/locales/en.rs.yml +2 -1
- data/config/locales/ru.rs.yml +2 -1
- data/lib/generators/rocket_cms/templates/admin.erb +2 -6
- data/lib/rocket_cms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e33e7acc64054a4dd51d9937ebe3d041f6feabd
|
4
|
+
data.tar.gz: ea547035e193c9a8e691588f3304787191aa790a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90706ad746c30a490c29e78ee23f5219ae7cb8ab283e222aad489f416385c15970f037eb24fca56cb368f0316ea8a1ed0597e61b4ebea0e06f4988990303563f
|
7
|
+
data.tar.gz: 7768a9ebaabb4120f7bbff96d0e4e15560e36c7fff30aa4a123af590585ef8aa84f3829372520ab20278b1da55f4b4ae38457ea93043e02f506d7aba52cbf903
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ack_rocket_cms (0.8.
|
4
|
+
ack_rocket_cms (0.8.2)
|
5
5
|
ack_rails_admin_jcrop
|
6
6
|
addressable
|
7
7
|
ckeditor
|
@@ -70,11 +70,11 @@ GEM
|
|
70
70
|
thread_safe (~> 0.3, >= 0.3.4)
|
71
71
|
tzinfo (~> 1.1)
|
72
72
|
addressable (2.3.8)
|
73
|
-
arel (6.0.
|
73
|
+
arel (6.0.3)
|
74
74
|
bcrypt (3.1.10)
|
75
|
-
bson (3.1
|
75
|
+
bson (3.2.1)
|
76
76
|
builder (3.2.2)
|
77
|
-
ckeditor (4.1.
|
77
|
+
ckeditor (4.1.3)
|
78
78
|
cocaine
|
79
79
|
orm_adapter (~> 0.5.0)
|
80
80
|
climate_control (0.0.3)
|
@@ -89,7 +89,7 @@ GEM
|
|
89
89
|
execjs
|
90
90
|
coffee-script-source (1.9.1.1)
|
91
91
|
connection_pool (2.2.0)
|
92
|
-
devise (3.5.
|
92
|
+
devise (3.5.2)
|
93
93
|
bcrypt (~> 3.0)
|
94
94
|
orm_adapter (~> 0.1)
|
95
95
|
railties (>= 3.2.6, < 5)
|
@@ -98,13 +98,13 @@ GEM
|
|
98
98
|
warden (~> 1.2.3)
|
99
99
|
erubis (2.7.0)
|
100
100
|
execjs (2.5.2)
|
101
|
-
font-awesome-rails (4.
|
101
|
+
font-awesome-rails (4.4.0.0)
|
102
102
|
railties (>= 3.2, < 5.0)
|
103
103
|
geocoder (1.2.9)
|
104
104
|
glebtv-simple_captcha (0.6.7)
|
105
|
-
globalid (0.3.
|
105
|
+
globalid (0.3.6)
|
106
106
|
activesupport (>= 4.1.0)
|
107
|
-
haml (4.0.
|
107
|
+
haml (4.0.7)
|
108
108
|
tilt
|
109
109
|
htmlentities (4.3.4)
|
110
110
|
i18n (0.7.0)
|
@@ -123,9 +123,9 @@ GEM
|
|
123
123
|
mail (2.6.3)
|
124
124
|
mime-types (>= 1.16, < 3)
|
125
125
|
mime-types (2.6.1)
|
126
|
-
mini_magick (4.2.
|
126
|
+
mini_magick (4.2.10)
|
127
127
|
mini_portile (0.6.2)
|
128
|
-
minitest (5.
|
128
|
+
minitest (5.8.0)
|
129
129
|
mongoid (4.0.2)
|
130
130
|
activemodel (~> 4.0)
|
131
131
|
moped (~> 2.0.0)
|
@@ -185,7 +185,7 @@ GEM
|
|
185
185
|
mongoid (>= 3.0)
|
186
186
|
rails (>= 3.0)
|
187
187
|
rails_admin (>= 0.5)
|
188
|
-
rails_admin_nested_set (0.4.
|
188
|
+
rails_admin_nested_set (0.4.5)
|
189
189
|
rails_admin
|
190
190
|
rails_admin_settings (1.0.1)
|
191
191
|
rails_admin_toggleable (0.5.1)
|
@@ -212,7 +212,7 @@ GEM
|
|
212
212
|
simple_form (3.1.0)
|
213
213
|
actionpack (~> 4.0)
|
214
214
|
activemodel (~> 4.0)
|
215
|
-
sitemap_generator (5.0
|
215
|
+
sitemap_generator (5.1.0)
|
216
216
|
builder
|
217
217
|
smart_excerpt (0.1.5)
|
218
218
|
activesupport
|
@@ -231,7 +231,7 @@ GEM
|
|
231
231
|
coffee-rails
|
232
232
|
tzinfo (1.2.2)
|
233
233
|
thread_safe (~> 0.1)
|
234
|
-
validates_email_format_of (1.6.
|
234
|
+
validates_email_format_of (1.6.3)
|
235
235
|
i18n
|
236
236
|
warden (1.2.3)
|
237
237
|
rack (>= 1.0)
|
data/README.md
CHANGED
@@ -117,6 +117,12 @@ or
|
|
117
117
|
gem 'hstore_translate'
|
118
118
|
```
|
119
119
|
|
120
|
+
Add ```rails_admin_mongoid_localize_field``` gem if using MongoDB:
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
gem 'rails_admin_mongoid_localize_field'
|
124
|
+
```
|
125
|
+
|
120
126
|
### Documentation
|
121
127
|
|
122
128
|
It's basically Mongoid + Rails Admin + some of my common models and controllers, capistrano config (from root repo), etc.
|
@@ -71,7 +71,7 @@ module RsErrors
|
|
71
71
|
Rails.logger.error "__________________________"
|
72
72
|
begin
|
73
73
|
if rails_admin?
|
74
|
-
render text: t('rs.errors.
|
74
|
+
render text: t('rs.errors.internal_error_full', klass: exception.class.name, message: exception.message), status: 500
|
75
75
|
return
|
76
76
|
end
|
77
77
|
rescue Exception => e
|
@@ -13,7 +13,11 @@ module RsLocalizeable
|
|
13
13
|
end
|
14
14
|
def nav_get_menu_items(type)
|
15
15
|
pages = ::Menu.find(type.to_s).pages.enabled
|
16
|
-
|
16
|
+
if RocketCMS.mongoid?
|
17
|
+
pages = pages.where(:"name.#{I18n.locale}".exists => true)
|
18
|
+
elsif RocketCMS.active_record?
|
19
|
+
pages = pages.where(["EXIST(name_translations, ?) = TRUE AND name_translations -> ? != ''", I18n.locale, I18n.locale])
|
20
|
+
end
|
17
21
|
pages.sorted.to_a
|
18
22
|
end
|
19
23
|
def nav_get_url(item)
|
@@ -33,13 +33,16 @@ module RsMenu
|
|
33
33
|
begin
|
34
34
|
nav_extra_data_before(type, primary)
|
35
35
|
items = nav_get_menu_items(type)
|
36
|
-
items.select { |i| i.parent_id.nil? && !i.name.blank? && i.enabled }
|
37
|
-
|
36
|
+
items = items.select { |i| i.parent_id.nil? && !i.name.blank? && i.enabled }
|
37
|
+
items.each do |item|
|
38
|
+
render_with_subs(items, primary, item)
|
38
39
|
end
|
39
40
|
nav_extra_data_after(type, primary)
|
40
41
|
rescue Exception => exception
|
41
42
|
Rails.logger.error exception.message
|
42
43
|
Rails.logger.error exception.backtrace.join("\n")
|
44
|
+
puts exception.message
|
45
|
+
puts exception.backtrace.join("\n")
|
43
46
|
capture_exception(exception) if respond_to?(:capture_exception)
|
44
47
|
items || []
|
45
48
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.rs-news-show
|
2
2
|
h1.rs-news-title= @news.name
|
3
3
|
.rs-news-date= l(@news.time.to_date)
|
4
|
-
.rs-news-text
|
4
|
+
.rs-news-text== @news.content
|
5
5
|
- if !RocketCMS.config.news_image_styles.nil? && @news.image?
|
6
6
|
.rs-news-image= image_tag @news.image.url(:main)
|
7
7
|
.rs-news-content
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- unless obj.nil?
|
2
2
|
.text_content
|
3
3
|
- if (!defined?(h1) || h1) && !obj.h1.blank?
|
4
|
-
|
4
|
+
h1= obj.h1
|
5
5
|
- if obj.content.blank?
|
6
6
|
- unless @seo_page.nil?
|
7
7
|
= raw @seo_page.page_content
|
@@ -18,4 +18,4 @@
|
|
18
18
|
|
19
19
|
- content_for :title do
|
20
20
|
- if obj.title
|
21
|
-
|
21
|
+
title= obj.title
|
data/config/locales/en.rs.yml
CHANGED
@@ -23,6 +23,7 @@ en:
|
|
23
23
|
errors:
|
24
24
|
title: "Error %{code}"
|
25
25
|
form_expired: "Token expired"
|
26
|
-
internal_error: "Internal error
|
26
|
+
internal_error: "Internal error"
|
27
|
+
internal_error_full: "Internal error: %{klass} %{message}"
|
27
28
|
access_denied: "Access denied"
|
28
29
|
not_found: 'The requested page was not found on this server'
|
data/config/locales/ru.rs.yml
CHANGED
@@ -23,7 +23,8 @@ ru:
|
|
23
23
|
errors:
|
24
24
|
title: "Ошибка %{code}"
|
25
25
|
form_expired: "Истекло время на заполение формы"
|
26
|
-
internal_error: "Внутренняя
|
26
|
+
internal_error: "Внутренняя ошибка"
|
27
|
+
internal_error_full: "Внутренняя ошибка: %{klass} %{message}"
|
27
28
|
access_denied: "Доступ запрещен"
|
28
29
|
not_found: 'Запрашиваемая страница была удалена, или введён некорректный адрес'
|
29
30
|
|
@@ -54,16 +54,12 @@ RailsAdmin.config do |config|
|
|
54
54
|
end
|
55
55
|
|
56
56
|
toggle
|
57
|
-
|
58
|
-
toggle_menu
|
59
|
-
sitemap
|
60
|
-
=======
|
61
|
-
toggle_menu do
|
57
|
+
toggle_menu do
|
62
58
|
visible do
|
63
59
|
['Page'].include? bindings[:abstract_model].model_name
|
64
60
|
end
|
65
61
|
end
|
66
|
-
|
62
|
+
sitemap
|
67
63
|
end
|
68
64
|
|
69
65
|
config.main_app_name = ['<%= Rails.application.class.name.split('::')[0] %>', 'Админка']
|
data/lib/rocket_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ack_rocket_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kiseliev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|