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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biovision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.210414.0
4
+ version: 0.12.211128.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Khan-Magomedov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-13 00:00:00.000000000 Z
11
+ date: 2021-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.27'
95
+ version: '0.30'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.27'
102
+ version: '0.30'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: kaminari
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -252,17 +252,20 @@ files:
252
252
  - app/assets/stylesheets/biovision/components/breadcrumbs.scss
253
253
  - app/assets/stylesheets/biovision/components/buttons.scss
254
254
  - app/assets/stylesheets/biovision/components/carousel.scss
255
+ - app/assets/stylesheets/biovision/components/filters.scss
255
256
  - app/assets/stylesheets/biovision/components/forms.scss
256
257
  - app/assets/stylesheets/biovision/components/hamburger.scss
257
258
  - app/assets/stylesheets/biovision/components/lists.scss
258
259
  - app/assets/stylesheets/biovision/components/messages.scss
259
260
  - app/assets/stylesheets/biovision/components/pagination.scss
261
+ - app/assets/stylesheets/biovision/components/quick_search.scss
260
262
  - app/assets/stylesheets/biovision/components/simple_image.scss
261
263
  - app/assets/stylesheets/biovision/components/toggleable.scss
262
264
  - app/assets/stylesheets/biovision/default.scss
263
265
  - app/assets/stylesheets/biovision/themes/default_theme.scss
264
266
  - app/assets/stylesheets/biovision/themes/default_theme/components.scss
265
267
  - app/assets/stylesheets/biovision/themes/default_theme/components/users.scss
268
+ - app/assets/stylesheets/biovision/themes/default_theme/components/users/dashboard.scss
266
269
  - app/assets/stylesheets/biovision/themes/default_theme/components/users/form_tabs.scss
267
270
  - app/assets/stylesheets/biovision/themes/default_theme/components/users/profile.scss
268
271
  - app/assets/stylesheets/biovision/themes/default_theme/layout.scss
@@ -270,20 +273,27 @@ files:
270
273
  - app/assets/stylesheets/biovision/themes/default_theme/layout/header.scss
271
274
  - app/assets/stylesheets/biovision/vars.scss
272
275
  - app/controllers/admin/agents_controller.rb
276
+ - app/controllers/admin/biovision_components_controller.rb
273
277
  - app/controllers/admin/components_controller.rb
274
278
  - app/controllers/admin/dynamic_blocks_controller.rb
275
279
  - app/controllers/admin/dynamic_pages_controller.rb
276
280
  - app/controllers/admin/index_controller.rb
277
281
  - app/controllers/admin/ip_addresses_controller.rb
278
282
  - app/controllers/admin/navigation_groups_controller.rb
283
+ - app/controllers/admin/tokens_controller.rb
279
284
  - app/controllers/admin/users_controller.rb
280
285
  - app/controllers/admin_controller.rb
281
286
  - app/controllers/authentication_controller.rb
282
287
  - app/controllers/concerns/authentication.rb
288
+ - app/controllers/concerns/component_stories.rb
283
289
  - app/controllers/concerns/crud_entities.rb
284
290
  - app/controllers/concerns/entity_priority.rb
291
+ - app/controllers/concerns/my_crud_entities.rb
292
+ - app/controllers/concerns/processed_forms.rb
293
+ - app/controllers/concerns/restricted_access.rb
285
294
  - app/controllers/concerns/toggleable_entity.rb
286
295
  - app/controllers/contact_controller.rb
296
+ - app/controllers/errors_controller.rb
287
297
  - app/controllers/fallback_controller.rb
288
298
  - app/controllers/index_controller.rb
289
299
  - app/controllers/legal_controller.rb
@@ -292,19 +302,28 @@ files:
292
302
  - app/controllers/my/index_controller.rb
293
303
  - app/controllers/my/profiles_controller.rb
294
304
  - app/controllers/my/recoveries_controller.rb
305
+ - app/controllers/oembed_controller.rb
295
306
  - app/controllers/profile_controller.rb
296
307
  - app/controllers/users_controller.rb
297
308
  - app/helpers/biovision_components_helper.rb
298
309
  - app/helpers/biovision_helper.rb
310
+ - app/helpers/entity_helper.rb
311
+ - app/helpers/my_helper.rb
299
312
  - app/helpers/simple_image_helper.rb
300
313
  - app/jobs/application_job.rb
301
314
  - app/jobs/send_phone_confirmation_job.rb
302
315
  - app/lib/biovision/components/base/component_parameters.rb
303
316
  - app/lib/biovision/components/base/component_privileges.rb
304
317
  - app/lib/biovision/components/base/component_settings.rb
305
- - app/lib/biovision/components/base/privilege_handler.rb
318
+ - app/lib/biovision/components/base/component_stories.rb
319
+ - app/lib/biovision/components/base/entity_links.rb
320
+ - app/lib/biovision/components/base/image_handling.rb
306
321
  - app/lib/biovision/components/base_component.rb
307
322
  - app/lib/biovision/components/contact_component.rb
323
+ - app/lib/biovision/components/content/oembed/receiver.rb
324
+ - app/lib/biovision/components/content/oembed/twitter_receiver.rb
325
+ - app/lib/biovision/components/content/oembed/vimeo_receiver.rb
326
+ - app/lib/biovision/components/content/oembed/youtube_receiver.rb
308
327
  - app/lib/biovision/components/content_component.rb
309
328
  - app/lib/biovision/components/track_component.rb
310
329
  - app/lib/biovision/components/users/authentication.rb
@@ -314,16 +333,20 @@ files:
314
333
  - app/lib/biovision/components/users/registration_handler.rb
315
334
  - app/lib/biovision/components/users/validation.rb
316
335
  - app/lib/biovision/components/users_component.rb
336
+ - app/lib/biovision/helpers/data_helper.rb
337
+ - app/lib/biovision/helpers/export_helper.rb
338
+ - app/lib/biovision/migrations/component_migration.rb
317
339
  - app/lib/biovision/notifiers/base_notifier.rb
318
340
  - app/lib/biovision/notifiers/contact_notifier.rb
319
341
  - app/lib/biovision/notifiers/socialization_notifier.rb
320
342
  - app/lib/biovision/notifiers/users_notifier.rb
343
+ - app/lib/biovision/stories/component_story.rb
321
344
  - app/lib/canonizer.rb
322
345
  - app/lib/carrier_wave/image_optim.rb
323
346
  - app/mailers/code_sender.rb
347
+ - app/mailers/feedback_mailer.rb
324
348
  - app/models/agent.rb
325
349
  - app/models/biovision_component.rb
326
- - app/models/biovision_component_user.rb
327
350
  - app/models/browser.rb
328
351
  - app/models/code.rb
329
352
  - app/models/concerns/checkable.rb
@@ -332,11 +355,13 @@ files:
332
355
  - app/models/concerns/has_owner.rb
333
356
  - app/models/concerns/has_simple_image.rb
334
357
  - app/models/concerns/has_track.rb
358
+ - app/models/concerns/has_uploaded_file.rb
335
359
  - app/models/concerns/has_uuid.rb
336
360
  - app/models/concerns/meta_texts.rb
337
361
  - app/models/concerns/nested_priority.rb
338
362
  - app/models/concerns/required_unique_name.rb
339
363
  - app/models/concerns/required_unique_slug.rb
364
+ - app/models/concerns/simple_tag.rb
340
365
  - app/models/concerns/toggleable.rb
341
366
  - app/models/concerns/tree_structure.rb
342
367
  - app/models/contact_method.rb
@@ -354,21 +379,31 @@ files:
354
379
  - app/models/navigation_group.rb
355
380
  - app/models/navigation_group_page.rb
356
381
  - app/models/notification.rb
382
+ - app/models/oembed_domain.rb
383
+ - app/models/oembed_link.rb
384
+ - app/models/oembed_receiver.rb
357
385
  - app/models/role.rb
358
386
  - app/models/role_group.rb
359
387
  - app/models/simple_image.rb
360
388
  - app/models/simple_image_tag.rb
361
389
  - app/models/simple_image_tag_image.rb
362
390
  - app/models/token.rb
391
+ - app/models/uploaded_file.rb
392
+ - app/models/uploaded_file_tag.rb
393
+ - app/models/uploaded_file_tag_file.rb
363
394
  - app/models/user.rb
364
395
  - app/models/user_group.rb
365
396
  - app/models/user_language.rb
366
397
  - app/models/user_role.rb
367
398
  - app/uploaders/simple_file_uploader.rb
368
399
  - app/uploaders/simple_image_uploader.rb
400
+ - app/uploaders/uploaders/path_slug.rb
369
401
  - app/views/admin/agents/_nav_item.html.erb
370
402
  - app/views/admin/agents/entity/_in_list.html.erb
371
403
  - app/views/admin/agents/index.html.erb
404
+ - app/views/admin/biovision_components/_nav_item.html.erb
405
+ - app/views/admin/biovision_components/entity/_in_list.html.erb
406
+ - app/views/admin/biovision_components/index.html.erb
372
407
  - app/views/admin/components/_image.jbuilder
373
408
  - app/views/admin/components/_list.html.erb
374
409
  - app/views/admin/components/entity/_links.html.erb
@@ -376,14 +411,7 @@ files:
376
411
  - app/views/admin/components/image.jbuilder
377
412
  - app/views/admin/components/images.jbuilder
378
413
  - app/views/admin/components/index.html.erb
379
- - app/views/admin/components/links/_content.html.erb
380
- - app/views/admin/components/links/_track.html.erb
381
- - app/views/admin/components/links/_users.html.erb
382
- - app/views/admin/components/links/extra/_content.html.erb
383
- - app/views/admin/components/privileges.html.erb
384
- - app/views/admin/components/privileges/_component_user.html.erb
385
- - app/views/admin/components/privileges/_links.html.erb
386
- - app/views/admin/components/privileges/_users.html.erb
414
+ - app/views/admin/components/links/_base.html.erb
387
415
  - app/views/admin/components/settings.html.erb
388
416
  - app/views/admin/components/settings/_new_parameter.html.erb
389
417
  - app/views/admin/components/settings/_parameters.html.erb
@@ -396,29 +424,48 @@ files:
396
424
  - app/views/admin/dynamic_blocks/entity/_in_list.html.erb
397
425
  - app/views/admin/dynamic_blocks/index.html.erb
398
426
  - app/views/admin/dynamic_blocks/show.html.erb
427
+ - app/views/admin/dynamic_pages/_dynamic_page.jbuilder
399
428
  - app/views/admin/dynamic_pages/_form.html.erb
400
429
  - app/views/admin/dynamic_pages/_nav_item.html.erb
401
430
  - app/views/admin/dynamic_pages/entity/_in_list.html.erb
431
+ - app/views/admin/dynamic_pages/entity/_in_search.html.erb
402
432
  - app/views/admin/dynamic_pages/index.html.erb
433
+ - app/views/admin/dynamic_pages/search.jbuilder
403
434
  - app/views/admin/dynamic_pages/show.html.erb
404
435
  - app/views/admin/index/index.html.erb
405
436
  - app/views/admin/ip_addresses/_nav_item.html.erb
406
437
  - app/views/admin/ip_addresses/entity/_in_list.html.erb
407
438
  - app/views/admin/ip_addresses/index.html.erb
439
+ - app/views/admin/navigation_group_pages/entity/_in_list.html.erb
408
440
  - app/views/admin/navigation_groups/_form.html.erb
409
441
  - app/views/admin/navigation_groups/_nav_item.html.erb
442
+ - app/views/admin/navigation_groups/entity/_dynamic_pages.html.erb
410
443
  - app/views/admin/navigation_groups/entity/_in_list.html.erb
411
444
  - app/views/admin/navigation_groups/index.html.erb
412
445
  - app/views/admin/navigation_groups/show.html.erb
446
+ - app/views/admin/tokens/_form.html.erb
447
+ - app/views/admin/tokens/_nav_item.html.erb
448
+ - app/views/admin/tokens/entity/_in_list.html.erb
449
+ - app/views/admin/tokens/index.html.erb
450
+ - app/views/admin/tokens/show.html.erb
413
451
  - app/views/admin/unauthorized.html.erb
414
452
  - app/views/admin/users/_form.html.erb
415
453
  - app/views/admin/users/_nav_item.html.erb
454
+ - app/views/admin/users/_user.jbuilder
416
455
  - app/views/admin/users/entity/_fields.html.erb
417
456
  - app/views/admin/users/entity/_in_list.html.erb
457
+ - app/views/admin/users/entity/_in_search.html.erb
418
458
  - app/views/admin/users/entity/_profile.html.erb
419
459
  - app/views/admin/users/entity/in_list/_additional_data.html.erb
420
460
  - app/views/admin/users/index.html.erb
461
+ - app/views/admin/users/roles.html.erb
462
+ - app/views/admin/users/roles/_component.html.erb
463
+ - app/views/admin/users/search.jbuilder
421
464
  - app/views/admin/users/show.html.erb
465
+ - app/views/admin/widgets/_filters.html.erb
466
+ - app/views/admin/widgets/_quick_search.html.erb
467
+ - app/views/admin/widgets/filters/_flag.html.erb
468
+ - app/views/admin/widgets/filters/_text.html.erb
422
469
  - app/views/application/forbidden.html.erb
423
470
  - app/views/application/forbidden.jbuilder
424
471
  - app/views/application/not_found.html.erb
@@ -427,6 +474,7 @@ files:
427
474
  - app/views/application/unauthorized.jbuilder
428
475
  - app/views/authentication/new.html.erb
429
476
  - app/views/components/content/_dynamic_page.html.erb
477
+ - app/views/components/content/_dynamic_page_content.html.erb
430
478
  - app/views/components/users/_form_tabs.html.erb
431
479
  - app/views/components/users/_join_form.html.erb
432
480
  - app/views/components/users/_login_form.html.erb
@@ -436,7 +484,10 @@ files:
436
484
  - app/views/contact/create_feedback_message.js.erb
437
485
  - app/views/contact/feedback.html.erb
438
486
  - app/views/contact/index.html.erb
487
+ - app/views/errors/error.html.erb
439
488
  - app/views/fallback/show.html.erb
489
+ - app/views/feedback_mailer/new_feedback_request.html.erb
490
+ - app/views/feedback_mailer/new_feedback_request.text.erb
440
491
  - app/views/index/index.html.erb
441
492
  - app/views/layouts/admin.html.erb
442
493
  - app/views/layouts/admin/_breadcrumbs.html.erb
@@ -448,7 +499,12 @@ files:
448
499
  - app/views/layouts/application/header/_authentication.html.erb
449
500
  - app/views/legal/privacy.html.erb
450
501
  - app/views/legal/tos.html.erb
502
+ - app/views/my/components/index.html.erb
503
+ - app/views/my/components/show.html.erb
451
504
  - app/views/my/confirmations/show.html.erb
505
+ - app/views/my/index/_cards.html.erb
506
+ - app/views/my/index/_email.html.erb
507
+ - app/views/my/index/_navigation.html.erb
452
508
  - app/views/my/index/index.html.erb
453
509
  - app/views/my/profiles/_form.html.erb
454
510
  - app/views/my/profiles/check.jbuilder
@@ -458,6 +514,7 @@ files:
458
514
  - app/views/my/profiles/form/_sensitive_parameters.html.erb
459
515
  - app/views/my/profiles/new.html.erb
460
516
  - app/views/my/profiles/show.html.erb
517
+ - app/views/my/recoveries/show.html.erb
461
518
  - app/views/shared/_breadcrumbs.html.erb
462
519
  - app/views/shared/_cookie_notification.html.erb
463
520
  - app/views/shared/_flash_messages.html.erb
@@ -470,31 +527,40 @@ files:
470
527
  - app/views/shared/admin/_list_with_priority.html.erb
471
528
  - app/views/shared/admin/_priority.html.erb
472
529
  - app/views/shared/admin/_toggle.html.erb
530
+ - app/views/shared/entity/_date_field.html.erb
473
531
  - app/views/shared/entity/_formatted_text_field.html.erb
474
532
  - app/views/shared/entity/_image.html.erb
475
533
  - app/views/shared/entity/_language.html.erb
476
534
  - app/views/shared/entity/_linked_entity.html.erb
535
+ - app/views/shared/entity/_list.html.erb
477
536
  - app/views/shared/entity/_list_of_errors.html.erb
537
+ - app/views/shared/entity/_list_with_priority.html.erb
478
538
  - app/views/shared/entity/_meta_texts.html.erb
479
539
  - app/views/shared/entity/_metadata.html.erb
480
540
  - app/views/shared/entity/_parent.html.erb
481
541
  - app/views/shared/entity/_priority.html.erb
542
+ - app/views/shared/entity/_priority_icons.html.erb
482
543
  - app/views/shared/entity/_raw_text_field.html.erb
483
544
  - app/views/shared/entity/_simple_image.html.erb
484
545
  - app/views/shared/entity/_slug.html.erb
485
546
  - app/views/shared/entity/_text_field.html.erb
486
547
  - app/views/shared/entity/_text_fields.html.erb
548
+ - app/views/shared/entity/_time_field.html.erb
487
549
  - app/views/shared/entity/_timestamps.html.erb
550
+ - app/views/shared/entity/_toggle.html.erb
551
+ - app/views/shared/entity/_track.html.erb
488
552
  - app/views/shared/entity/_tree_caches.html.erb
489
553
  - app/views/shared/entity/_uuid.html.erb
490
554
  - app/views/shared/entity/edit.html.erb
491
555
  - app/views/shared/entity/new.html.erb
492
556
  - app/views/shared/forms/_entity_flags.html.erb
493
557
  - app/views/shared/forms/_field.html.erb
558
+ - app/views/shared/forms/_field_with_search.html.erb
494
559
  - app/views/shared/forms/_fields.html.erb
495
560
  - app/views/shared/forms/_language.html.erb
496
561
  - app/views/shared/forms/_meta_texts.html.erb
497
562
  - app/views/shared/forms/_priority.html.erb
563
+ - app/views/shared/forms/_simple_entity_link.html.erb
498
564
  - app/views/shared/forms/_simple_image.html.erb
499
565
  - app/views/shared/forms/_state_container.html.erb
500
566
  - app/views/shared/forms/_text_area.html.erb
@@ -507,6 +573,9 @@ files:
507
573
  - app/views/shared/forms/simple_image/_load_image.html.erb
508
574
  - app/views/shared/my/_list.html.erb
509
575
  - app/views/shared/my/_list_with_priority.html.erb
576
+ - app/views/shared/my/entity/edit.html.erb
577
+ - app/views/shared/my/entity/new.html.erb
578
+ - app/views/simple_images/_simple_image.jbuilder
510
579
  - app/views/users/_profile.html.erb
511
580
  - app/views/users/profile/_data.html.erb
512
581
  - app/views/users/show.html.erb
@@ -523,14 +592,18 @@ files:
523
592
  - db/migrate/20200224000000_create_track_component.rb
524
593
  - db/migrate/20200224000010_create_users_component.rb
525
594
  - db/migrate/20200404000000_create_simple_images.rb
526
- - db/migrate/20200529000000_create_content_component.rb
527
- - db/migrate/20210401000000_create_contact_component.rb
528
595
  - db/migrate/20210405000000_create_acl.rb
596
+ - db/migrate/20210421000000_create_content_component.rb
597
+ - db/migrate/20210421000010_create_contact_component.rb
598
+ - db/migrate/20210616000000_create_uploaded_files.rb
599
+ - db/migrate/amends/20210816060606_create_oembed_receivers.rb
600
+ - db/migrate/amends/20210907070707_add_checksum_to_simple_images.rb
529
601
  - lib/biovision.rb
530
602
  - lib/biovision/base_methods.rb
531
603
  - lib/biovision/engine.rb
532
604
  - lib/biovision/version.rb
533
605
  - lib/tasks/biovision_tasks.rake
606
+ - lib/tasks/components.rake
534
607
  homepage: https://github.com/Biovision/biovision
535
608
  licenses:
536
609
  - MIT
@@ -551,7 +624,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
551
624
  - !ruby/object:Gem::Version
552
625
  version: '0'
553
626
  requirements: []
554
- rubygems_version: 3.1.4
627
+ rubygems_version: 3.2.30
555
628
  signing_key:
556
629
  specification_version: 4
557
630
  summary: Biovision CMS gem
@@ -1,79 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Biovision
4
- module Components
5
- module Base
6
- # Handling user privileges in component
7
- class PrivilegeHandler
8
- attr_accessor :component
9
-
10
- # @param [BaseComponent] component
11
- def initialize(component)
12
- @component = component
13
- end
14
-
15
- # @param [String|Symbol]
16
- def privilege?(slug)
17
- return false if @component.user_link.nil?
18
-
19
- privileges = Array(@component.user_link.data['privileges'])
20
- privileges.include?(slug)
21
- end
22
-
23
- def administrator!
24
- return if @component.user.nil?
25
-
26
- link = @component.user_link!
27
- link.administrator = true
28
- link.save
29
- end
30
-
31
- def not_administrator!
32
- return if @component.user.nil? || @component.user_link.nil?
33
-
34
- @component.user_link.update(administrator: false)
35
- end
36
-
37
- # @param [Array] new_privileges
38
- def privileges=(new_privileges)
39
- return if @component.user.nil?
40
-
41
- link = @component.user_link!
42
- link.data['privileges'] = Array(new_privileges).uniq
43
- link.save
44
- end
45
-
46
- # @param [Hash] new_settings
47
- def settings=(new_settings)
48
- return if @component.user.nil?
49
-
50
- link = @component.user_link!
51
- link.data['settings'] = new_settings
52
- link.save
53
- end
54
-
55
- # @param [String] slug
56
- def add_privilege(slug)
57
- return if @component.user.nil?
58
-
59
- link = @component.user_link!
60
- link.data['privileges'] ||= []
61
- link.data['privileges'] += [slug.to_s]
62
- link.data['privileges'].uniq!
63
- link.save
64
- end
65
-
66
- # @param [String] slug
67
- def remove_privilege(slug)
68
- link = @component.user_link
69
-
70
- return if link.nil?
71
-
72
- link.data['privileges'] ||= []
73
- link.data['privileges'] -= [slug.to_s]
74
- link.save
75
- end
76
- end
77
- end
78
- end
79
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # User data in biovision component
4
- #
5
- # Attributes:
6
- # administrator [boolean]
7
- # biovision_component_id [BiovisionComponent]
8
- # created_at [DateTime]
9
- # data [jsonb]
10
- # updated_at [DateTime]
11
- # user_id [User]
12
- class BiovisionComponentUser < ApplicationRecord
13
- include HasOwner
14
-
15
- belongs_to :biovision_component
16
- belongs_to :user
17
-
18
- validates_uniqueness_of :user_id, scope: :biovision_component_id
19
-
20
- scope :recent, -> { order('updated_at desc') }
21
- end
@@ -1,9 +0,0 @@
1
- <li><%= render 'admin/navigation_groups/nav_item' %></li>
2
- <li><%= render 'admin/dynamic_blocks/nav_item' %></li>
3
- <li><%= render 'admin/dynamic_pages/nav_item' %></li>
4
- <%=
5
- render(
6
- partial: 'admin/components/links/extra/content',
7
- locals: { handler: handler }
8
- )
9
- %>
@@ -1,2 +0,0 @@
1
- <li><%= render 'admin/agents/nav_item' %></li>
2
- <li><%= render 'admin/ip_addresses/nav_item' %></li>
@@ -1,4 +0,0 @@
1
- <li><%= render 'admin/users/nav_item' %></li>
2
- <!-- <li><%#= render 'admin/login_attempts/nav_item' %></li>-->
3
- <!-- <li><%#= render 'admin/tokens/nav_item' %></li>-->
4
- <!-- <li><%#= render 'admin/codes/nav_item' %></li>-->
@@ -1,17 +0,0 @@
1
- <figure class="image">
2
- <%= user_image_small(entity.user) %>
3
- </figure>
4
- <div class="data">
5
- <div><%= admin_user_link(entity.user) %></div>
6
- <div>
7
- <%=
8
- render(
9
- partial: 'admin/components/privileges/links',
10
- locals: {
11
- handler: handler,
12
- entity: entity
13
- }
14
- )
15
- %>
16
- </div>
17
- </div>
@@ -1,17 +0,0 @@
1
- <ul class="entity-links">
2
- <li>
3
- <% element_id = "component_administrator_#{handler.slug}_#{entity.user_id}" %>
4
- <%=
5
- check_box_tag(
6
- 'user_id',
7
- entity.user_id,
8
- entity.administrator?,
9
- data: {
10
- url: admin_component_administrators_path(slug: handler.slug, user_id: entity.user_id)
11
- },
12
- id: element_id
13
- )
14
- %>
15
- <%= label_tag(element_id, t('activerecord.attributes.biovision_component_user.administrator')) %>
16
- </li>
17
- </ul>
@@ -1,23 +0,0 @@
1
- <section>
2
- <h2><%= t('.heading') %></h2>
3
-
4
- <% if collection.any? %>
5
- <ul class="list-of-entities">
6
- <% collection.each do |entity| %>
7
- <li data-id="<%= entity.id %>">
8
- <%=
9
- render(
10
- partial: 'admin/components/privileges/component_user',
11
- locals: {
12
- handler: handler,
13
- entity: entity
14
- }
15
- )
16
- %>
17
- </li>
18
- <% end %>
19
- </ul>
20
- <% else %>
21
- <%= render 'shared/nothing_found' %>
22
- <% end %>
23
- </section>
@@ -1,20 +0,0 @@
1
- <% content_for :meta_title, t('.title', slug: @handler.slug) %>
2
- <% content_for :breadcrumbs do %>
3
- <%= link_to(t('admin.components.index.nav_text'), admin_components_path) %>
4
- <%= admin_biovision_component_link(@handler.component, @handler.name) %>
5
- <span><%= t('.nav_text') %></span>
6
- <% end %>
7
-
8
- <article>
9
- <h1><%= @handler.name %></h1>
10
-
11
- <%=
12
- render(
13
- partial: 'admin/components/privileges/users',
14
- locals: {
15
- collection: @handler.component.privileges,
16
- handler: @handler
17
- }
18
- )
19
- %>
20
- </article>