biovision 0.0.200518.1 → 0.1.210414.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +60 -18
- data/app/assets/images/biovision/icons/back.svg +19 -0
- data/app/assets/images/biovision/icons/create.svg +19 -0
- data/app/assets/images/biovision/icons/destroy.svg +12 -0
- data/app/assets/images/biovision/icons/dropdown.svg +3 -0
- data/app/assets/images/biovision/icons/edit.svg +22 -0
- data/app/assets/images/biovision/icons/gear.svg +11 -0
- data/app/assets/images/biovision/icons/return.svg +25 -0
- data/app/assets/images/biovision/icons/world.svg +11 -0
- data/app/assets/stylesheets/biovision/admin/components.scss +3 -1
- data/app/assets/stylesheets/biovision/admin/components/users.scss +16 -0
- data/app/assets/stylesheets/biovision/admin/layout.scss +6 -17
- data/app/assets/stylesheets/biovision/biovision.scss +42 -1
- data/app/assets/stylesheets/biovision/components.scss +6 -0
- data/app/assets/stylesheets/biovision/components/breadcrumbs.scss +13 -0
- data/app/assets/stylesheets/biovision/components/buttons.scss +130 -0
- data/app/assets/stylesheets/biovision/components/forms.scss +162 -1
- data/app/assets/stylesheets/biovision/components/lists.scss +6 -7
- data/app/assets/stylesheets/biovision/{biovision → components}/messages.scss +9 -0
- data/app/assets/stylesheets/biovision/components/pagination.scss +34 -0
- data/app/assets/stylesheets/biovision/components/simple_image.scss +112 -0
- data/app/assets/stylesheets/biovision/components/toggleable.scss +71 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components.scss +2 -3
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users.scss +2 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users/form_tabs.scss +101 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users/profile.scss +77 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +2 -16
- data/app/controllers/admin/components_controller.rb +9 -19
- data/app/controllers/admin/dynamic_blocks_controller.rb +15 -0
- data/app/controllers/admin/dynamic_pages_controller.rb +15 -0
- data/app/controllers/admin/navigation_groups_controller.rb +14 -0
- data/app/controllers/admin/users_controller.rb +70 -0
- data/app/controllers/admin_controller.rb +3 -2
- data/app/controllers/authentication_controller.rb +6 -34
- data/app/controllers/concerns/authentication.rb +12 -12
- data/app/controllers/concerns/crud_entities.rb +132 -0
- data/app/controllers/concerns/entity_priority.rb +10 -0
- data/app/controllers/concerns/toggleable_entity.rb +31 -0
- data/app/controllers/contact_controller.rb +49 -0
- data/app/controllers/fallback_controller.rb +12 -0
- data/app/controllers/index_controller.rb +1 -0
- data/app/controllers/legal_controller.rb +14 -0
- data/app/controllers/my/components_controller.rb +5 -0
- data/app/controllers/my/confirmations_controller.rb +44 -0
- data/app/controllers/my/index_controller.rb +8 -0
- data/app/controllers/my/profiles_controller.rb +31 -16
- data/app/controllers/profile_controller.rb +12 -0
- data/app/controllers/users_controller.rb +61 -0
- data/app/helpers/biovision_helper.rb +171 -0
- data/app/helpers/simple_image_helper.rb +125 -0
- data/app/jobs/application_job.rb +7 -0
- data/app/jobs/send_phone_confirmation_job.rb +16 -0
- data/app/lib/biovision/components/base/component_parameters.rb +44 -0
- data/app/lib/biovision/components/base/component_privileges.rb +65 -0
- data/app/lib/biovision/components/base/component_settings.rb +32 -0
- data/app/lib/biovision/components/base/privilege_handler.rb +79 -0
- data/app/lib/biovision/components/base_component.rb +51 -54
- data/app/lib/biovision/components/contact_component.rb +22 -0
- data/app/lib/biovision/components/content_component.rb +28 -0
- data/app/lib/biovision/components/track_component.rb +3 -0
- data/app/lib/biovision/components/users/authentication.rb +15 -7
- data/app/lib/biovision/components/users/codes.rb +104 -0
- data/app/lib/biovision/components/users/flag_helpers.rb +72 -0
- data/app/lib/biovision/components/users/profile_handler.rb +111 -1
- data/app/lib/biovision/components/users/registration_handler.rb +40 -52
- data/app/lib/biovision/components/users/validation.rb +83 -0
- data/app/lib/biovision/components/users_component.rb +82 -19
- data/app/lib/biovision/notifiers/base_notifier.rb +2 -2
- data/app/lib/biovision/notifiers/contact_notifier.rb +15 -0
- data/app/lib/canonizer.rb +38 -0
- data/app/lib/carrier_wave/image_optim.rb +32 -0
- data/app/mailers/code_sender.rb +29 -0
- data/app/models/agent.rb +4 -0
- data/app/models/biovision_component.rb +22 -2
- data/app/models/browser.rb +1 -1
- data/app/models/code.rb +32 -9
- data/app/models/concerns/has_simple_image.rb +9 -0
- data/app/models/concerns/meta_texts.rb +25 -5
- data/app/models/concerns/tree_structure.rb +72 -0
- data/app/models/contact_method.rb +47 -0
- data/app/models/contact_type.rb +27 -0
- data/app/models/dynamic_block.rb +43 -0
- data/app/models/dynamic_page.rb +71 -0
- data/app/models/feedback_message.rb +59 -0
- data/app/models/feedback_response.rb +50 -0
- data/app/models/group.rb +48 -0
- data/app/models/language.rb +4 -0
- data/app/models/navigation_group.rb +33 -0
- data/app/models/navigation_group_page.rb +23 -0
- data/app/models/role.rb +56 -0
- data/app/models/role_group.rb +13 -0
- data/app/models/simple_image.rb +22 -8
- data/app/models/simple_image_tag.rb +1 -1
- data/app/models/token.rb +4 -4
- data/app/models/user.rb +94 -26
- data/app/models/user_group.rb +20 -0
- data/app/models/user_role.rb +19 -0
- data/app/uploaders/simple_file_uploader.rb +27 -0
- data/app/uploaders/simple_image_uploader.rb +20 -0
- data/app/views/admin/agents/index.html.erb +0 -2
- data/app/views/admin/components/_image.jbuilder +18 -0
- data/app/views/admin/components/_list.html.erb +1 -1
- data/app/views/admin/components/entity/_links.html.erb +1 -1
- data/app/views/admin/components/image.jbuilder +1 -0
- data/app/views/admin/components/images.jbuilder +4 -0
- data/app/views/admin/components/links/_content.html.erb +9 -0
- data/app/views/admin/components/links/_users.html.erb +1 -8
- data/app/views/admin/components/links/extra/_content.html.erb +0 -0
- data/app/views/admin/components/privileges/_links.html.erb +0 -18
- data/app/views/admin/components/settings/_new_parameter.html.erb +4 -2
- data/app/views/admin/components/settings/_parameters.html.erb +8 -2
- data/app/views/admin/components/settings/_settings.html.erb +1 -1
- data/app/views/admin/components/update_privileges.jbuilder +21 -0
- data/app/views/admin/dynamic_blocks/_form.html.erb +16 -0
- data/app/views/admin/dynamic_blocks/_nav_item.html.erb +6 -0
- data/app/views/admin/dynamic_blocks/entity/_in_list.html.erb +10 -0
- data/app/views/admin/dynamic_blocks/index.html.erb +15 -0
- data/app/views/admin/dynamic_blocks/show.html.erb +23 -0
- data/app/views/admin/dynamic_pages/_form.html.erb +21 -0
- data/app/views/admin/dynamic_pages/_nav_item.html.erb +6 -0
- data/app/views/admin/dynamic_pages/entity/_in_list.html.erb +15 -0
- data/app/views/admin/dynamic_pages/index.html.erb +15 -0
- data/app/views/admin/dynamic_pages/show.html.erb +28 -0
- data/app/views/admin/ip_addresses/index.html.erb +0 -2
- data/app/views/admin/navigation_groups/_form.html.erb +15 -0
- data/app/views/admin/navigation_groups/_nav_item.html.erb +6 -0
- data/app/views/admin/navigation_groups/entity/_in_list.html.erb +12 -0
- data/app/views/admin/navigation_groups/index.html.erb +15 -0
- data/app/views/admin/navigation_groups/show.html.erb +20 -0
- data/app/views/admin/unauthorized.html.erb +2 -5
- data/app/views/admin/users/_form.html.erb +81 -0
- data/app/views/admin/users/_nav_item.html.erb +6 -0
- data/app/views/admin/users/entity/_fields.html.erb +53 -0
- data/app/views/admin/users/entity/_in_list.html.erb +38 -0
- data/app/views/admin/users/entity/_profile.html.erb +26 -0
- data/app/views/admin/users/entity/in_list/_additional_data.html.erb +0 -0
- data/app/views/admin/users/index.html.erb +15 -0
- data/app/views/admin/users/show.html.erb +44 -0
- data/app/views/application/forbidden.html.erb +9 -0
- data/app/views/application/forbidden.jbuilder +4 -0
- data/app/views/application/not_found.html.erb +9 -0
- data/app/views/application/not_found.jbuilder +4 -0
- data/app/views/application/unauthorized.html.erb +16 -0
- data/app/views/application/unauthorized.jbuilder +4 -0
- data/app/views/authentication/new.html.erb +2 -8
- data/app/views/components/content/_dynamic_page.html.erb +21 -0
- data/app/views/components/users/_form_tabs.html.erb +31 -0
- data/app/views/components/users/_join_form.html.erb +192 -0
- data/app/views/components/users/_login_form.html.erb +45 -0
- data/app/views/components/users/form/_image.html.erb +17 -0
- data/app/views/components/users/form/_profile_data.html.erb +54 -0
- data/app/views/contact/_form.html.erb +108 -0
- data/app/views/contact/create_feedback_message.js.erb +1 -0
- data/app/views/contact/feedback.html.erb +13 -0
- data/app/views/contact/index.html.erb +16 -0
- data/app/views/fallback/show.html.erb +6 -0
- data/app/views/layouts/admin.html.erb +1 -1
- data/app/views/layouts/admin/_footer.html.erb +1 -1
- data/app/views/layouts/application/header/_authentication.html.erb +1 -1
- data/app/views/legal/privacy.html.erb +5 -0
- data/app/views/legal/tos.html.erb +5 -0
- data/app/views/my/confirmations/show.html.erb +62 -0
- data/app/views/my/index/index.html.erb +33 -0
- data/app/views/my/profiles/_form.html.erb +10 -0
- data/app/views/my/profiles/check.jbuilder +4 -0
- data/app/views/my/profiles/edit.html.erb +14 -0
- data/app/views/my/profiles/form/_basic_parameters.html.erb +9 -0
- data/app/views/my/profiles/form/_sensitive_parameters.html.erb +68 -0
- data/app/views/my/profiles/new.html.erb +6 -8
- data/app/views/my/profiles/show.html.erb +23 -0
- data/app/views/shared/_flash_messages.html.erb +1 -1
- data/app/views/shared/_list_of_errors.html.erb +7 -0
- data/app/views/shared/admin/_breadcrumbs.html.erb +8 -0
- data/app/views/shared/admin/_list.html.erb +4 -4
- data/app/views/shared/admin/_list_with_priority.html.erb +4 -4
- data/app/views/shared/admin/_priority.html.erb +5 -0
- data/app/views/shared/admin/_toggle.html.erb +11 -0
- data/app/views/shared/entity/_formatted_text_field.html.erb +10 -0
- data/app/views/shared/entity/_image.html.erb +31 -0
- data/app/views/shared/entity/_language.html.erb +6 -0
- data/app/views/shared/entity/_linked_entity.html.erb +6 -0
- data/app/views/shared/entity/_meta_texts.html.erb +16 -0
- data/app/views/shared/entity/_metadata.html.erb +18 -0
- data/app/views/shared/entity/_parent.html.erb +6 -0
- data/app/views/shared/entity/_priority.html.erb +4 -0
- data/app/views/shared/entity/_raw_text_field.html.erb +10 -0
- data/app/views/shared/entity/_simple_image.html.erb +10 -0
- data/app/views/shared/entity/_slug.html.erb +6 -0
- data/app/views/shared/entity/_text_field.html.erb +6 -0
- data/app/views/shared/entity/_text_fields.html.erb +9 -0
- data/app/views/shared/entity/_timestamps.html.erb +13 -0
- data/app/views/shared/entity/_tree_caches.html.erb +12 -0
- data/app/views/shared/entity/_uuid.html.erb +4 -0
- data/app/views/shared/entity/edit.html.erb +21 -0
- data/app/views/shared/entity/new.html.erb +16 -0
- data/app/views/shared/forms/_entity_flags.html.erb +15 -0
- data/app/views/shared/forms/_field.html.erb +46 -0
- data/app/views/shared/forms/_fields.html.erb +3 -0
- data/app/views/shared/forms/_language.html.erb +40 -0
- data/app/views/shared/forms/_meta_texts.html.erb +27 -0
- data/app/views/shared/forms/_priority.html.erb +13 -0
- data/app/views/shared/forms/_simple_image.html.erb +39 -0
- data/app/views/shared/forms/_state_container.html.erb +7 -0
- data/app/views/shared/forms/_text_area.html.erb +25 -0
- data/app/views/shared/forms/_text_field.html.erb +24 -0
- data/app/views/shared/forms/_text_fields.html.erb +3 -0
- data/app/views/shared/forms/check.jbuilder +4 -0
- data/app/views/shared/forms/errors.jbuilder +3 -0
- data/app/views/shared/forms/simple_image/_browse.html.erb +14 -0
- data/app/views/shared/forms/simple_image/_load_image.html.erb +38 -0
- data/app/views/shared/my/_list.html.erb +19 -0
- data/app/views/shared/my/_list_with_priority.html.erb +19 -0
- data/app/views/users/_profile.html.erb +30 -0
- data/app/views/users/profile/_data.html.erb +20 -0
- data/app/views/users/show.html.erb +21 -0
- data/config/locales/biovision-ru.yml +58 -0
- data/config/locales/components-ru.yml +30 -2
- data/config/locales/contact-ru.yml +106 -0
- data/config/locales/content-ru.yml +103 -0
- data/config/locales/users-ru.yml +117 -3
- data/config/routes.rb +70 -50
- data/db/migrate/20191228000000_create_biovision_components.rb +4 -5
- data/db/migrate/20200224000000_create_track_component.rb +7 -8
- data/db/migrate/20200224000010_create_users_component.rb +15 -43
- data/db/migrate/20200404000000_create_simple_images.rb +3 -3
- data/db/migrate/20200529000000_create_content_component.rb +74 -0
- data/db/migrate/20210401000000_create_contact_component.rb +95 -0
- data/db/migrate/20210405000000_create_acl.rb +74 -0
- data/lib/biovision/base_methods.rb +18 -10
- data/lib/biovision/engine.rb +8 -13
- data/lib/biovision/version.rb +1 -1
- metadata +186 -20
- data/app/assets/images/biovision/placeholders/user.svg +0 -15
- data/app/helpers/users_helper.rb +0 -11
- data/app/lib/biovision/components/component_settings.rb +0 -30
- data/app/lib/biovision/components/privilege_handler.rb +0 -77
- data/app/lib/biovision/components/users/code_handler.rb +0 -23
- data/app/models/foreign_site.rb +0 -34
- data/app/models/foreign_user.rb +0 -21
- data/app/uploaders/user_image_uploader.rb +0 -58
- data/app/views/admin/components/privileges/_privilege_flag.html.erb +0 -28
- data/app/views/authentication/_form.html.erb +0 -40
- data/app/views/authentication/failed.js.erb +0 -3
- data/app/views/my/profiles/new/_form.html.erb +0 -147
- data/app/views/shared/admin/_toggleable.html.erb +0 -8
@@ -0,0 +1,103 @@
|
|
1
|
+
ru:
|
2
|
+
page_count:
|
3
|
+
zero: "страниц нет"
|
4
|
+
one: "%{count} страница"
|
5
|
+
few: "%{count} страницы"
|
6
|
+
many: "%{count} страниц"
|
7
|
+
other: "%{count} страниц"
|
8
|
+
activerecord:
|
9
|
+
models:
|
10
|
+
dynamic_block: "Динамический блок"
|
11
|
+
dynamic_page: "Динамическая страница"
|
12
|
+
navigation_group: "Группа навигации"
|
13
|
+
navigation_group_page: "Страница в группе навигации"
|
14
|
+
attributes:
|
15
|
+
dynamic_block:
|
16
|
+
body: "Содержимое"
|
17
|
+
dynamic_page:
|
18
|
+
url: "URL"
|
19
|
+
name: "Название"
|
20
|
+
body: "Содержимое"
|
21
|
+
navigation_group:
|
22
|
+
dynamic_pages_count: "Количество динамических страниц"
|
23
|
+
name: "Название"
|
24
|
+
navigation_group_page:
|
25
|
+
navigation_group: "Группа навигации"
|
26
|
+
dynamic_page: "Динамическая страница"
|
27
|
+
admin:
|
28
|
+
dynamic_blocks:
|
29
|
+
destroy:
|
30
|
+
success: "Динамический блок удалён"
|
31
|
+
edit:
|
32
|
+
title: "Редактирование динамического блока"
|
33
|
+
nav_text: "Редактировать"
|
34
|
+
heading: "Редактирование динамического блока"
|
35
|
+
nav_item:
|
36
|
+
text: "Динамические блоки"
|
37
|
+
description: "Управление динамическими блоками"
|
38
|
+
index:
|
39
|
+
title: "Динамические блоки"
|
40
|
+
heading: "Динамические блоки"
|
41
|
+
show:
|
42
|
+
title: "Динамический блок «%{slug}»"
|
43
|
+
new:
|
44
|
+
title: "Добавление динамического блока"
|
45
|
+
nav_text: "Создать"
|
46
|
+
heading: "Новый динамический блок"
|
47
|
+
dynamic_pages:
|
48
|
+
destroy:
|
49
|
+
success: "Динамическая страница удалена"
|
50
|
+
edit:
|
51
|
+
title: "Редактирование динамической страницы"
|
52
|
+
nav_text: "Редактировать"
|
53
|
+
heading: "Редактирование динамической страницы"
|
54
|
+
index:
|
55
|
+
title: "Динамические страницы"
|
56
|
+
heading: "Динамические страницы"
|
57
|
+
nav_item:
|
58
|
+
text: "Динамические страницы"
|
59
|
+
description: "Управление динамическими страницами"
|
60
|
+
new:
|
61
|
+
title: "Добавление динамической страницы"
|
62
|
+
nav_text: "Создать"
|
63
|
+
heading: "Новая динамическая страница"
|
64
|
+
show:
|
65
|
+
title: "Динамическая страница «%{slug}»"
|
66
|
+
navigation_groups:
|
67
|
+
destroy:
|
68
|
+
success: "Группа навигации удалена"
|
69
|
+
edit:
|
70
|
+
title: "Редактирование группы навигации"
|
71
|
+
nav_text: "Редактировать"
|
72
|
+
heading: "Редактирование группы навигации"
|
73
|
+
index:
|
74
|
+
title: "Группы навигации"
|
75
|
+
heading: "Группы навигации"
|
76
|
+
nav_item:
|
77
|
+
text: "Группы навигации"
|
78
|
+
description: "Управление группами навигации"
|
79
|
+
show:
|
80
|
+
title: "Группа навигации «%{name}»"
|
81
|
+
new:
|
82
|
+
title: "Добавление группы навигации"
|
83
|
+
nav_text: "Создать"
|
84
|
+
heading: "Новая группа навигации"
|
85
|
+
biovision:
|
86
|
+
components:
|
87
|
+
content:
|
88
|
+
name: "Контент"
|
89
|
+
dynamic_blocks:
|
90
|
+
form:
|
91
|
+
guidelines:
|
92
|
+
slug: "Максимум 100 символов."
|
93
|
+
dynamic_pages:
|
94
|
+
form:
|
95
|
+
guidelines:
|
96
|
+
name: "Максимум 100 символов."
|
97
|
+
slug: "Максимум 100 символов."
|
98
|
+
url: "Максимум 100 символов."
|
99
|
+
navigation_groups:
|
100
|
+
form:
|
101
|
+
guidelines:
|
102
|
+
slug: "Максимум 100 символов."
|
103
|
+
name: "Максимум 100 символов."
|
data/config/locales/users-ru.yml
CHANGED
@@ -20,6 +20,7 @@ ru:
|
|
20
20
|
attributes:
|
21
21
|
user: "Пользователь"
|
22
22
|
user_id: "Пользователь"
|
23
|
+
user_count: "Количество пользователей"
|
23
24
|
activerecord:
|
24
25
|
models:
|
25
26
|
biovision_component_user: "Компонент для пользователя"
|
@@ -36,8 +37,10 @@ ru:
|
|
36
37
|
attributes:
|
37
38
|
email:
|
38
39
|
invalid: "не выглядит как email"
|
39
|
-
|
40
|
-
invalid: "должен содержать от
|
40
|
+
screen_name:
|
41
|
+
invalid: "должен содержать от 2 до 36 латинских букв, цифр, знаков подчёркивания или дефисов (кроме начала и конца)"
|
42
|
+
code:
|
43
|
+
invalid: "недействителен"
|
41
44
|
attributes:
|
42
45
|
biovision_component_user:
|
43
46
|
administrator: "Администратор"
|
@@ -61,6 +64,7 @@ ru:
|
|
61
64
|
balance: "Баланс"
|
62
65
|
birthday: "Дата рождения"
|
63
66
|
bot: "Это бот"
|
67
|
+
code: "Код"
|
64
68
|
consent: "Согласие на обработку персональных данных и принятие пользовательского соглашения"
|
65
69
|
email: "Email"
|
66
70
|
email_confirmed: "Email подтверждён"
|
@@ -78,6 +82,23 @@ ru:
|
|
78
82
|
screen_name: "Логин"
|
79
83
|
super_user: "Супер пользователь"
|
80
84
|
referral_link: "Реферальная ссылка"
|
85
|
+
user_profile:
|
86
|
+
gender: "Пол"
|
87
|
+
genders:
|
88
|
+
female: "Женский"
|
89
|
+
male: "Мужской"
|
90
|
+
not_set: "Не указан"
|
91
|
+
other: "Другое"
|
92
|
+
name: "Имя"
|
93
|
+
patronymic: "Отчество"
|
94
|
+
surname: "Фамилия"
|
95
|
+
about: "О себе"
|
96
|
+
guidelines:
|
97
|
+
user:
|
98
|
+
screen_name: "Только латинские буквы, цифры, знаки подчёркивания и дефис (кроме начала и конца). От 2 до 36 символов."
|
99
|
+
password: "Выберите надёжный пароль, который нельзя легко подобрать."
|
100
|
+
password_confirmation: "Повторите пароль, чтобы убедиться, что вы не ошиблись в наборе."
|
101
|
+
email: "Введите почту для обратной связи и на случай сброса пароля."
|
81
102
|
biovision:
|
82
103
|
components:
|
83
104
|
users:
|
@@ -87,13 +108,14 @@ ru:
|
|
87
108
|
settings:
|
88
109
|
bounce_count: "Максимальное количество неудачных попыток входа"
|
89
110
|
bounce_timeout: "Тайм-аут для запрета повторных попыток входа"
|
90
|
-
confirm_email: "Отправлять письмо для подтверждения почты
|
111
|
+
confirm_email: "Отправлять письмо для подтверждения почты"
|
91
112
|
email_as_login: "Использовать электронную почту в качестве логина"
|
92
113
|
invite_count: "Количество кодов приглашения после регистрации"
|
93
114
|
invite_only: "Только по приглашениям"
|
94
115
|
registration_open: "Регистрация открыта"
|
95
116
|
require_email: "Электронная почта обязательна при регистрации"
|
96
117
|
use_invites: "Использовать приглашения"
|
118
|
+
use_phone: "Использовать номер телефона"
|
97
119
|
anonymous: "Анонимно"
|
98
120
|
log_in: "Войти"
|
99
121
|
log_out: "Выйти"
|
@@ -118,6 +140,48 @@ ru:
|
|
118
140
|
title: "Регистрация закрыта"
|
119
141
|
heading: "Регистрация закрыта"
|
120
142
|
registration_is_closed: "Регистрация новых пользователей закрыта"
|
143
|
+
create:
|
144
|
+
success: "Вы зарегистрировались и вошли"
|
145
|
+
are_you_bot: "Не нужно было отмечать галочку."
|
146
|
+
show:
|
147
|
+
title: "Мой профиль"
|
148
|
+
nav_text: "Мой Профиль"
|
149
|
+
heading: "Мой профиль"
|
150
|
+
update:
|
151
|
+
success: "Профиль успешно изменён"
|
152
|
+
edit:
|
153
|
+
title: "Редактирование профиля"
|
154
|
+
nav_text: "Редактировать"
|
155
|
+
heading: "Редактирование профиля"
|
156
|
+
form:
|
157
|
+
basic_parameters:
|
158
|
+
heading: "Основные параметры"
|
159
|
+
sensitive_parameters:
|
160
|
+
heading: "Пароль и почта"
|
161
|
+
current_password: "Текущий пароль"
|
162
|
+
leave_blank_if_not_changing: "Заполняйте только если собираетесь менять параметры ниже"
|
163
|
+
sensitive_parameters_require_password: "Это связанные с безопасностью параметры. Для их изменения нужно ввести текущий пароль."
|
164
|
+
new_password: "Новый пароль"
|
165
|
+
index:
|
166
|
+
index:
|
167
|
+
title: "Личный кабинет"
|
168
|
+
nav_text: "Личный кабинет"
|
169
|
+
heading: "Личный кабинет"
|
170
|
+
email_is_not_confirmed: "Ваш адрес электронной почты не подтверждён."
|
171
|
+
confirmations:
|
172
|
+
show:
|
173
|
+
nav_text: "Подтвердить email"
|
174
|
+
title: "Подтверждение адреса электронной почты"
|
175
|
+
heading: "Подтверждение адреса электронной почты"
|
176
|
+
no_code: "Кода подтверждения нет?"
|
177
|
+
send_code: "Отправить код"
|
178
|
+
got_code: "Код подтверждения получен?"
|
179
|
+
confirm: "Подтвердить"
|
180
|
+
create:
|
181
|
+
set_email: "Укажите свой адрес электронной почты"
|
182
|
+
success: "Код подтверждения отправлен"
|
183
|
+
update:
|
184
|
+
invalid_code: "Недействительный код"
|
121
185
|
authentication:
|
122
186
|
form:
|
123
187
|
log_in: "Войти"
|
@@ -128,3 +192,53 @@ ru:
|
|
128
192
|
title: "Вход"
|
129
193
|
nav_text: "Войти"
|
130
194
|
heading: "Вход на сайт"
|
195
|
+
components:
|
196
|
+
users:
|
197
|
+
form_tabs:
|
198
|
+
login: "Вход"
|
199
|
+
join: "Регистрация"
|
200
|
+
login_form:
|
201
|
+
login: "Логин"
|
202
|
+
log_in: "Войти"
|
203
|
+
guidelines:
|
204
|
+
login: "Логин или email, указанный при регистрации"
|
205
|
+
password: "Пароль, который вы придумали"
|
206
|
+
join_form:
|
207
|
+
invitation_code: "Пригласительный код"
|
208
|
+
i_am_bot: "НЕ ОТМЕЧАЙТЕ эту галочку"
|
209
|
+
join: "Зарегистрироваться"
|
210
|
+
closed: "Регистрация новых пользователей закрыта"
|
211
|
+
settings:
|
212
|
+
bounce_count: "Количество неудачных попыток входа перед блокировкой"
|
213
|
+
bounce_timeout: "Тайм-аут для попыток входа"
|
214
|
+
confirm_email: "Подтверждать почту"
|
215
|
+
confirm_phone: "Подтверждать телефон"
|
216
|
+
email_as_login: "Почта в качестве логина"
|
217
|
+
invite_count: "Количество приглашений при регистрации"
|
218
|
+
invite_only: "Регистрация только по приглашениям"
|
219
|
+
registration_open: "Регистрация открыта"
|
220
|
+
phone_as_login: "Телефон в качестве логина"
|
221
|
+
require_email: "Почта обязательна"
|
222
|
+
require_phone: "Телефон обязателен"
|
223
|
+
skip_screen_name_validation: "Не проверять логин"
|
224
|
+
use_invites: "Использовать пришлашения"
|
225
|
+
use_phone: "Использовать телефон"
|
226
|
+
admin:
|
227
|
+
users:
|
228
|
+
nav_item:
|
229
|
+
description: "Управление пользователями сайта"
|
230
|
+
text: "Список пользователей"
|
231
|
+
index:
|
232
|
+
title: "Пользователи, страница %{page}"
|
233
|
+
heading: "Пользователи"
|
234
|
+
show:
|
235
|
+
title: "Пользователь %{name}"
|
236
|
+
deleted: "Пользователь удалён"
|
237
|
+
destroy:
|
238
|
+
success: "Пользователь удалён"
|
239
|
+
users:
|
240
|
+
profile:
|
241
|
+
registration_date: "Дата регистрации"
|
242
|
+
show:
|
243
|
+
this_is_you: "Это вы"
|
244
|
+
breadcrumb: "Пользователь %{name}"
|
data/config/routes.rb
CHANGED
@@ -5,71 +5,91 @@ Rails.application.routes.draw do
|
|
5
5
|
post :check, on: :collection, defaults: { format: :json }
|
6
6
|
end
|
7
7
|
|
8
|
+
concern :priority do
|
9
|
+
post :priority, on: :member, defaults: { format: :json }
|
10
|
+
end
|
11
|
+
|
8
12
|
concern :toggle do
|
9
13
|
post :toggle, on: :member, defaults: { format: :json }
|
10
14
|
end
|
11
15
|
|
12
|
-
|
13
|
-
|
16
|
+
# Handling errors
|
17
|
+
match '/400' => 'errors#bad_request', via: :all
|
18
|
+
match '/401' => 'errors#unauthorized', via: :all
|
19
|
+
match '/403' => 'errors#forbidden', via: :all
|
20
|
+
match '/404' => 'errors#not_found', via: :all
|
21
|
+
match '/422' => 'errors#unprocessable_entity', via: :all
|
22
|
+
match '/500' => 'errors#internal_server_error', via: :all
|
23
|
+
|
24
|
+
# Contact component
|
25
|
+
scope 'contact', controller: :contact do
|
26
|
+
get '/' => :index, as: :contact
|
27
|
+
get 'feedback'
|
28
|
+
post 'feedback_messages' => :create_feedback_message
|
14
29
|
end
|
15
30
|
|
16
|
-
|
17
|
-
|
31
|
+
controller :legal do
|
32
|
+
get 'tos'
|
33
|
+
get 'privacy'
|
18
34
|
end
|
19
35
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
36
|
+
# Users component
|
37
|
+
controller :authentication do
|
38
|
+
get 'login' => :new
|
39
|
+
post 'login' => :create
|
40
|
+
delete 'logout' => :destroy
|
25
41
|
end
|
26
42
|
|
27
|
-
scope '
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
match '/500' => 'errors#internal_server_error', via: :all
|
35
|
-
|
36
|
-
controller :authentication do
|
37
|
-
get 'login' => :new
|
38
|
-
post 'login' => :create
|
39
|
-
delete 'logout' => :destroy
|
40
|
-
get 'auth/:provider/callback' => :auth_callback, as: :auth_callback
|
41
|
-
end
|
43
|
+
scope 'u/:slug', controller: :users, constraints: { slug: %r{[^/]+} } do
|
44
|
+
get '/' => :show, as: :user
|
45
|
+
put 'follow' => :follow, as: :follow_user
|
46
|
+
delete 'follow' => :unfollow, as: nil
|
47
|
+
put 'ban' => :ban, as: :ban_user
|
48
|
+
delete 'ban' => :unban, as: nil
|
49
|
+
end
|
42
50
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
scope :components, controller: :components do
|
47
|
-
get '/' => :index, as: :components
|
48
|
-
scope ':slug' do
|
49
|
-
get '/' => :show, as: :component
|
50
|
-
get 'settings' => :settings, as: :component_settings
|
51
|
-
patch 'settings' => :update_settings, as: nil
|
52
|
-
patch 'parameters' => :update_parameter, as: :component_parameters
|
53
|
-
get 'privileges' => :privileges, as: :component_privileges
|
54
|
-
patch 'privileges' => :update_privileges, as: nil
|
55
|
-
put 'administrators/:user_id' => :add_administrator, as: :component_administrators
|
56
|
-
delete 'administrators/:user_id' => :remove_administrator, as: nil
|
57
|
-
put 'users/:user_id/privileges/:privilege_slug' => :add_privilege, as: :component_privilege
|
58
|
-
delete 'users/:user_id/privileges/:privilege_slug' => :remove_privilege, as: nil
|
59
|
-
get 'images' => :images, as: :component_images
|
60
|
-
post 'images' => :create_image, as: nil
|
61
|
-
post 'ckeditor'
|
62
|
-
end
|
63
|
-
end
|
51
|
+
namespace :admin do
|
52
|
+
get '/' => 'index#index'
|
64
53
|
|
65
|
-
|
54
|
+
scope :components, controller: :components do
|
55
|
+
get '/' => :index, as: :components
|
56
|
+
scope ':slug' do
|
57
|
+
get '/' => :show, as: :component
|
58
|
+
get 'settings' => :settings, as: :component_settings
|
59
|
+
patch 'settings' => :update_settings, as: nil
|
60
|
+
patch 'parameters' => :update_parameter, as: :component_parameters
|
61
|
+
get 'privileges' => :privileges, as: :component_privileges
|
62
|
+
patch 'privileges' => :update_privileges, as: nil
|
63
|
+
put 'administrators/:user_id' => :add_administrator, as: :component_administrators
|
64
|
+
delete 'administrators/:user_id' => :remove_administrator, as: nil
|
65
|
+
get 'images' => :images, as: :component_images
|
66
|
+
post 'images' => :create_image, as: nil
|
67
|
+
post 'ckeditor'
|
68
|
+
end
|
66
69
|
end
|
67
70
|
|
68
|
-
|
69
|
-
|
71
|
+
# Track component
|
72
|
+
resources :agents, :ip_addresses, only: :index
|
70
73
|
|
71
|
-
|
72
|
-
|
74
|
+
# Content component
|
75
|
+
resources :dynamic_pages, :dynamic_blocks, concerns: %i[check toggle]
|
76
|
+
resources :navigation_groups, concerns: :check do
|
77
|
+
member do
|
78
|
+
put 'dynamic_pages/:page_id' => :add_page, as: :dynamic_page
|
79
|
+
delete 'dynamic_pages/:page_id' => :remove_page
|
80
|
+
post 'dynamic_pages/:page_id/priority' => :page_priority, as: :page_priority
|
81
|
+
end
|
73
82
|
end
|
83
|
+
|
84
|
+
resources :users, concerns: %i[check toggle]
|
74
85
|
end
|
86
|
+
|
87
|
+
namespace :my do
|
88
|
+
get '/' => 'index#index'
|
89
|
+
|
90
|
+
resource :profile, except: :destroy, concerns: :check
|
91
|
+
resource :confirmation, :recovery, only: %i[show create update]
|
92
|
+
end
|
93
|
+
|
94
|
+
get ':slug' => 'fallback#show', constraints: { slug: /.+/ }
|
75
95
|
end
|
@@ -10,10 +10,9 @@ class CreateBiovisionComponents < ActiveRecord::Migration[6.0]
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def down
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
drop_table :biovision_components if BiovisionComponent.table_exists?
|
13
|
+
[Language, MetricValue, Metric, BiovisionComponent].each do |model|
|
14
|
+
drop_table model.table_name if model.table_exists?
|
15
|
+
end
|
17
16
|
end
|
18
17
|
|
19
18
|
private
|
@@ -58,7 +57,7 @@ class CreateBiovisionComponents < ActiveRecord::Migration[6.0]
|
|
58
57
|
end
|
59
58
|
|
60
59
|
def create_languages
|
61
|
-
create_table :languages, comment: 'Interface languages' do |t|
|
60
|
+
create_table :languages, comment: 'Interface and content languages' do |t|
|
62
61
|
t.integer :priority, limit: 2, default: 1, null: false
|
63
62
|
t.boolean :active, default: true, null: false
|
64
63
|
t.integer :object_count, default: 0, null: false
|
@@ -3,24 +3,23 @@
|
|
3
3
|
# Create entry and tables for track component
|
4
4
|
class CreateTrackComponent < ActiveRecord::Migration[6.0]
|
5
5
|
def up
|
6
|
-
|
6
|
+
BiovisionComponent.create(slug: Biovision::Components::TrackComponent.slug)
|
7
|
+
|
7
8
|
create_browsers unless Browser.table_exists?
|
8
9
|
create_agents unless Agent.table_exists?
|
9
10
|
create_ip_addresses unless IpAddress.table_exists?
|
10
11
|
end
|
11
12
|
|
12
13
|
def down
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
Biovision::Components::TrackComponent.dependent_models.each do |model|
|
15
|
+
drop_table model.table_name if model.table_exists?
|
16
|
+
end
|
17
|
+
|
18
|
+
BiovisionComponent[Biovision::Components::TrackComponent]&.destroy
|
16
19
|
end
|
17
20
|
|
18
21
|
private
|
19
22
|
|
20
|
-
def create_component
|
21
|
-
BiovisionComponent.create(slug: Biovision::Components::TrackComponent.slug)
|
22
|
-
end
|
23
|
-
|
24
23
|
def create_browsers
|
25
24
|
create_table :browsers, comment: 'Browsers' do |t|
|
26
25
|
t.boolean :mobile, default: false, null: false
|