biovision 0.1.210414.0 → 0.12.211128.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 +50 -40
- data/app/assets/stylesheets/biovision/admin/components/users.scss +4 -0
- data/app/assets/stylesheets/biovision/admin/components.scss +10 -0
- data/app/assets/stylesheets/biovision/admin/layout.scss +34 -8
- data/app/assets/stylesheets/biovision/biovision.scss +64 -26
- data/app/assets/stylesheets/biovision/components/carousel.scss +24 -24
- data/app/assets/stylesheets/biovision/components/filters.scss +39 -0
- data/app/assets/stylesheets/biovision/components/forms.scss +56 -10
- data/app/assets/stylesheets/biovision/components/quick_search.scss +24 -0
- data/app/assets/stylesheets/biovision/components.scss +1 -0
- data/app/assets/stylesheets/biovision/default.scss +4 -4
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users/dashboard.scss +4 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users.scss +1 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout/footer.scss +3 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout/header.scss +12 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +6 -3
- data/app/assets/stylesheets/biovision/themes/default_theme.scss +0 -1
- data/app/assets/stylesheets/biovision/vars.scss +5 -0
- data/app/controllers/admin/biovision_components_controller.rb +10 -0
- data/app/controllers/admin/components_controller.rb +33 -83
- data/app/controllers/admin/dynamic_pages_controller.rb +1 -1
- data/app/controllers/admin/index_controller.rb +8 -2
- data/app/controllers/admin/navigation_groups_controller.rb +31 -0
- data/app/controllers/admin/tokens_controller.rb +15 -0
- data/app/controllers/admin/users_controller.rb +35 -4
- data/app/controllers/admin_controller.rb +2 -9
- data/app/controllers/concerns/component_stories.rb +22 -0
- data/app/controllers/concerns/crud_entities.rb +23 -15
- data/app/controllers/concerns/my_crud_entities.rb +146 -0
- data/app/controllers/concerns/processed_forms.rb +28 -0
- data/app/controllers/concerns/restricted_access.rb +37 -0
- data/app/controllers/contact_controller.rb +1 -1
- data/app/controllers/errors_controller.rb +37 -0
- data/app/controllers/my/components_controller.rb +21 -0
- data/app/controllers/my/index_controller.rb +1 -3
- data/app/controllers/my/profiles_controller.rb +2 -0
- data/app/controllers/oembed_controller.rb +12 -0
- data/app/controllers/profile_controller.rb +2 -0
- data/app/controllers/users_controller.rb +2 -0
- data/app/helpers/biovision_components_helper.rb +7 -3
- data/app/helpers/biovision_helper.rb +33 -34
- data/app/helpers/entity_helper.rb +77 -0
- data/app/helpers/my_helper.rb +34 -0
- data/app/lib/biovision/components/base/component_parameters.rb +13 -2
- data/app/lib/biovision/components/base/component_privileges.rb +28 -18
- data/app/lib/biovision/components/base/component_settings.rb +8 -0
- data/app/lib/biovision/components/base/component_stories.rb +30 -0
- data/app/lib/biovision/components/base/entity_links.rb +38 -0
- data/app/lib/biovision/components/base/image_handling.rb +33 -0
- data/app/lib/biovision/components/base_component.rb +20 -49
- data/app/lib/biovision/components/contact_component.rb +5 -1
- data/app/lib/biovision/components/content/oembed/receiver.rb +98 -0
- data/app/lib/biovision/components/content/oembed/twitter_receiver.rb +20 -0
- data/app/lib/biovision/components/content/oembed/vimeo_receiver.rb +20 -0
- data/app/lib/biovision/components/content/oembed/youtube_receiver.rb +20 -0
- data/app/lib/biovision/components/content_component.rb +46 -9
- data/app/lib/biovision/components/track_component.rb +1 -1
- data/app/lib/biovision/components/users_component.rb +34 -2
- data/app/lib/biovision/helpers/data_helper.rb +70 -0
- data/app/lib/biovision/helpers/export_helper.rb +97 -0
- data/app/lib/biovision/migrations/component_migration.rb +56 -0
- data/app/lib/biovision/stories/component_story.rb +55 -0
- data/app/mailers/feedback_mailer.rb +14 -0
- data/app/models/biovision_component.rb +17 -1
- data/app/models/browser.rb +1 -1
- data/app/models/code.rb +5 -5
- data/app/models/concerns/checkable.rb +2 -1
- data/app/models/concerns/has_uploaded_file.rb +26 -0
- data/app/models/concerns/simple_tag.rb +30 -0
- data/app/models/concerns/toggleable.rb +2 -1
- data/app/models/concerns/tree_structure.rb +4 -1
- data/app/models/contact_method.rb +1 -1
- data/app/models/contact_type.rb +1 -1
- data/app/models/dynamic_block.rb +1 -1
- data/app/models/dynamic_page.rb +3 -1
- data/app/models/feedback_message.rb +7 -1
- data/app/models/feedback_response.rb +2 -2
- data/app/models/metric.rb +4 -0
- data/app/models/navigation_group.rb +11 -1
- data/app/models/oembed_domain.rb +25 -0
- data/app/models/oembed_link.rb +19 -0
- data/app/models/oembed_receiver.rb +15 -0
- data/app/models/role.rb +42 -12
- data/app/models/simple_image.rb +30 -3
- data/app/models/simple_image_tag.rb +1 -16
- data/app/models/token.rb +6 -2
- data/app/models/uploaded_file.rb +62 -0
- data/app/models/uploaded_file_tag.rb +15 -0
- data/app/models/uploaded_file_tag_file.rb +13 -0
- data/app/models/user.rb +35 -10
- data/app/models/user_role.rb +0 -1
- data/app/uploaders/simple_file_uploader.rb +2 -6
- data/app/uploaders/simple_image_uploader.rb +10 -21
- data/app/uploaders/uploaders/path_slug.rb +22 -0
- data/app/views/admin/agents/index.html.erb +1 -1
- data/app/views/admin/biovision_components/_nav_item.html.erb +6 -0
- data/app/views/admin/biovision_components/entity/_in_list.html.erb +12 -0
- data/app/views/admin/biovision_components/index.html.erb +11 -0
- data/app/views/admin/components/_list.html.erb +1 -1
- data/app/views/admin/components/entity/_links.html.erb +31 -21
- data/app/views/admin/components/links/_base.html.erb +1 -0
- data/app/views/admin/components/settings/_settings.html.erb +3 -3
- data/app/views/admin/components/settings.html.erb +2 -1
- data/app/views/admin/dynamic_blocks/_form.html.erb +1 -1
- data/app/views/admin/dynamic_blocks/entity/_in_list.html.erb +8 -6
- data/app/views/admin/dynamic_blocks/index.html.erb +6 -4
- data/app/views/admin/dynamic_blocks/show.html.erb +9 -7
- data/app/views/admin/dynamic_pages/_dynamic_page.jbuilder +18 -0
- data/app/views/admin/dynamic_pages/entity/_in_list.html.erb +6 -4
- data/app/views/admin/dynamic_pages/entity/_in_search.html.erb +7 -0
- data/app/views/admin/dynamic_pages/index.html.erb +6 -4
- data/app/views/admin/dynamic_pages/search.jbuilder +4 -0
- data/app/views/admin/dynamic_pages/show.html.erb +2 -2
- data/app/views/admin/index/index.html.erb +7 -5
- data/app/views/admin/ip_addresses/index.html.erb +2 -2
- data/app/views/admin/navigation_group_pages/entity/_in_list.html.erb +26 -0
- data/app/views/admin/navigation_groups/entity/_dynamic_pages.html.erb +38 -0
- data/app/views/admin/navigation_groups/entity/_in_list.html.erb +7 -5
- data/app/views/admin/navigation_groups/index.html.erb +6 -4
- data/app/views/admin/navigation_groups/show.html.erb +16 -3
- data/app/views/admin/tokens/_form.html.erb +31 -0
- data/app/views/admin/tokens/_nav_item.html.erb +6 -0
- data/app/views/admin/tokens/entity/_in_list.html.erb +27 -0
- data/app/views/admin/tokens/index.html.erb +11 -0
- data/app/views/admin/tokens/show.html.erb +26 -0
- data/app/views/admin/users/_user.jbuilder +18 -0
- data/app/views/admin/users/entity/_fields.html.erb +1 -1
- data/app/views/admin/users/entity/_in_list.html.erb +3 -3
- data/app/views/admin/users/entity/_in_search.html.erb +18 -0
- data/app/views/admin/users/index.html.erb +13 -4
- data/app/views/admin/users/roles/_component.html.erb +22 -0
- data/app/views/admin/users/roles.html.erb +23 -0
- data/app/views/admin/users/search.jbuilder +4 -0
- data/app/views/admin/users/show.html.erb +28 -10
- data/app/views/admin/widgets/_filters.html.erb +20 -0
- data/app/views/admin/widgets/_quick_search.html.erb +13 -0
- data/app/views/admin/widgets/filters/_flag.html.erb +15 -0
- data/app/views/admin/widgets/filters/_text.html.erb +7 -0
- data/app/views/application/unauthorized.html.erb +4 -1
- data/app/views/components/content/_dynamic_page.html.erb +6 -10
- data/app/views/components/content/_dynamic_page_content.html.erb +14 -0
- data/app/views/components/users/_login_form.html.erb +1 -0
- data/app/views/contact/_form.html.erb +1 -1
- data/app/views/errors/error.html.erb +1 -0
- data/app/views/feedback_mailer/new_feedback_request.html.erb +11 -0
- data/app/views/feedback_mailer/new_feedback_request.text.erb +6 -0
- data/app/views/index/index.html.erb +14 -0
- data/app/views/layouts/admin/_header.html.erb +7 -2
- data/app/views/layouts/admin.html.erb +0 -1
- data/app/views/layouts/application/_footer.html.erb +1 -1
- data/app/views/layouts/application/header/_authentication.html.erb +4 -1
- data/app/views/my/components/index.html.erb +25 -0
- data/app/views/my/components/show.html.erb +21 -0
- data/app/views/my/index/_cards.html.erb +15 -0
- data/app/views/my/index/_email.html.erb +14 -0
- data/app/views/my/index/_navigation.html.erb +33 -0
- data/app/views/my/index/index.html.erb +7 -26
- data/app/views/my/profiles/show.html.erb +13 -0
- data/app/views/{admin/components/links/extra/_content.html.erb → my/recoveries/show.html.erb} +0 -0
- data/app/views/shared/admin/_list.html.erb +10 -19
- data/app/views/shared/admin/_list_with_priority.html.erb +10 -19
- data/app/views/shared/admin/_priority.html.erb +6 -5
- data/app/views/shared/admin/_toggle.html.erb +5 -10
- data/app/views/shared/entity/_date_field.html.erb +6 -0
- data/app/views/shared/entity/_linked_entity.html.erb +2 -2
- data/app/views/shared/entity/_list.html.erb +22 -0
- data/app/views/shared/entity/_list_with_priority.html.erb +22 -0
- data/app/views/shared/entity/_parent.html.erb +1 -1
- data/app/views/shared/entity/_priority_icons.html.erb +8 -0
- data/app/views/shared/entity/_time_field.html.erb +6 -0
- data/app/views/shared/entity/_toggle.html.erb +12 -0
- data/app/views/shared/entity/_track.html.erb +12 -0
- data/app/views/shared/entity/_tree_caches.html.erb +8 -1
- data/app/views/shared/entity/edit.html.erb +10 -6
- data/app/views/shared/entity/new.html.erb +4 -2
- data/app/views/shared/forms/_field.html.erb +6 -2
- data/app/views/shared/forms/_field_with_search.html.erb +17 -0
- data/app/views/shared/forms/_meta_texts.html.erb +1 -1
- data/app/views/shared/forms/_simple_entity_link.html.erb +14 -0
- data/app/views/shared/forms/_simple_image.html.erb +12 -4
- data/app/views/shared/forms/_text_area.html.erb +1 -1
- data/app/views/shared/forms/_text_field.html.erb +1 -1
- data/app/views/shared/my/_list.html.erb +10 -19
- data/app/views/shared/my/_list_with_priority.html.erb +10 -19
- data/app/views/shared/my/entity/edit.html.erb +25 -0
- data/app/views/shared/my/entity/new.html.erb +18 -0
- data/app/views/simple_images/_simple_image.jbuilder +13 -0
- data/config/locales/biovision-ru.yml +18 -1
- data/config/locales/components-ru.yml +27 -4
- data/config/locales/contact-ru.yml +4 -0
- data/config/locales/content-ru.yml +12 -0
- data/config/locales/users-ru.yml +31 -6
- data/config/routes.rb +35 -4
- data/db/migrate/20191228000000_create_biovision_components.rb +2 -0
- data/db/migrate/20200224000000_create_track_component.rb +8 -12
- data/db/migrate/20200224000010_create_users_component.rb +8 -49
- data/db/migrate/20200404000000_create_simple_images.rb +1 -0
- data/db/migrate/20210405000000_create_acl.rb +15 -1
- data/db/migrate/{20200529000000_create_content_component.rb → 20210421000000_create_content_component.rb} +24 -18
- data/db/migrate/{20210401000000_create_contact_component.rb → 20210421000010_create_contact_component.rb} +1 -22
- data/db/migrate/20210616000000_create_uploaded_files.rb +52 -0
- data/db/migrate/amends/20210816060606_create_oembed_receivers.rb +21 -0
- data/db/migrate/amends/20210907070707_add_checksum_to_simple_images.rb +13 -0
- data/lib/biovision/base_methods.rb +8 -28
- data/lib/biovision/version.rb +1 -1
- data/lib/tasks/components.rake +51 -0
- metadata +90 -17
- data/app/lib/biovision/components/base/privilege_handler.rb +0 -79
- data/app/models/biovision_component_user.rb +0 -21
- data/app/views/admin/components/links/_content.html.erb +0 -9
- data/app/views/admin/components/links/_track.html.erb +0 -2
- data/app/views/admin/components/links/_users.html.erb +0 -4
- data/app/views/admin/components/privileges/_component_user.html.erb +0 -17
- data/app/views/admin/components/privileges/_links.html.erb +0 -17
- data/app/views/admin/components/privileges/_users.html.erb +0 -23
- data/app/views/admin/components/privileges.html.erb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96079542e17de0ab507ecc2fd0636afa47cd5164e8d46d1e45432d5e679c6cb6
|
4
|
+
data.tar.gz: f1f71b7d4704de6d44f6c8a1feacf5b118a1286ca7d5247cd585f324e7d7dd46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f610aca3a5e06fa83bdd1c34b75a8da77bf84136b5653dcccb012cb4ed8347adf859de402559257d8370a138c771b17cae088195277eef2a31ced1dc3f07033f
|
7
|
+
data.tar.gz: aa56a7851be4b9463f6c3ace77a47338feec2f9ebd17dc4166615b5ea657259be1698977542a896220193aa70312ee5eef2fbc564d86d640555a853f35fbdbb8
|
data/README.md
CHANGED
@@ -22,19 +22,16 @@
|
|
22
22
|
|
23
23
|
Ещё нужно поменять `example.com` на актуальное название.
|
24
24
|
|
25
|
-
Также стоит удалить `app/assets/application.css`, так как используется scss,
|
26
|
-
и локаль `config/locales/en.yml`, если не планируется использование английской
|
25
|
+
Также стоит удалить `app/assets/application.css`, так как используется scss,
|
26
|
+
и локаль `config/locales/en.yml`, если не планируется использование английской
|
27
27
|
локали.
|
28
28
|
|
29
29
|
## Добавления в `Gemfile`
|
30
30
|
|
31
31
|
```ruby
|
32
|
-
gem 'dotenv-rails'
|
33
|
-
|
34
|
-
gem 'autoprefixer-rails', group: :production
|
35
|
-
|
36
|
-
gem 'biovision', git: 'https://github.com/Biovision/biovision.git'
|
37
32
|
# gem 'biovision', path: '/Users/maxim/Projects/Biovision/gems/biovision'
|
33
|
+
gem 'biovision', git: 'https://github.com/Biovision/biovision.git'
|
34
|
+
gem 'dotenv-rails'
|
38
35
|
|
39
36
|
group :development, :test do
|
40
37
|
gem 'database_cleaner'
|
@@ -49,15 +46,15 @@ end
|
|
49
46
|
|
50
47
|
## Изменения в `config/environments/production.rb`
|
51
48
|
|
52
|
-
Нужно раскомментировать строку `config.require_master_key = true` (на момент
|
49
|
+
Нужно раскомментировать строку `config.require_master_key = true` (на момент
|
53
50
|
написания это `21` строка).
|
54
51
|
|
55
|
-
Нужно выставить уровень сообщения об ошибках в `:warn`
|
52
|
+
Нужно выставить уровень сообщения об ошибках в `:warn`
|
56
53
|
(`config.log_level = :warn` в районе `53` строки).
|
57
54
|
|
58
55
|
## Изменения в `app/mailers/application_mailer.rb`
|
59
56
|
|
60
|
-
Нужно удалить строку с отправителем по умолчанию
|
57
|
+
Нужно удалить строку с отправителем по умолчанию
|
61
58
|
(`default from: 'from@example.com'`), иначе при отправке писем в бою будет
|
62
59
|
ошибка с неправильным отправителем, независимо от того, что написано
|
63
60
|
в конфигурации в `production.rb`.
|
@@ -75,7 +72,7 @@ default: &default
|
|
75
72
|
development:
|
76
73
|
<<: *default
|
77
74
|
database: example # Поменять на актуальное название
|
78
|
-
|
75
|
+
|
79
76
|
test:
|
80
77
|
<<: *default
|
81
78
|
database: example_test # Такое же, как в development, но с приставкой _test
|
@@ -94,7 +91,7 @@ production:
|
|
94
91
|
задан как UTC.
|
95
92
|
|
96
93
|
```ruby
|
97
|
-
|
94
|
+
config.time_zone = 'Moscow'
|
98
95
|
```
|
99
96
|
|
100
97
|
## Добавления в `config/application_controller.rb`
|
@@ -102,9 +99,10 @@ production:
|
|
102
99
|
Добавить это в начале класса.
|
103
100
|
|
104
101
|
```ruby
|
105
|
-
|
106
|
-
|
107
|
-
|
102
|
+
|
103
|
+
def default_url_options
|
104
|
+
params.key?(:locale) ? { locale: I18n.locale } : {}
|
105
|
+
end
|
108
106
|
```
|
109
107
|
|
110
108
|
## Добавления в `package.json` и `application.js`
|
@@ -112,42 +110,52 @@ production:
|
|
112
110
|
Нужно добавить `@biovivion/biovision`, чтобы работал JS на клиентской стороне
|
113
111
|
(`yarn add @biovision/biovision`).
|
114
112
|
|
115
|
-
В `pack/javascripts/application.js` нужно добавить
|
113
|
+
В `pack/javascripts/application.js` нужно добавить
|
116
114
|
`require("@biovision/biovision")`.
|
117
115
|
|
118
116
|
## Добавления в `config/routes.rb`
|
119
117
|
|
120
118
|
```ruby
|
121
|
-
concern :check do
|
122
|
-
post :check, on: :collection, defaults: { format: :json }
|
123
|
-
end
|
124
119
|
|
125
|
-
|
126
|
-
|
127
|
-
|
120
|
+
concern :check do
|
121
|
+
post :check, on: :collection, defaults: { format: :json }
|
122
|
+
end
|
128
123
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
124
|
+
concern :toggle do
|
125
|
+
post :toggle, on: :member, defaults: { format: :json }
|
126
|
+
end
|
127
|
+
|
128
|
+
concern :priority do
|
129
|
+
post :priority, on: :member, defaults: { format: :json }
|
130
|
+
end
|
131
|
+
|
132
|
+
concern :search do
|
133
|
+
get :search, on: :collection
|
134
|
+
end
|
135
|
+
|
136
|
+
concern :stories do
|
137
|
+
post 'stories/:slug' => :story, on: :collection, as: :story
|
138
|
+
end
|
139
|
+
|
140
|
+
root 'index#index'
|
134
141
|
```
|
135
142
|
|
136
143
|
## Дополнения в config/puma.rb
|
137
144
|
|
138
|
-
Нужно обязательно закомментировать строку с портом, так как используется сокет.
|
139
|
-
На момент написания документации это `12` строка:
|
145
|
+
Нужно обязательно закомментировать строку с портом, так как используется сокет.
|
146
|
+
На момент написания документации это `12` строка:
|
140
147
|
`port ENV.fetch("PORT") { 3000 }`
|
141
148
|
|
142
149
|
```ruby
|
150
|
+
|
143
151
|
if ENV['RAILS_ENV'] == 'production'
|
144
152
|
shared_path = '/var/www/example.com/shared'
|
145
|
-
logs_dir
|
153
|
+
logs_dir = "#{shared_path}/log"
|
146
154
|
|
147
155
|
state_path "#{shared_path}/tmp/puma/state"
|
148
156
|
bind "unix://#{shared_path}/tmp/puma.sock"
|
149
157
|
stdout_redirect "#{logs_dir}/stdout.log", "#{logs_dir}/stderr.log", true
|
150
|
-
|
158
|
+
|
151
159
|
activate_control_app
|
152
160
|
end
|
153
161
|
```
|
@@ -169,8 +177,8 @@ bundle binstubs bundler --force
|
|
169
177
|
bundle binstub puma
|
170
178
|
```
|
171
179
|
|
172
|
-
Также имеет смысл запустить `EDITOR=vim rails credentials:edit`, чтобы создать
|
173
|
-
зашированный файл с ключом шифрования сессии (чтобы выйти из vim с сохранением,
|
180
|
+
Также имеет смысл запустить `EDITOR=vim rails credentials:edit`, чтобы создать
|
181
|
+
зашированный файл с ключом шифрования сессии (чтобы выйти из vim с сохранением,
|
174
182
|
надо нажать `esc` и набрать `:wq`).
|
175
183
|
|
176
184
|
Чтобы проходила сборка на сервере, следует запустить эту команду:
|
@@ -189,7 +197,7 @@ sudo su postgres
|
|
189
197
|
createuser -d -P example
|
190
198
|
```
|
191
199
|
|
192
|
-
Для создания БД (заменить `example` на пользователя из `config/database.yml`
|
200
|
+
Для создания БД (заменить `example` на пользователя из `config/database.yml`
|
193
201
|
из раздела `production`):
|
194
202
|
|
195
203
|
```bash
|
@@ -202,11 +210,11 @@ create database example template template0 encoding='UTF8' LC_COLLATE='ru_RU.UTF
|
|
202
210
|
|
203
211
|
## Настройка отгрузки через mina
|
204
212
|
|
205
|
-
Для начала надо запустить в консоли `mina init`. После этого внести изменения
|
213
|
+
Для начала надо запустить в консоли `mina init`. После этого внести изменения
|
206
214
|
в `config/deploy.rb`.
|
207
215
|
|
208
216
|
В начале и середине файла раскомментировать то, что относится к `rbenv`.
|
209
|
-
Кроме того, следует проверить настройки соединения по SSH
|
217
|
+
Кроме того, следует проверить настройки соединения по SSH
|
210
218
|
(`set :user, 'developer`).
|
211
219
|
|
212
220
|
Для `shared_dirs` и `shared_files` задать примерно такой вид.
|
@@ -230,13 +238,13 @@ invoke :'nvm:load'
|
|
230
238
|
namespace :nvm do
|
231
239
|
task :load do
|
232
240
|
command 'echo "-----> Loading nvm"'
|
233
|
-
command %
|
241
|
+
command %(source ~/.nvm/nvm.sh)
|
234
242
|
command 'echo "-----> Now using nvm v.`nvm --version`"'
|
235
243
|
end
|
236
244
|
end
|
237
245
|
```
|
238
246
|
|
239
|
-
На серверной стороне нужно создать папку для пумы и файла с ключом шифрования:
|
247
|
+
На серверной стороне нужно создать папку для пумы и файла с ключом шифрования:
|
240
248
|
|
241
249
|
```bash
|
242
250
|
mkdir -p /var/www/example.com/shared/tmp/puma
|
@@ -244,7 +252,7 @@ mkdir -p /var/www/example.com/shared/tmp/pids
|
|
244
252
|
mkdir -p /var/www/example.com/shared/config
|
245
253
|
```
|
246
254
|
|
247
|
-
После этого локально запустить `mina setup`. Для нормальной работы нужно
|
255
|
+
После этого локально запустить `mina setup`. Для нормальной работы нужно
|
248
256
|
не забыть скопировать на сервер `.env` и `config/master.key`.
|
249
257
|
|
250
258
|
```bash
|
@@ -253,4 +261,6 @@ scp config/master.key biovision:/var/www/example.com/shared/config
|
|
253
261
|
```
|
254
262
|
|
255
263
|
## License
|
256
|
-
|
264
|
+
|
265
|
+
The gem is available as open source under the terms of
|
266
|
+
the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -58,4 +58,14 @@
|
|
58
58
|
}
|
59
59
|
}
|
60
60
|
|
61
|
+
@import "biovision/components/forms";
|
62
|
+
@import "biovision/components/breadcrumbs";
|
63
|
+
@import "biovision/components/lists";
|
64
|
+
@import "biovision/components/buttons";
|
65
|
+
@import "biovision/components/messages";
|
66
|
+
@import "biovision/components/simple_image";
|
67
|
+
@import "biovision/components/toggleable";
|
68
|
+
@import "biovision/components/pagination";
|
69
|
+
@import "biovision/components/quick_search";
|
70
|
+
@import "biovision/components/filters";
|
61
71
|
@import "biovision/admin/components/users";
|
@@ -73,12 +73,38 @@ h2 {
|
|
73
73
|
padding: var(--spacer-xs);
|
74
74
|
}
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
76
|
+
.breadcrumbs {
|
77
|
+
margin-bottom: var(--spacer-s);
|
78
|
+
}
|
79
|
+
|
80
|
+
.header-authentication {
|
81
|
+
align-items: center;
|
82
|
+
display: flex;
|
83
|
+
gap: var(--spacer-xxs);
|
84
|
+
margin: 0 0 0 auto;
|
85
|
+
|
86
|
+
.avatar {
|
87
|
+
border-radius: 50%;
|
88
|
+
box-shadow: var(--block-shadow);
|
89
|
+
display: inline-block;
|
90
|
+
height: 2.4rem;
|
91
|
+
overflow: hidden;
|
92
|
+
width: 2.4rem;
|
93
|
+
|
94
|
+
img {
|
95
|
+
height: 100%;
|
96
|
+
object-fit: cover;
|
97
|
+
width: 100%;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
.current-user {
|
102
|
+
align-items: center;
|
103
|
+
color: inherit;
|
104
|
+
display: flex;
|
105
|
+
font-size: var(--font-size-decreased);
|
106
|
+
gap: var(--spacer-xs);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
84
110
|
@import "biovision/admin/components";
|
@@ -91,45 +91,75 @@ textarea {
|
|
91
91
|
.proportional-container {
|
92
92
|
padding: 0;
|
93
93
|
position: relative;
|
94
|
+
}
|
94
95
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
height: 100%;
|
99
|
-
left: 0;
|
100
|
-
position: absolute;
|
101
|
-
right: 0;
|
102
|
-
top: 0;
|
103
|
-
width: 100%;
|
104
|
-
}
|
105
|
-
|
106
|
-
&::before {
|
107
|
-
content: '\A';
|
108
|
-
display: block;
|
96
|
+
@supports (aspect-ratio: 1 / 1) {
|
97
|
+
.r-1x1 {
|
98
|
+
aspect-ratio: 1 / 1;
|
109
99
|
}
|
110
100
|
|
111
|
-
|
112
|
-
|
101
|
+
.r-5x4 {
|
102
|
+
aspect-ratio: 5 / 4;
|
113
103
|
}
|
114
104
|
|
115
|
-
|
116
|
-
|
105
|
+
.r-4x3 {
|
106
|
+
aspect-ratio: 4 / 3;
|
117
107
|
}
|
118
108
|
|
119
|
-
|
120
|
-
|
109
|
+
.r-3x2 {
|
110
|
+
aspect-ratio: 3 / 2;
|
121
111
|
}
|
122
112
|
|
123
|
-
|
124
|
-
|
113
|
+
.r-16x9 {
|
114
|
+
aspect-ratio: 16 / 9;
|
125
115
|
}
|
126
116
|
|
127
|
-
|
128
|
-
|
117
|
+
.r-2x1 {
|
118
|
+
aspect-ratio: 2 / 1;
|
129
119
|
}
|
120
|
+
}
|
130
121
|
|
131
|
-
|
132
|
-
|
122
|
+
@supports not(aspect-ratio: 1/1) {
|
123
|
+
.proportional-container {
|
124
|
+
> * {
|
125
|
+
bottom: 0;
|
126
|
+
display: block;
|
127
|
+
height: 100%;
|
128
|
+
left: 0;
|
129
|
+
position: absolute;
|
130
|
+
right: 0;
|
131
|
+
top: 0;
|
132
|
+
width: 100%;
|
133
|
+
}
|
134
|
+
|
135
|
+
&::before {
|
136
|
+
content: '\A';
|
137
|
+
display: block;
|
138
|
+
}
|
139
|
+
|
140
|
+
&.r-1x1::before {
|
141
|
+
padding-top: 100%;
|
142
|
+
}
|
143
|
+
|
144
|
+
&.r-5x4::before {
|
145
|
+
padding-top: 80%;
|
146
|
+
}
|
147
|
+
|
148
|
+
&.r-4x3::before {
|
149
|
+
padding-top: 75%;
|
150
|
+
}
|
151
|
+
|
152
|
+
&.r-3x2::before {
|
153
|
+
padding-top: 66.67%;
|
154
|
+
}
|
155
|
+
|
156
|
+
&.r-16x9::before {
|
157
|
+
padding-top: 56.25%;
|
158
|
+
}
|
159
|
+
|
160
|
+
&.r-2x1::before {
|
161
|
+
padding-top: 50%;
|
162
|
+
}
|
133
163
|
}
|
134
164
|
}
|
135
165
|
|
@@ -167,6 +197,14 @@ textarea {
|
|
167
197
|
width: 2.4rem;
|
168
198
|
}
|
169
199
|
|
200
|
+
.destroy {
|
201
|
+
background: image_url('biovision/icons/destroy.svg') no-repeat center / 1.6rem auto;
|
202
|
+
border: none;
|
203
|
+
border-radius: .4rem;
|
204
|
+
box-shadow: 0 0 .2rem hsla(0, 75%, 75%, .75);
|
205
|
+
cursor: pointer;
|
206
|
+
}
|
207
|
+
|
170
208
|
img {
|
171
209
|
height: 100%;
|
172
210
|
object-fit: contain;
|
@@ -1,37 +1,37 @@
|
|
1
1
|
.js-biovision-carousel {
|
2
2
|
position: relative;
|
3
|
+
}
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
5
|
+
.carousel-button {
|
6
|
+
-webkit-backdrop-filter: blur(.5rem) grayscale(.75);
|
7
|
+
backdrop-filter: blur(.5rem) grayscale(.75);
|
8
|
+
background: rgba(255, 255, 255, .5) no-repeat center / auto 1.6rem;
|
9
|
+
border: none;
|
10
|
+
border-radius: 50%;
|
11
|
+
box-shadow: 0 0 .4rem rgba(0, 0, 0, .25);
|
12
|
+
cursor: pointer;
|
13
|
+
display: inline-block;
|
14
|
+
height: 3.2rem;
|
15
|
+
position: absolute;
|
16
|
+
top: 50%;
|
17
|
+
transform: translate(0, -50%);
|
18
|
+
transition: .25s;
|
19
|
+
width: 3.2rem;
|
20
|
+
z-index: 4;
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}
|
22
|
+
&:active,
|
23
|
+
&:focus,
|
24
|
+
&:hover {
|
25
|
+
background-color: rgba(255, 255, 255, .75);
|
26
|
+
box-shadow: 0 0 .4rem rgba(0, 0, 0, .75);
|
27
27
|
}
|
28
28
|
|
29
|
-
|
29
|
+
&.prev {
|
30
30
|
background-image: image_url('biovision/components/carousel/arrow-left.svg');
|
31
31
|
left: var(--spacer-xxs);
|
32
32
|
}
|
33
33
|
|
34
|
-
|
34
|
+
&.next {
|
35
35
|
background-image: image_url('biovision/components/carousel/arrow-right.svg');
|
36
36
|
right: var(--spacer-xxs);
|
37
37
|
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.widgets__filters {
|
2
|
+
fieldset {
|
3
|
+
box-shadow: var(--block-shadow);
|
4
|
+
}
|
5
|
+
|
6
|
+
.list {
|
7
|
+
align-items: center;
|
8
|
+
display: flex;
|
9
|
+
flex-wrap: wrap;
|
10
|
+
gap: var(--spacer-s);
|
11
|
+
}
|
12
|
+
|
13
|
+
.flag {
|
14
|
+
align-items: center;
|
15
|
+
border: var(--border-secondary);
|
16
|
+
display: flex;
|
17
|
+
gap: var(--spacer-xs);
|
18
|
+
padding: var(--spacer-xs);
|
19
|
+
}
|
20
|
+
|
21
|
+
dfn {
|
22
|
+
font-style: normal;
|
23
|
+
font-weight: 500;
|
24
|
+
|
25
|
+
&::after {
|
26
|
+
content: ':';
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
label {
|
31
|
+
input:checked + span {
|
32
|
+
text-decoration: underline;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
.actions {
|
37
|
+
margin-top: var(--spacer-xs);
|
38
|
+
}
|
39
|
+
}
|
@@ -2,6 +2,12 @@ $form-control-color: hsl(220, 75%, 75%) !default;
|
|
2
2
|
$form-field-error: #f00 !default;
|
3
3
|
$form-input-bg: #fff !default;
|
4
4
|
|
5
|
+
:root {
|
6
|
+
--form-control-color: #{$form-control-color};
|
7
|
+
--form-field-error: #{$form-field-error};
|
8
|
+
--form-input-bg: #{$form-input-bg};
|
9
|
+
}
|
10
|
+
|
5
11
|
form {
|
6
12
|
margin: 0;
|
7
13
|
padding: 0;
|
@@ -18,7 +24,7 @@ form {
|
|
18
24
|
}
|
19
25
|
|
20
26
|
.check-result-error {
|
21
|
-
color:
|
27
|
+
color: var(--form-field-error);
|
22
28
|
|
23
29
|
&::before {
|
24
30
|
content: '\261D';
|
@@ -50,8 +56,14 @@ form {
|
|
50
56
|
margin: var(--spacer-xs) 0;
|
51
57
|
}
|
52
58
|
|
59
|
+
.meta-texts {
|
60
|
+
label {
|
61
|
+
width: 100%;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
53
65
|
.errors {
|
54
|
-
color:
|
66
|
+
color: var(--form-field-error);
|
55
67
|
padding: var(--spacer-xxs) var(--spacer-xxs) 0 var(--spacer-s);
|
56
68
|
|
57
69
|
li {
|
@@ -62,7 +74,7 @@ form {
|
|
62
74
|
}
|
63
75
|
|
64
76
|
&:last-of-type {
|
65
|
-
border-bottom: .1rem solid
|
77
|
+
border-bottom: .1rem solid var(--form-field-error);
|
66
78
|
padding-bottom: var(--spacer-xs);
|
67
79
|
}
|
68
80
|
}
|
@@ -142,11 +154,16 @@ form {
|
|
142
154
|
textarea {
|
143
155
|
width: 100%;
|
144
156
|
}
|
157
|
+
|
158
|
+
.secondary-data {
|
159
|
+
color: var(--text-color-secondary);
|
160
|
+
font-size: var(--font-size-decreased);
|
161
|
+
}
|
145
162
|
}
|
146
163
|
|
147
164
|
.input-select,
|
148
165
|
.input-text {
|
149
|
-
background-color:
|
166
|
+
background-color: var(--form-input-bg);
|
150
167
|
border: .1rem solid var(--input-border);
|
151
168
|
border-radius: var(--spacer-xxs);
|
152
169
|
font-size: var(--font-size-normal);
|
@@ -164,12 +181,12 @@ form {
|
|
164
181
|
-moz-appearance: none;
|
165
182
|
-webkit-appearance: none;
|
166
183
|
appearance: none;
|
167
|
-
background:
|
184
|
+
background: var(--form-input-bg) image_url('biovision/icons/dropdown.svg') no-repeat center right var(--spacer-xs) / 1.1rem auto;
|
168
185
|
padding-right: 3.2rem;
|
169
186
|
}
|
170
187
|
|
171
188
|
.floating-label {
|
172
|
-
display: block;
|
189
|
+
display: inline-block;
|
173
190
|
padding: 1.4rem 0 0 0;
|
174
191
|
position: relative;
|
175
192
|
|
@@ -193,17 +210,17 @@ form {
|
|
193
210
|
|
194
211
|
.flag-label {
|
195
212
|
align-items: flex-start;
|
196
|
-
display: flex;
|
213
|
+
display: inline-flex;
|
214
|
+
gap: var(--spacer-xxs);
|
197
215
|
|
198
216
|
input {
|
199
217
|
-moz-appearance: none;
|
200
218
|
-webkit-appearance: none;
|
201
219
|
appearance: none;
|
202
|
-
border: .2rem solid
|
220
|
+
border: .2rem solid var(--form-control-color);
|
203
221
|
border-radius: .2rem;
|
204
222
|
display: inline-block;
|
205
223
|
height: 1.6rem;
|
206
|
-
margin-right: var(--spacer-xxs);
|
207
224
|
outline: none;
|
208
225
|
width: 1.6rem;
|
209
226
|
|
@@ -216,7 +233,7 @@ form {
|
|
216
233
|
}
|
217
234
|
|
218
235
|
&:checked {
|
219
|
-
background: radial-gradient(#fff, #fff 25%,
|
236
|
+
background: radial-gradient(#fff, #fff 25%, var(--form-control-color) 25%, var(--form-control-color));
|
220
237
|
}
|
221
238
|
|
222
239
|
&:disabled {
|
@@ -244,3 +261,32 @@ form {
|
|
244
261
|
width: 100%;
|
245
262
|
}
|
246
263
|
}
|
264
|
+
|
265
|
+
.entity-links {
|
266
|
+
list-style: none;
|
267
|
+
margin: var(--spacer-s) 0;
|
268
|
+
padding: 0 0 0 var(--spacer-s);
|
269
|
+
|
270
|
+
> li {
|
271
|
+
margin: 0;
|
272
|
+
padding: 0;
|
273
|
+
}
|
274
|
+
}
|
275
|
+
|
276
|
+
.searchable-list {
|
277
|
+
.current {
|
278
|
+
margin: var(--spacer-xs) 0;
|
279
|
+
}
|
280
|
+
|
281
|
+
ul {
|
282
|
+
list-style: none;
|
283
|
+
}
|
284
|
+
|
285
|
+
.text {
|
286
|
+
display: inline-block;
|
287
|
+
|
288
|
+
&:empty {
|
289
|
+
display: none;
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.widgets__quick-search {
|
2
|
+
--row-background-even: hsl(250, 75%, 95%);
|
3
|
+
--row-background-odd: hsl(250, 75%, 98%);
|
4
|
+
|
5
|
+
background: hsl(250, 75%, 98%);
|
6
|
+
box-shadow: var(--block-shadow);
|
7
|
+
margin: var(--spacer-s) 0 var(--spacer-m);
|
8
|
+
padding: var(--spacer-s) var(--spacer-xxs);
|
9
|
+
position: relative;
|
10
|
+
|
11
|
+
h3 {
|
12
|
+
font-weight: 400;
|
13
|
+
}
|
14
|
+
|
15
|
+
.results {
|
16
|
+
background: hsla(250, 75%, 98%, .5);
|
17
|
+
box-shadow: var(--block-shadow);
|
18
|
+
margin-top: 0;
|
19
|
+
min-width: 28rem;
|
20
|
+
position: absolute;
|
21
|
+
top: 100%;
|
22
|
+
z-index: 3;
|
23
|
+
}
|
24
|
+
}
|