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.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +50 -40
  3. data/app/assets/stylesheets/biovision/admin/components/users.scss +4 -0
  4. data/app/assets/stylesheets/biovision/admin/components.scss +10 -0
  5. data/app/assets/stylesheets/biovision/admin/layout.scss +34 -8
  6. data/app/assets/stylesheets/biovision/biovision.scss +64 -26
  7. data/app/assets/stylesheets/biovision/components/carousel.scss +24 -24
  8. data/app/assets/stylesheets/biovision/components/filters.scss +39 -0
  9. data/app/assets/stylesheets/biovision/components/forms.scss +56 -10
  10. data/app/assets/stylesheets/biovision/components/quick_search.scss +24 -0
  11. data/app/assets/stylesheets/biovision/components.scss +1 -0
  12. data/app/assets/stylesheets/biovision/default.scss +4 -4
  13. data/app/assets/stylesheets/biovision/themes/default_theme/components/users/dashboard.scss +4 -0
  14. data/app/assets/stylesheets/biovision/themes/default_theme/components/users.scss +1 -0
  15. data/app/assets/stylesheets/biovision/themes/default_theme/layout/footer.scss +3 -0
  16. data/app/assets/stylesheets/biovision/themes/default_theme/layout/header.scss +12 -0
  17. data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +6 -3
  18. data/app/assets/stylesheets/biovision/themes/default_theme.scss +0 -1
  19. data/app/assets/stylesheets/biovision/vars.scss +5 -0
  20. data/app/controllers/admin/biovision_components_controller.rb +10 -0
  21. data/app/controllers/admin/components_controller.rb +33 -83
  22. data/app/controllers/admin/dynamic_pages_controller.rb +1 -1
  23. data/app/controllers/admin/index_controller.rb +8 -2
  24. data/app/controllers/admin/navigation_groups_controller.rb +31 -0
  25. data/app/controllers/admin/tokens_controller.rb +15 -0
  26. data/app/controllers/admin/users_controller.rb +35 -4
  27. data/app/controllers/admin_controller.rb +2 -9
  28. data/app/controllers/concerns/component_stories.rb +22 -0
  29. data/app/controllers/concerns/crud_entities.rb +23 -15
  30. data/app/controllers/concerns/my_crud_entities.rb +146 -0
  31. data/app/controllers/concerns/processed_forms.rb +28 -0
  32. data/app/controllers/concerns/restricted_access.rb +37 -0
  33. data/app/controllers/contact_controller.rb +1 -1
  34. data/app/controllers/errors_controller.rb +37 -0
  35. data/app/controllers/my/components_controller.rb +21 -0
  36. data/app/controllers/my/index_controller.rb +1 -3
  37. data/app/controllers/my/profiles_controller.rb +2 -0
  38. data/app/controllers/oembed_controller.rb +12 -0
  39. data/app/controllers/profile_controller.rb +2 -0
  40. data/app/controllers/users_controller.rb +2 -0
  41. data/app/helpers/biovision_components_helper.rb +7 -3
  42. data/app/helpers/biovision_helper.rb +33 -34
  43. data/app/helpers/entity_helper.rb +77 -0
  44. data/app/helpers/my_helper.rb +34 -0
  45. data/app/lib/biovision/components/base/component_parameters.rb +13 -2
  46. data/app/lib/biovision/components/base/component_privileges.rb +28 -18
  47. data/app/lib/biovision/components/base/component_settings.rb +8 -0
  48. data/app/lib/biovision/components/base/component_stories.rb +30 -0
  49. data/app/lib/biovision/components/base/entity_links.rb +38 -0
  50. data/app/lib/biovision/components/base/image_handling.rb +33 -0
  51. data/app/lib/biovision/components/base_component.rb +20 -49
  52. data/app/lib/biovision/components/contact_component.rb +5 -1
  53. data/app/lib/biovision/components/content/oembed/receiver.rb +98 -0
  54. data/app/lib/biovision/components/content/oembed/twitter_receiver.rb +20 -0
  55. data/app/lib/biovision/components/content/oembed/vimeo_receiver.rb +20 -0
  56. data/app/lib/biovision/components/content/oembed/youtube_receiver.rb +20 -0
  57. data/app/lib/biovision/components/content_component.rb +46 -9
  58. data/app/lib/biovision/components/track_component.rb +1 -1
  59. data/app/lib/biovision/components/users_component.rb +34 -2
  60. data/app/lib/biovision/helpers/data_helper.rb +70 -0
  61. data/app/lib/biovision/helpers/export_helper.rb +97 -0
  62. data/app/lib/biovision/migrations/component_migration.rb +56 -0
  63. data/app/lib/biovision/stories/component_story.rb +55 -0
  64. data/app/mailers/feedback_mailer.rb +14 -0
  65. data/app/models/biovision_component.rb +17 -1
  66. data/app/models/browser.rb +1 -1
  67. data/app/models/code.rb +5 -5
  68. data/app/models/concerns/checkable.rb +2 -1
  69. data/app/models/concerns/has_uploaded_file.rb +26 -0
  70. data/app/models/concerns/simple_tag.rb +30 -0
  71. data/app/models/concerns/toggleable.rb +2 -1
  72. data/app/models/concerns/tree_structure.rb +4 -1
  73. data/app/models/contact_method.rb +1 -1
  74. data/app/models/contact_type.rb +1 -1
  75. data/app/models/dynamic_block.rb +1 -1
  76. data/app/models/dynamic_page.rb +3 -1
  77. data/app/models/feedback_message.rb +7 -1
  78. data/app/models/feedback_response.rb +2 -2
  79. data/app/models/metric.rb +4 -0
  80. data/app/models/navigation_group.rb +11 -1
  81. data/app/models/oembed_domain.rb +25 -0
  82. data/app/models/oembed_link.rb +19 -0
  83. data/app/models/oembed_receiver.rb +15 -0
  84. data/app/models/role.rb +42 -12
  85. data/app/models/simple_image.rb +30 -3
  86. data/app/models/simple_image_tag.rb +1 -16
  87. data/app/models/token.rb +6 -2
  88. data/app/models/uploaded_file.rb +62 -0
  89. data/app/models/uploaded_file_tag.rb +15 -0
  90. data/app/models/uploaded_file_tag_file.rb +13 -0
  91. data/app/models/user.rb +35 -10
  92. data/app/models/user_role.rb +0 -1
  93. data/app/uploaders/simple_file_uploader.rb +2 -6
  94. data/app/uploaders/simple_image_uploader.rb +10 -21
  95. data/app/uploaders/uploaders/path_slug.rb +22 -0
  96. data/app/views/admin/agents/index.html.erb +1 -1
  97. data/app/views/admin/biovision_components/_nav_item.html.erb +6 -0
  98. data/app/views/admin/biovision_components/entity/_in_list.html.erb +12 -0
  99. data/app/views/admin/biovision_components/index.html.erb +11 -0
  100. data/app/views/admin/components/_list.html.erb +1 -1
  101. data/app/views/admin/components/entity/_links.html.erb +31 -21
  102. data/app/views/admin/components/links/_base.html.erb +1 -0
  103. data/app/views/admin/components/settings/_settings.html.erb +3 -3
  104. data/app/views/admin/components/settings.html.erb +2 -1
  105. data/app/views/admin/dynamic_blocks/_form.html.erb +1 -1
  106. data/app/views/admin/dynamic_blocks/entity/_in_list.html.erb +8 -6
  107. data/app/views/admin/dynamic_blocks/index.html.erb +6 -4
  108. data/app/views/admin/dynamic_blocks/show.html.erb +9 -7
  109. data/app/views/admin/dynamic_pages/_dynamic_page.jbuilder +18 -0
  110. data/app/views/admin/dynamic_pages/entity/_in_list.html.erb +6 -4
  111. data/app/views/admin/dynamic_pages/entity/_in_search.html.erb +7 -0
  112. data/app/views/admin/dynamic_pages/index.html.erb +6 -4
  113. data/app/views/admin/dynamic_pages/search.jbuilder +4 -0
  114. data/app/views/admin/dynamic_pages/show.html.erb +2 -2
  115. data/app/views/admin/index/index.html.erb +7 -5
  116. data/app/views/admin/ip_addresses/index.html.erb +2 -2
  117. data/app/views/admin/navigation_group_pages/entity/_in_list.html.erb +26 -0
  118. data/app/views/admin/navigation_groups/entity/_dynamic_pages.html.erb +38 -0
  119. data/app/views/admin/navigation_groups/entity/_in_list.html.erb +7 -5
  120. data/app/views/admin/navigation_groups/index.html.erb +6 -4
  121. data/app/views/admin/navigation_groups/show.html.erb +16 -3
  122. data/app/views/admin/tokens/_form.html.erb +31 -0
  123. data/app/views/admin/tokens/_nav_item.html.erb +6 -0
  124. data/app/views/admin/tokens/entity/_in_list.html.erb +27 -0
  125. data/app/views/admin/tokens/index.html.erb +11 -0
  126. data/app/views/admin/tokens/show.html.erb +26 -0
  127. data/app/views/admin/users/_user.jbuilder +18 -0
  128. data/app/views/admin/users/entity/_fields.html.erb +1 -1
  129. data/app/views/admin/users/entity/_in_list.html.erb +3 -3
  130. data/app/views/admin/users/entity/_in_search.html.erb +18 -0
  131. data/app/views/admin/users/index.html.erb +13 -4
  132. data/app/views/admin/users/roles/_component.html.erb +22 -0
  133. data/app/views/admin/users/roles.html.erb +23 -0
  134. data/app/views/admin/users/search.jbuilder +4 -0
  135. data/app/views/admin/users/show.html.erb +28 -10
  136. data/app/views/admin/widgets/_filters.html.erb +20 -0
  137. data/app/views/admin/widgets/_quick_search.html.erb +13 -0
  138. data/app/views/admin/widgets/filters/_flag.html.erb +15 -0
  139. data/app/views/admin/widgets/filters/_text.html.erb +7 -0
  140. data/app/views/application/unauthorized.html.erb +4 -1
  141. data/app/views/components/content/_dynamic_page.html.erb +6 -10
  142. data/app/views/components/content/_dynamic_page_content.html.erb +14 -0
  143. data/app/views/components/users/_login_form.html.erb +1 -0
  144. data/app/views/contact/_form.html.erb +1 -1
  145. data/app/views/errors/error.html.erb +1 -0
  146. data/app/views/feedback_mailer/new_feedback_request.html.erb +11 -0
  147. data/app/views/feedback_mailer/new_feedback_request.text.erb +6 -0
  148. data/app/views/index/index.html.erb +14 -0
  149. data/app/views/layouts/admin/_header.html.erb +7 -2
  150. data/app/views/layouts/admin.html.erb +0 -1
  151. data/app/views/layouts/application/_footer.html.erb +1 -1
  152. data/app/views/layouts/application/header/_authentication.html.erb +4 -1
  153. data/app/views/my/components/index.html.erb +25 -0
  154. data/app/views/my/components/show.html.erb +21 -0
  155. data/app/views/my/index/_cards.html.erb +15 -0
  156. data/app/views/my/index/_email.html.erb +14 -0
  157. data/app/views/my/index/_navigation.html.erb +33 -0
  158. data/app/views/my/index/index.html.erb +7 -26
  159. data/app/views/my/profiles/show.html.erb +13 -0
  160. data/app/views/{admin/components/links/extra/_content.html.erb → my/recoveries/show.html.erb} +0 -0
  161. data/app/views/shared/admin/_list.html.erb +10 -19
  162. data/app/views/shared/admin/_list_with_priority.html.erb +10 -19
  163. data/app/views/shared/admin/_priority.html.erb +6 -5
  164. data/app/views/shared/admin/_toggle.html.erb +5 -10
  165. data/app/views/shared/entity/_date_field.html.erb +6 -0
  166. data/app/views/shared/entity/_linked_entity.html.erb +2 -2
  167. data/app/views/shared/entity/_list.html.erb +22 -0
  168. data/app/views/shared/entity/_list_with_priority.html.erb +22 -0
  169. data/app/views/shared/entity/_parent.html.erb +1 -1
  170. data/app/views/shared/entity/_priority_icons.html.erb +8 -0
  171. data/app/views/shared/entity/_time_field.html.erb +6 -0
  172. data/app/views/shared/entity/_toggle.html.erb +12 -0
  173. data/app/views/shared/entity/_track.html.erb +12 -0
  174. data/app/views/shared/entity/_tree_caches.html.erb +8 -1
  175. data/app/views/shared/entity/edit.html.erb +10 -6
  176. data/app/views/shared/entity/new.html.erb +4 -2
  177. data/app/views/shared/forms/_field.html.erb +6 -2
  178. data/app/views/shared/forms/_field_with_search.html.erb +17 -0
  179. data/app/views/shared/forms/_meta_texts.html.erb +1 -1
  180. data/app/views/shared/forms/_simple_entity_link.html.erb +14 -0
  181. data/app/views/shared/forms/_simple_image.html.erb +12 -4
  182. data/app/views/shared/forms/_text_area.html.erb +1 -1
  183. data/app/views/shared/forms/_text_field.html.erb +1 -1
  184. data/app/views/shared/my/_list.html.erb +10 -19
  185. data/app/views/shared/my/_list_with_priority.html.erb +10 -19
  186. data/app/views/shared/my/entity/edit.html.erb +25 -0
  187. data/app/views/shared/my/entity/new.html.erb +18 -0
  188. data/app/views/simple_images/_simple_image.jbuilder +13 -0
  189. data/config/locales/biovision-ru.yml +18 -1
  190. data/config/locales/components-ru.yml +27 -4
  191. data/config/locales/contact-ru.yml +4 -0
  192. data/config/locales/content-ru.yml +12 -0
  193. data/config/locales/users-ru.yml +31 -6
  194. data/config/routes.rb +35 -4
  195. data/db/migrate/20191228000000_create_biovision_components.rb +2 -0
  196. data/db/migrate/20200224000000_create_track_component.rb +8 -12
  197. data/db/migrate/20200224000010_create_users_component.rb +8 -49
  198. data/db/migrate/20200404000000_create_simple_images.rb +1 -0
  199. data/db/migrate/20210405000000_create_acl.rb +15 -1
  200. data/db/migrate/{20200529000000_create_content_component.rb → 20210421000000_create_content_component.rb} +24 -18
  201. data/db/migrate/{20210401000000_create_contact_component.rb → 20210421000010_create_contact_component.rb} +1 -22
  202. data/db/migrate/20210616000000_create_uploaded_files.rb +52 -0
  203. data/db/migrate/amends/20210816060606_create_oembed_receivers.rb +21 -0
  204. data/db/migrate/amends/20210907070707_add_checksum_to_simple_images.rb +13 -0
  205. data/lib/biovision/base_methods.rb +8 -28
  206. data/lib/biovision/version.rb +1 -1
  207. data/lib/tasks/components.rake +51 -0
  208. metadata +90 -17
  209. data/app/lib/biovision/components/base/privilege_handler.rb +0 -79
  210. data/app/models/biovision_component_user.rb +0 -21
  211. data/app/views/admin/components/links/_content.html.erb +0 -9
  212. data/app/views/admin/components/links/_track.html.erb +0 -2
  213. data/app/views/admin/components/links/_users.html.erb +0 -4
  214. data/app/views/admin/components/privileges/_component_user.html.erb +0 -17
  215. data/app/views/admin/components/privileges/_links.html.erb +0 -17
  216. data/app/views/admin/components/privileges/_users.html.erb +0 -23
  217. 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: d3c24a921606caffe513c4ee11746d99f1891ceff0f80571cdebf22832504017
4
- data.tar.gz: a8fd06783b7ffdd07e64f2419a7cf9c6c85034c4b54ab0131105a6af053d3f71
3
+ metadata.gz: 96079542e17de0ab507ecc2fd0636afa47cd5164e8d46d1e45432d5e679c6cb6
4
+ data.tar.gz: f1f71b7d4704de6d44f6c8a1feacf5b118a1286ca7d5247cd585f324e7d7dd46
5
5
  SHA512:
6
- metadata.gz: a2ae86238cb7e4c0214e8f68e6eafdfdcd5ac3d18202b7e83068faf05e391105bc6d4a99aeae22142be73fb2d744a4a8d88b4677280996067116cab16c966db7
7
- data.tar.gz: b6bb9884e0622fbfaac3203f6fcc570368fbebfdd2c07cf68e7916bd4d622f7d76aa2617d0822e6854fa275d718c45bcba985a9f9999e4778c0c6fcf12290e95
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
- config.time_zone = 'Moscow'
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
- def default_url_options
106
- params.key?(:locale) ? { locale: I18n.locale } : {}
107
- end
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
- concern :toggle do
126
- post :toggle, on: :member, defaults: { format: :json }
127
- end
120
+ concern :check do
121
+ post :check, on: :collection, defaults: { format: :json }
122
+ end
128
123
 
129
- concern :priority do
130
- post :priority, on: :member, defaults: { format: :json }
131
- end
132
-
133
- root 'index#index'
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 = "#{shared_path}/log"
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 %{source ~/.nvm/nvm.sh}
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
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
264
+
265
+ The gem is available as open source under the terms of
266
+ the [MIT License](https://opensource.org/licenses/MIT).
@@ -14,3 +14,7 @@
14
14
  padding: var(--spacer-xs);
15
15
  }
16
16
  }
17
+
18
+ .component-for-user {
19
+ border-bottom: var(--border-secondary);
20
+ }
@@ -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
- @import "biovision/components/forms";
77
- @import "biovision/components/breadcrumbs";
78
- @import "biovision/components/lists";
79
- @import "biovision/components/buttons";
80
- @import "biovision/components/messages";
81
- @import "biovision/components/simple_image";
82
- @import "biovision/components/toggleable";
83
- @import "biovision/components/pagination";
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
- bottom: 0;
97
- display: block;
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
- &.r-1x1::before {
112
- padding-top: 100%;
101
+ .r-5x4 {
102
+ aspect-ratio: 5 / 4;
113
103
  }
114
104
 
115
- &.r-5x4::before {
116
- padding-top: 80%;
105
+ .r-4x3 {
106
+ aspect-ratio: 4 / 3;
117
107
  }
118
108
 
119
- &.r-4x3::before {
120
- padding-top: 75%;
109
+ .r-3x2 {
110
+ aspect-ratio: 3 / 2;
121
111
  }
122
112
 
123
- &.r-3x2::before {
124
- padding-top: 66.67%;
113
+ .r-16x9 {
114
+ aspect-ratio: 16 / 9;
125
115
  }
126
116
 
127
- &.r-16x9::before {
128
- padding-top: 56.25%;
117
+ .r-2x1 {
118
+ aspect-ratio: 2 / 1;
129
119
  }
120
+ }
130
121
 
131
- &.r-2x1::before {
132
- padding-top: 50%;
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
- > button {
5
- -webkit-backdrop-filter: blur(.5rem) grayscale(.75);
6
- backdrop-filter: blur(.5rem) grayscale(.75);
7
- background: rgba(255, 255, 255, .5) no-repeat center / auto 1.6rem;
8
- border: none;
9
- border-radius: 50%;
10
- box-shadow: 0 0 .4rem rgba(0, 0, 0, .25);
11
- cursor: pointer;
12
- display: inline-block;
13
- height: 3.2rem;
14
- position: absolute;
15
- top: 50%;
16
- transform: translate(0, -50%);
17
- transition: .25s;
18
- width: 3.2rem;
19
- z-index: 4;
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
- &:active,
22
- &:focus,
23
- &:hover {
24
- background-color: rgba(255, 255, 255, .75);
25
- box-shadow: 0 0 .4rem rgba(0, 0, 0, .75);
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
- .prev {
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
- .next {
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: $form-field-error;
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: $form-field-error;
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 $form-field-error;
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: #{$form-input-bg};
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: #{$form-input-bg} image_url('biovision/icons/dropdown.svg') no-repeat center right var(--spacer-xs) / 1.1rem auto;
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 $form-control-color;
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%, $form-control-color 25%, $form-control-color);
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
+ }
@@ -2,5 +2,6 @@
2
2
  @import "biovision/components/forms";
3
3
  @import "biovision/components/hamburger";
4
4
  @import "biovision/components/lists";
5
+ @import "biovision/components/messages";
5
6
  @import "biovision/components/pagination";
6
7
  @import "biovision/components/breadcrumbs";