sunrise-cms 1.1.1 → 2.0.0
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/.github/workflows/tests.yml +49 -0
- data/.rubocop.yml +3 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.rdoc +5 -0
- data/Gemfile +9 -17
- data/Gemfile.lock +332 -207
- data/README.md +42 -34
- data/app/assets/config/manifest.js +1 -0
- data/app/assets/javascripts/sunrise/application.js +2 -4
- data/app/controllers/sunrise/manager_controller.rb +4 -6
- data/app/controllers/sunrise/settings_controller.rb +2 -3
- data/app/helpers/sunrise/structure_helper.rb +2 -2
- data/app/views/layouts/sunrise/application.html.erb +2 -0
- data/app/views/sunrise/manager/_field.html.erb +5 -5
- data/app/views/sunrise/manager/_form.html.erb +15 -15
- data/app/views/sunrise/manager/_header_edit.html.erb +3 -4
- data/app/views/sunrise/manager/_header_new.html.erb +3 -3
- data/app/views/sunrise/manager/_header_show.html.erb +9 -13
- data/app/views/sunrise/manager/_nested_field.html.erb +6 -6
- data/app/views/sunrise/manager/edit.html.erb +1 -1
- data/app/views/sunrise/manager/new.html.erb +1 -1
- data/app/views/sunrise/manager/structures/thumbs/_record.html.erb +19 -16
- data/app/views/sunrise/manager/thumbs/_record.html.erb +26 -22
- data/app/views/sunrise/settings/_form.html.erb +5 -5
- data/app/views/sunrise/settings/_header_edit.html.erb +3 -4
- data/config/locales/sunrise/en.yml +35 -35
- data/config/locales/sunrise/ru.yml +35 -35
- data/config/locales/sunrise/uk.yml +35 -35
- data/db/migrate/20111216144515_create_assets.rb +1 -1
- data/db/migrate/20111216144915_create_structures.rb +1 -1
- data/db/migrate/20111216145015_create_users.rb +1 -1
- data/db/migrate/20120611095315_create_settings.rb +1 -1
- data/lib/generators/sunrise/templates/config/active_record/sunrise.rb +0 -4
- data/lib/generators/sunrise/templates/config/mongoid/sunrise.rb +0 -4
- data/lib/generators/sunrise/templates/models/active_record/attachment_file.rb +0 -2
- data/lib/generators/sunrise/templates/models/active_record/avatar.rb +0 -2
- data/lib/generators/sunrise/templates/models/active_record/picture.rb +0 -2
- data/lib/generators/sunrise/templates/models/active_record/position_type.rb +4 -4
- data/lib/generators/sunrise/templates/models/active_record/role_type.rb +5 -5
- data/lib/generators/sunrise/templates/models/active_record/settings.rb +14 -2
- data/lib/generators/sunrise/templates/models/active_record/structure_type.rb +6 -6
- data/lib/generators/sunrise/templates/models/mongoid/attachment_file.rb +0 -2
- data/lib/generators/sunrise/templates/models/mongoid/avatar.rb +0 -2
- data/lib/generators/sunrise/templates/models/mongoid/picture.rb +0 -2
- data/lib/generators/sunrise/templates/models/mongoid/position_type.rb +4 -4
- data/lib/generators/sunrise/templates/models/mongoid/role_type.rb +5 -5
- data/lib/generators/sunrise/templates/models/mongoid/structure_type.rb +6 -6
- data/lib/generators/sunrise/templates/models/sunrise/sunrise_structure.rb +2 -2
- data/lib/generators/sunrise/templates/spec/controllers/pages_controller_spec.rb +2 -2
- data/lib/generators/sunrise/templates/spec/controllers/welcome_controller_spec.rb +1 -1
- data/lib/generators/sunrise/templates/spec/factories/structure_factory.rb +2 -2
- data/lib/generators/sunrise/templates/spec/factories/user_factory.rb +6 -6
- data/lib/generators/sunrise/templates/spec/spec_helper.rb +1 -1
- data/lib/generators/sunrise/templates/spec/support/helpers/controller_macros.rb +4 -4
- data/lib/generators/sunrise/templates/uploaders/attachment_file_uploader.rb +4 -0
- data/lib/generators/sunrise/templates/uploaders/avatar_uploader.rb +4 -0
- data/lib/generators/sunrise/templates/uploaders/picture_uploader.rb +4 -0
- data/lib/sunrise/abstract_model.rb +10 -0
- data/lib/sunrise/carrierwave/glue.rb +1 -7
- data/lib/sunrise/config.rb +0 -5
- data/lib/sunrise/core_ext/string.rb +0 -5
- data/lib/sunrise/engine.rb +5 -5
- data/lib/sunrise/models/ability.rb +1 -1
- data/lib/sunrise/models/position_type.rb +1 -7
- data/lib/sunrise/models/role_type.rb +4 -6
- data/lib/sunrise/models/structure.rb +3 -3
- data/lib/sunrise/models/structure_type.rb +1 -7
- data/lib/sunrise/models/user.rb +4 -4
- data/lib/sunrise/utils.rb +1 -2
- data/lib/sunrise/version.rb +1 -1
- data/lib/sunrise/views/search_wrapper.rb +1 -1
- data/sunrise-cms.gemspec +8 -11
- metadata +22 -38
- data/.rspec +0 -2
- data/lib/sunrise/carrierwave/file_size_validator.rb +0 -75
- data/lib/sunrise/utils/transliteration.rb +0 -73
@@ -13,7 +13,7 @@ en:
|
|
13
13
|
remember_me: "Remember me"
|
14
14
|
role_type_id: "Role type"
|
15
15
|
role: "Role type"
|
16
|
-
|
16
|
+
|
17
17
|
structure:
|
18
18
|
title: "Name"
|
19
19
|
title_ru: "Name (Rus)"
|
@@ -24,7 +24,7 @@ en:
|
|
24
24
|
redirect_url: "Redirect (URL)"
|
25
25
|
position_type_id: "Position"
|
26
26
|
slug: "Slug"
|
27
|
-
|
27
|
+
|
28
28
|
header:
|
29
29
|
title: "Title page"
|
30
30
|
title_ru: "Title page (Rus)"
|
@@ -35,7 +35,7 @@ en:
|
|
35
35
|
description: "Page Description"
|
36
36
|
description_ru: "Description page (Rus)"
|
37
37
|
description_en: "Page Description (eng.)"
|
38
|
-
|
38
|
+
|
39
39
|
post:
|
40
40
|
title: "Name"
|
41
41
|
title_ru: "Name (Rus)"
|
@@ -46,7 +46,7 @@ en:
|
|
46
46
|
created_at: "Date / Time"
|
47
47
|
picture: "Picture"
|
48
48
|
published_at: "Published"
|
49
|
-
|
49
|
+
|
50
50
|
page:
|
51
51
|
title: "Name"
|
52
52
|
title_ru: "Name (Rus)"
|
@@ -54,10 +54,10 @@ en:
|
|
54
54
|
content: "Content"
|
55
55
|
content_ru: "Content (Rus)"
|
56
56
|
content_en: "Contents (eng.)"
|
57
|
-
|
57
|
+
|
58
58
|
tag:
|
59
59
|
name: "Name"
|
60
|
-
|
60
|
+
|
61
61
|
feedback:
|
62
62
|
name: "Name"
|
63
63
|
email: "Email"
|
@@ -73,7 +73,7 @@ en:
|
|
73
73
|
key: "Action"
|
74
74
|
trackable: "Object"
|
75
75
|
remote_address: "IP"
|
76
|
-
|
76
|
+
|
77
77
|
manage:
|
78
78
|
title: "System <br /> Management"
|
79
79
|
go_site: "Go to site"
|
@@ -99,14 +99,14 @@ en:
|
|
99
99
|
add: "Add"
|
100
100
|
create: "Create"
|
101
101
|
cancel: "Cancel"
|
102
|
-
update: "
|
102
|
+
update: "Update"
|
103
103
|
sort: "Sort"
|
104
104
|
pictures: "Photos"
|
105
105
|
download: "Download"
|
106
106
|
close: "Close"
|
107
107
|
search: "Search"
|
108
108
|
filter: "Filter"
|
109
|
-
|
109
|
+
|
110
110
|
menu:
|
111
111
|
title: "Sections & modules"
|
112
112
|
system_messages: "System messages"
|
@@ -134,29 +134,29 @@ en:
|
|
134
134
|
panel:
|
135
135
|
main: "Sections & modules"
|
136
136
|
creates: "Creates"
|
137
|
-
|
137
|
+
|
138
138
|
settings:
|
139
139
|
title: "Settings"
|
140
140
|
mailer: "Mail"
|
141
141
|
route: "Domain"
|
142
142
|
contacts: "Contact"
|
143
|
-
|
143
|
+
|
144
144
|
locale:
|
145
145
|
ru: "Russian"
|
146
146
|
en: "English"
|
147
147
|
uk: "Ukrainian"
|
148
|
-
|
149
|
-
model_filter:
|
148
|
+
|
149
|
+
model_filter:
|
150
150
|
title: "Filter data"
|
151
151
|
filter: "Filter"
|
152
152
|
search: "Search"
|
153
153
|
clear: "Clean"
|
154
154
|
total_count: "Total"
|
155
|
-
|
155
|
+
|
156
156
|
position:
|
157
157
|
down: "Lower down"
|
158
158
|
up: "Raise Up"
|
159
|
-
|
159
|
+
|
160
160
|
buttons:
|
161
161
|
create_structure: "Create Section"
|
162
162
|
table: "Table"
|
@@ -179,7 +179,7 @@ en:
|
|
179
179
|
activate: "Activate"
|
180
180
|
unlock: "Unlock"
|
181
181
|
roles: "Raleigh"
|
182
|
-
|
182
|
+
|
183
183
|
users:
|
184
184
|
activated_at: "activation"
|
185
185
|
last_login_ip: "ip"
|
@@ -187,16 +187,16 @@ en:
|
|
187
187
|
category: "category"
|
188
188
|
name: "Name"
|
189
189
|
export: "Export"
|
190
|
-
|
190
|
+
|
191
191
|
sort:
|
192
192
|
_: "-"
|
193
193
|
created_at_desc: "by date descending"
|
194
194
|
created_at_asc: "date ascending"
|
195
195
|
name_desc: "name descending"
|
196
196
|
name_asc: "name ascending"
|
197
|
-
|
197
|
+
|
198
198
|
structure:
|
199
|
-
|
199
|
+
name:
|
200
200
|
page: "Text Page"
|
201
201
|
posts: "Blogs"
|
202
202
|
main: "Home Page"
|
@@ -208,21 +208,21 @@ en:
|
|
208
208
|
redirect: "Redirect"
|
209
209
|
tracks: "Music"
|
210
210
|
wallpapers: "Wallpaper"
|
211
|
-
group: "
|
212
|
-
|
211
|
+
group: "Pages group"
|
212
|
+
|
213
213
|
position:
|
214
214
|
default: "By default"
|
215
215
|
menu: "Main Menu"
|
216
216
|
bottom: "Below"
|
217
|
-
|
217
|
+
|
218
218
|
role:
|
219
|
-
|
219
|
+
name:
|
220
220
|
guest: "Guest"
|
221
221
|
default: "Client"
|
222
222
|
moderator: "Moderator"
|
223
223
|
admin: "Administrator"
|
224
224
|
redactor: "Editor"
|
225
|
-
|
225
|
+
|
226
226
|
tags:
|
227
227
|
sort:
|
228
228
|
_: "-"
|
@@ -230,7 +230,7 @@ en:
|
|
230
230
|
created_at_asc: "date ascending"
|
231
231
|
name_desc: "by name descending"
|
232
232
|
name_asc: "by name ascending"
|
233
|
-
|
233
|
+
|
234
234
|
posts:
|
235
235
|
sort:
|
236
236
|
_: "-"
|
@@ -238,7 +238,7 @@ en:
|
|
238
238
|
created_at_asc: "date ascending"
|
239
239
|
title_desc: "by title descending"
|
240
240
|
title_asc: "by title ascending"
|
241
|
-
|
241
|
+
|
242
242
|
sort_columns:
|
243
243
|
_: "-"
|
244
244
|
created_at_desc: "by date descending"
|
@@ -253,11 +253,11 @@ en:
|
|
253
253
|
position_asc: "for the position of the ascending"
|
254
254
|
sort_order_desc: "to sort in descending order"
|
255
255
|
sort_order_asc: "to sort in ascending order"
|
256
|
-
|
256
|
+
|
257
257
|
fileupload:
|
258
258
|
button: "Select file"
|
259
259
|
max_size: "Max size"
|
260
|
-
|
260
|
+
|
261
261
|
icons:
|
262
262
|
down: "Down"
|
263
263
|
up: "Up"
|
@@ -267,7 +267,7 @@ en:
|
|
267
267
|
|
268
268
|
groups:
|
269
269
|
meta_tags: "Meta tags"
|
270
|
-
|
270
|
+
|
271
271
|
views:
|
272
272
|
pagination:
|
273
273
|
previous: "Previous"
|
@@ -275,9 +275,9 @@ en:
|
|
275
275
|
truncate: "..."
|
276
276
|
last: "Last"
|
277
277
|
first: "First"
|
278
|
-
|
278
|
+
|
279
279
|
flash:
|
280
|
-
manage:
|
280
|
+
manage:
|
281
281
|
actions:
|
282
282
|
create:
|
283
283
|
success: "Record created successfully"
|
@@ -288,19 +288,19 @@ en:
|
|
288
288
|
destroy:
|
289
289
|
success: "Record deleted successfully"
|
290
290
|
failure: "There were errors while removing data"
|
291
|
-
|
291
|
+
|
292
292
|
users:
|
293
293
|
create:
|
294
294
|
success: "You have successfully created"
|
295
295
|
failure: "Some errors occurred while creating user"
|
296
296
|
update:
|
297
297
|
success: "Data updated successfully"
|
298
|
-
|
298
|
+
|
299
299
|
settings:
|
300
300
|
create:
|
301
301
|
success: "Successfully updated"
|
302
302
|
failure: "Errors during data retention"
|
303
|
-
|
303
|
+
|
304
304
|
pages:
|
305
305
|
create:
|
306
306
|
success: "Site successfully saved"
|
@@ -308,7 +308,7 @@ en:
|
|
308
308
|
update:
|
309
309
|
success: "Site successfully saved"
|
310
310
|
failure: "Errors during data retention"
|
311
|
-
|
311
|
+
|
312
312
|
errors:
|
313
313
|
messages:
|
314
314
|
wrong_size: "is the wrong size (should be %{file_size})"
|
@@ -13,7 +13,7 @@ ru:
|
|
13
13
|
remember_me: "Запомнить меня"
|
14
14
|
role_type_id: "Тип пользователя"
|
15
15
|
role: "Тип пользователя"
|
16
|
-
|
16
|
+
|
17
17
|
structure:
|
18
18
|
title: "Название"
|
19
19
|
title_ru: "Название (рус.)"
|
@@ -24,7 +24,7 @@ ru:
|
|
24
24
|
redirect_url: "Перенаправление (URL)"
|
25
25
|
position_type_id: "Позиция"
|
26
26
|
slug: "URL"
|
27
|
-
|
27
|
+
|
28
28
|
header:
|
29
29
|
title: "Заглавие страницы"
|
30
30
|
title_ru: "Заглавие страницы (рус.)"
|
@@ -35,7 +35,7 @@ ru:
|
|
35
35
|
description: "Описание страницы"
|
36
36
|
description_ru: "Описание страницы (рус.)"
|
37
37
|
description_en: "Описание страницы (eng.)"
|
38
|
-
|
38
|
+
|
39
39
|
post:
|
40
40
|
title: "Название"
|
41
41
|
title_ru: "Название (рус.)"
|
@@ -46,7 +46,7 @@ ru:
|
|
46
46
|
created_at: "Дата/Время"
|
47
47
|
picture: "Картинка"
|
48
48
|
published_at: "Дата публикации"
|
49
|
-
|
49
|
+
|
50
50
|
page:
|
51
51
|
title: "Название"
|
52
52
|
title_ru: "Название (рус.)"
|
@@ -54,10 +54,10 @@ ru:
|
|
54
54
|
content: "Содержание"
|
55
55
|
content_ru: "Содержание (рус.)"
|
56
56
|
content_en: "Содержание (eng.)"
|
57
|
-
|
57
|
+
|
58
58
|
tag:
|
59
59
|
name: "Название"
|
60
|
-
|
60
|
+
|
61
61
|
feedback:
|
62
62
|
name: "Имя"
|
63
63
|
email: "Email"
|
@@ -66,14 +66,14 @@ ru:
|
|
66
66
|
remote_ip: "IP адрес"
|
67
67
|
user_agent: "Версия браузера"
|
68
68
|
message: "Сообщение"
|
69
|
-
|
69
|
+
|
70
70
|
activity:
|
71
71
|
created_at: "Дата"
|
72
72
|
owner: "Пользователь"
|
73
73
|
key: "Что"
|
74
74
|
trackable: "Объект"
|
75
75
|
remote_address: "IP"
|
76
|
-
|
76
|
+
|
77
77
|
manage:
|
78
78
|
title: "Система<br />управления"
|
79
79
|
go_site: "Просмотр сайта"
|
@@ -106,7 +106,7 @@ ru:
|
|
106
106
|
close: "Закрыть"
|
107
107
|
search: "Поиск"
|
108
108
|
filter: "Фильтр"
|
109
|
-
|
109
|
+
|
110
110
|
menu:
|
111
111
|
title: "Разделы и модули"
|
112
112
|
system_messages: "Системные сообщения"
|
@@ -134,29 +134,29 @@ ru:
|
|
134
134
|
panel:
|
135
135
|
main: "Разделы и модули"
|
136
136
|
creates: "Создать"
|
137
|
-
|
137
|
+
|
138
138
|
settings:
|
139
139
|
title: "Настройки"
|
140
140
|
mailer: "Почта"
|
141
141
|
route: "Домен"
|
142
142
|
contacts: "Контакты"
|
143
|
-
|
143
|
+
|
144
144
|
locale:
|
145
145
|
ru: "русский"
|
146
146
|
en: "английский"
|
147
147
|
uk: "украинский"
|
148
|
-
|
149
|
-
model_filter:
|
148
|
+
|
149
|
+
model_filter:
|
150
150
|
title: "Фильтр данных"
|
151
151
|
filter: "Фильтр"
|
152
152
|
search: "Поиск"
|
153
153
|
clear: "Очистить"
|
154
154
|
total_count: "Всего"
|
155
|
-
|
155
|
+
|
156
156
|
position:
|
157
157
|
down: "Опустить вниз"
|
158
158
|
up: "Поднять вверх"
|
159
|
-
|
159
|
+
|
160
160
|
buttons:
|
161
161
|
create_structure: "Создать раздел"
|
162
162
|
table: "Таблица"
|
@@ -168,7 +168,7 @@ ru:
|
|
168
168
|
sort: "Сортировать"
|
169
169
|
save: "Сохранить"
|
170
170
|
cancel: "Отмена"
|
171
|
-
|
171
|
+
|
172
172
|
user:
|
173
173
|
actions: "действия"
|
174
174
|
events:
|
@@ -179,7 +179,7 @@ ru:
|
|
179
179
|
activate: "Активировать"
|
180
180
|
unlock: "Разблокировать"
|
181
181
|
roles: "Роли"
|
182
|
-
|
182
|
+
|
183
183
|
users:
|
184
184
|
activated_at: "активация"
|
185
185
|
last_login_ip: "ip"
|
@@ -187,16 +187,16 @@ ru:
|
|
187
187
|
category: "категория"
|
188
188
|
name: "Имя"
|
189
189
|
export: "Экспортировать"
|
190
|
-
|
190
|
+
|
191
191
|
sort:
|
192
192
|
_: "-"
|
193
193
|
created_at_desc: "по дате по убыванию"
|
194
194
|
created_at_asc: "по дате по возрастанию"
|
195
195
|
name_desc: "по имени по убыванию"
|
196
196
|
name_asc: "по имени по возрастанию"
|
197
|
-
|
197
|
+
|
198
198
|
structure:
|
199
|
-
|
199
|
+
name:
|
200
200
|
page: "Текстовая страничка"
|
201
201
|
posts: "Блоги"
|
202
202
|
main: "Главная страничка"
|
@@ -209,20 +209,20 @@ ru:
|
|
209
209
|
tracks: "Музыка"
|
210
210
|
wallpapers: "Обои"
|
211
211
|
group: "Група страничок"
|
212
|
-
|
212
|
+
|
213
213
|
position:
|
214
214
|
default: "По умолчанию"
|
215
215
|
menu: "Главное меню"
|
216
216
|
bottom: "Внизу"
|
217
|
-
|
217
|
+
|
218
218
|
role:
|
219
|
-
|
219
|
+
name:
|
220
220
|
guest: "Гость"
|
221
221
|
default: "Клиент"
|
222
222
|
moderator: "Модератор"
|
223
223
|
admin: "Aдминистратор"
|
224
224
|
redactor: "Редактор"
|
225
|
-
|
225
|
+
|
226
226
|
tags:
|
227
227
|
sort:
|
228
228
|
_: "-"
|
@@ -230,7 +230,7 @@ ru:
|
|
230
230
|
created_at_asc: "по дате по возрастанию"
|
231
231
|
name_desc: "по названию по убыванию"
|
232
232
|
name_asc: "по названию по возрастанию"
|
233
|
-
|
233
|
+
|
234
234
|
posts:
|
235
235
|
sort:
|
236
236
|
_: "-"
|
@@ -238,7 +238,7 @@ ru:
|
|
238
238
|
created_at_asc: "по дате по возрастанию"
|
239
239
|
title_desc: "по названию по убыванию"
|
240
240
|
title_asc: "по названию по возрастанию"
|
241
|
-
|
241
|
+
|
242
242
|
sort_columns:
|
243
243
|
_: "-"
|
244
244
|
created_at_desc: "по дате по убыванию"
|
@@ -253,11 +253,11 @@ ru:
|
|
253
253
|
position_asc: "за позицией по возрастанию"
|
254
254
|
sort_order_desc: "по сортировке по убыванию"
|
255
255
|
sort_order_asc: "по сортировке по возрастанию"
|
256
|
-
|
256
|
+
|
257
257
|
fileupload:
|
258
258
|
button: "Выберите файл"
|
259
259
|
max_size: "Макс. р."
|
260
|
-
|
260
|
+
|
261
261
|
icons:
|
262
262
|
down: "Опустить вниз"
|
263
263
|
up: "Поднять вверх"
|
@@ -267,7 +267,7 @@ ru:
|
|
267
267
|
|
268
268
|
groups:
|
269
269
|
meta_tags: "Мета теги"
|
270
|
-
|
270
|
+
|
271
271
|
views:
|
272
272
|
pagination:
|
273
273
|
previous: "Предыдущая"
|
@@ -275,9 +275,9 @@ ru:
|
|
275
275
|
truncate: "..."
|
276
276
|
last: "Последняя"
|
277
277
|
first: "Первая"
|
278
|
-
|
278
|
+
|
279
279
|
flash:
|
280
|
-
manage:
|
280
|
+
manage:
|
281
281
|
actions:
|
282
282
|
create:
|
283
283
|
success: "Запись успешно создана"
|
@@ -288,19 +288,19 @@ ru:
|
|
288
288
|
destroy:
|
289
289
|
success: "Запись успешно удалена"
|
290
290
|
failure: "Возникли ошибки при удалении данных"
|
291
|
-
|
291
|
+
|
292
292
|
users:
|
293
293
|
create:
|
294
294
|
success: "Пользователь успешно создан"
|
295
295
|
failure: "Возникли ошибки при создании пользователя"
|
296
296
|
update:
|
297
297
|
success: "Данные пользователя успешно обновлено"
|
298
|
-
|
298
|
+
|
299
299
|
settings:
|
300
300
|
create:
|
301
301
|
success: "Настройки успешно обновлены"
|
302
302
|
failure: "Возникли ошибки при сохранении данных"
|
303
|
-
|
303
|
+
|
304
304
|
pages:
|
305
305
|
create:
|
306
306
|
success: "Страничка успешно сохранена"
|
@@ -308,7 +308,7 @@ ru:
|
|
308
308
|
update:
|
309
309
|
success: "Страничка успешно сохранена"
|
310
310
|
failure: "Возникли ошибки при сохранении данных"
|
311
|
-
|
311
|
+
|
312
312
|
errors:
|
313
313
|
messages:
|
314
314
|
wrong_size: "неправильный размер (должно быть %{file_size})"
|