biovision 0.0.200518.1 → 0.12.211124.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 +105 -52
- data/app/assets/images/biovision/icons/back.svg +19 -0
- data/app/assets/images/biovision/icons/create.svg +19 -0
- data/app/assets/images/biovision/icons/destroy.svg +12 -0
- data/app/assets/images/biovision/icons/dropdown.svg +3 -0
- data/app/assets/images/biovision/icons/edit.svg +22 -0
- data/app/assets/images/biovision/icons/gear.svg +11 -0
- data/app/assets/images/biovision/icons/return.svg +25 -0
- data/app/assets/images/biovision/icons/world.svg +11 -0
- data/app/assets/stylesheets/biovision/admin/components/users.scss +20 -0
- data/app/assets/stylesheets/biovision/admin/components.scss +13 -1
- data/app/assets/stylesheets/biovision/admin/layout.scss +27 -12
- data/app/assets/stylesheets/biovision/biovision.scss +105 -26
- data/app/assets/stylesheets/biovision/components/breadcrumbs.scss +13 -0
- data/app/assets/stylesheets/biovision/components/buttons.scss +130 -0
- data/app/assets/stylesheets/biovision/components/filters.scss +39 -0
- data/app/assets/stylesheets/biovision/components/forms.scss +208 -1
- data/app/assets/stylesheets/biovision/components/lists.scss +6 -7
- data/app/assets/stylesheets/biovision/{biovision → components}/messages.scss +9 -0
- data/app/assets/stylesheets/biovision/components/pagination.scss +34 -0
- data/app/assets/stylesheets/biovision/components/quick_search.scss +24 -0
- data/app/assets/stylesheets/biovision/components/simple_image.scss +112 -0
- data/app/assets/stylesheets/biovision/components/toggleable.scss +71 -0
- data/app/assets/stylesheets/biovision/components.scss +7 -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/form_tabs.scss +101 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users/profile.scss +77 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components/users.scss +3 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components.scss +2 -3
- 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 +8 -19
- 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 +37 -97
- data/app/controllers/admin/dynamic_blocks_controller.rb +15 -0
- data/app/controllers/admin/dynamic_pages_controller.rb +15 -0
- data/app/controllers/admin/index_controller.rb +8 -2
- data/app/controllers/admin/navigation_groups_controller.rb +45 -0
- data/app/controllers/admin/tokens_controller.rb +15 -0
- data/app/controllers/admin/users_controller.rb +101 -0
- data/app/controllers/admin_controller.rb +2 -8
- data/app/controllers/authentication_controller.rb +6 -34
- data/app/controllers/concerns/authentication.rb +12 -12
- data/app/controllers/concerns/component_stories.rb +22 -0
- data/app/controllers/concerns/crud_entities.rb +140 -0
- data/app/controllers/concerns/entity_priority.rb +10 -0
- 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/concerns/toggleable_entity.rb +31 -0
- data/app/controllers/contact_controller.rb +49 -0
- data/app/controllers/errors_controller.rb +37 -0
- data/app/controllers/fallback_controller.rb +12 -0
- data/app/controllers/index_controller.rb +1 -0
- data/app/controllers/legal_controller.rb +14 -0
- data/app/controllers/my/components_controller.rb +26 -0
- data/app/controllers/my/confirmations_controller.rb +44 -0
- data/app/controllers/my/index_controller.rb +7 -1
- data/app/controllers/my/profiles_controller.rb +33 -16
- data/app/controllers/oembed_controller.rb +12 -0
- data/app/controllers/profile_controller.rb +14 -0
- data/app/controllers/users_controller.rb +63 -0
- data/app/helpers/biovision_components_helper.rb +7 -3
- data/app/helpers/biovision_helper.rb +170 -0
- data/app/helpers/entity_helper.rb +77 -0
- data/app/helpers/my_helper.rb +34 -0
- data/app/helpers/simple_image_helper.rb +125 -0
- data/app/jobs/application_job.rb +7 -0
- data/app/jobs/send_phone_confirmation_job.rb +16 -0
- data/app/lib/biovision/components/base/component_parameters.rb +55 -0
- data/app/lib/biovision/components/base/component_privileges.rb +75 -0
- data/app/lib/biovision/components/base/component_settings.rb +40 -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 +63 -95
- data/app/lib/biovision/components/contact_component.rb +26 -0
- 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 +65 -0
- data/app/lib/biovision/components/track_component.rb +3 -0
- data/app/lib/biovision/components/users/authentication.rb +15 -7
- data/app/lib/biovision/components/users/codes.rb +104 -0
- data/app/lib/biovision/components/users/flag_helpers.rb +72 -0
- data/app/lib/biovision/components/users/profile_handler.rb +111 -1
- data/app/lib/biovision/components/users/registration_handler.rb +40 -52
- data/app/lib/biovision/components/users/validation.rb +83 -0
- data/app/lib/biovision/components/users_component.rb +114 -19
- 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/notifiers/base_notifier.rb +2 -2
- data/app/lib/biovision/notifiers/contact_notifier.rb +15 -0
- data/app/lib/biovision/stories/component_story.rb +55 -0
- data/app/lib/canonizer.rb +38 -0
- data/app/lib/carrier_wave/image_optim.rb +32 -0
- data/app/mailers/code_sender.rb +29 -0
- data/app/mailers/feedback_mailer.rb +14 -0
- data/app/models/agent.rb +4 -0
- data/app/models/biovision_component.rb +39 -3
- data/app/models/code.rb +31 -8
- data/app/models/concerns/checkable.rb +2 -1
- data/app/models/concerns/has_simple_image.rb +9 -0
- data/app/models/concerns/has_uploaded_file.rb +26 -0
- data/app/models/concerns/meta_texts.rb +25 -5
- data/app/models/concerns/simple_tag.rb +30 -0
- data/app/models/concerns/toggleable.rb +2 -1
- data/app/models/concerns/tree_structure.rb +75 -0
- data/app/models/contact_method.rb +47 -0
- data/app/models/contact_type.rb +27 -0
- data/app/models/dynamic_block.rb +43 -0
- data/app/models/dynamic_page.rb +73 -0
- data/app/models/feedback_message.rb +65 -0
- data/app/models/feedback_response.rb +50 -0
- data/app/models/group.rb +48 -0
- data/app/models/language.rb +4 -0
- data/app/models/metric.rb +4 -0
- data/app/models/navigation_group.rb +43 -0
- data/app/models/navigation_group_page.rb +23 -0
- 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 +86 -0
- data/app/models/role_group.rb +13 -0
- data/app/models/simple_image.rb +49 -8
- 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 +122 -29
- data/app/models/user_group.rb +20 -0
- data/app/models/user_role.rb +18 -0
- data/app/uploaders/simple_file_uploader.rb +23 -0
- data/app/uploaders/simple_image_uploader.rb +29 -20
- data/app/uploaders/uploaders/path_slug.rb +22 -0
- data/app/views/admin/agents/index.html.erb +1 -3
- 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/_image.jbuilder +18 -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/image.jbuilder +1 -0
- data/app/views/admin/components/images.jbuilder +4 -0
- data/app/views/admin/components/links/_base.html.erb +1 -0
- data/app/views/admin/components/settings/_new_parameter.html.erb +4 -2
- data/app/views/admin/components/settings/_parameters.html.erb +8 -2
- data/app/views/admin/components/settings/_settings.html.erb +4 -4
- data/app/views/admin/components/settings.html.erb +2 -1
- data/app/views/admin/components/update_privileges.jbuilder +21 -0
- data/app/views/admin/dynamic_blocks/_form.html.erb +16 -0
- data/app/views/admin/dynamic_blocks/_nav_item.html.erb +6 -0
- data/app/views/admin/dynamic_blocks/entity/_in_list.html.erb +12 -0
- data/app/views/admin/dynamic_blocks/index.html.erb +17 -0
- data/app/views/admin/dynamic_blocks/show.html.erb +25 -0
- data/app/views/admin/dynamic_pages/_dynamic_page.jbuilder +18 -0
- data/app/views/admin/dynamic_pages/_form.html.erb +21 -0
- data/app/views/admin/dynamic_pages/_nav_item.html.erb +6 -0
- data/app/views/admin/dynamic_pages/entity/_in_list.html.erb +17 -0
- data/app/views/admin/dynamic_pages/entity/_in_search.html.erb +7 -0
- data/app/views/admin/dynamic_pages/index.html.erb +17 -0
- data/app/views/admin/dynamic_pages/search.jbuilder +4 -0
- data/app/views/admin/dynamic_pages/show.html.erb +28 -0
- data/app/views/admin/index/index.html.erb +7 -5
- data/app/views/admin/ip_addresses/index.html.erb +2 -4
- data/app/views/admin/navigation_group_pages/entity/_in_list.html.erb +26 -0
- data/app/views/admin/navigation_groups/_form.html.erb +15 -0
- data/app/views/admin/navigation_groups/_nav_item.html.erb +6 -0
- data/app/views/admin/navigation_groups/entity/_dynamic_pages.html.erb +38 -0
- data/app/views/admin/navigation_groups/entity/_in_list.html.erb +14 -0
- data/app/views/admin/navigation_groups/index.html.erb +17 -0
- data/app/views/admin/navigation_groups/show.html.erb +33 -0
- 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/unauthorized.html.erb +2 -5
- data/app/views/admin/users/_form.html.erb +81 -0
- data/app/views/admin/users/_nav_item.html.erb +6 -0
- data/app/views/admin/users/_user.jbuilder +18 -0
- data/app/views/admin/users/entity/_fields.html.erb +53 -0
- data/app/views/admin/users/entity/_in_list.html.erb +38 -0
- data/app/views/admin/users/entity/_in_search.html.erb +18 -0
- data/app/views/admin/users/entity/_profile.html.erb +26 -0
- data/app/views/admin/users/entity/in_list/_additional_data.html.erb +0 -0
- data/app/views/admin/users/index.html.erb +24 -0
- 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 +62 -0
- 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/forbidden.html.erb +9 -0
- data/app/views/application/forbidden.jbuilder +4 -0
- data/app/views/application/not_found.html.erb +9 -0
- data/app/views/application/not_found.jbuilder +4 -0
- data/app/views/application/unauthorized.html.erb +19 -0
- data/app/views/application/unauthorized.jbuilder +4 -0
- data/app/views/authentication/new.html.erb +2 -8
- data/app/views/components/content/_dynamic_page.html.erb +17 -0
- data/app/views/components/content/_dynamic_page_content.html.erb +14 -0
- data/app/views/components/users/_form_tabs.html.erb +31 -0
- data/app/views/components/users/_join_form.html.erb +192 -0
- data/app/views/components/users/_login_form.html.erb +46 -0
- data/app/views/components/users/form/_image.html.erb +17 -0
- data/app/views/components/users/form/_profile_data.html.erb +54 -0
- data/app/views/contact/_form.html.erb +108 -0
- data/app/views/contact/create_feedback_message.js.erb +1 -0
- data/app/views/contact/feedback.html.erb +13 -0
- data/app/views/contact/index.html.erb +16 -0
- data/app/views/errors/error.html.erb +1 -0
- data/app/views/fallback/show.html.erb +6 -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/_footer.html.erb +1 -1
- 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/legal/privacy.html.erb +5 -0
- data/app/views/legal/tos.html.erb +5 -0
- data/app/views/my/components/index.html.erb +25 -0
- data/app/views/my/components/show.html.erb +21 -0
- data/app/views/my/confirmations/show.html.erb +62 -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 +12 -0
- data/app/views/my/profiles/_form.html.erb +10 -0
- data/app/views/my/profiles/check.jbuilder +4 -0
- data/app/views/my/profiles/edit.html.erb +14 -0
- data/app/views/my/profiles/form/_basic_parameters.html.erb +9 -0
- data/app/views/my/profiles/form/_sensitive_parameters.html.erb +68 -0
- data/app/views/my/profiles/new.html.erb +6 -8
- data/app/views/my/profiles/show.html.erb +36 -0
- data/app/views/my/recoveries/show.html.erb +0 -0
- data/app/views/shared/_flash_messages.html.erb +1 -1
- data/app/views/shared/_list_of_errors.html.erb +7 -0
- data/app/views/shared/admin/_breadcrumbs.html.erb +8 -0
- data/app/views/shared/admin/_list.html.erb +10 -19
- data/app/views/shared/admin/_list_with_priority.html.erb +10 -19
- data/app/views/shared/admin/_priority.html.erb +6 -0
- data/app/views/shared/admin/_toggle.html.erb +6 -0
- data/app/views/shared/entity/_date_field.html.erb +6 -0
- data/app/views/shared/entity/_formatted_text_field.html.erb +10 -0
- data/app/views/shared/entity/_image.html.erb +31 -0
- data/app/views/shared/entity/_language.html.erb +6 -0
- data/app/views/shared/entity/_linked_entity.html.erb +6 -0
- data/app/views/shared/entity/_list.html.erb +22 -0
- data/app/views/shared/entity/_list_with_priority.html.erb +22 -0
- data/app/views/shared/entity/_meta_texts.html.erb +16 -0
- data/app/views/shared/entity/_metadata.html.erb +18 -0
- data/app/views/shared/entity/_parent.html.erb +6 -0
- data/app/views/shared/entity/_priority.html.erb +4 -0
- data/app/views/shared/entity/_priority_icons.html.erb +8 -0
- data/app/views/shared/entity/_raw_text_field.html.erb +10 -0
- data/app/views/shared/entity/_simple_image.html.erb +10 -0
- data/app/views/shared/entity/_slug.html.erb +6 -0
- data/app/views/shared/entity/_text_field.html.erb +6 -0
- data/app/views/shared/entity/_text_fields.html.erb +9 -0
- data/app/views/shared/entity/_time_field.html.erb +6 -0
- data/app/views/shared/entity/_timestamps.html.erb +13 -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 +19 -0
- data/app/views/shared/entity/_uuid.html.erb +4 -0
- data/app/views/shared/entity/edit.html.erb +23 -0
- data/app/views/shared/entity/new.html.erb +16 -0
- data/app/views/shared/forms/_entity_flags.html.erb +15 -0
- data/app/views/shared/forms/_field.html.erb +50 -0
- data/app/views/shared/forms/_field_with_search.html.erb +17 -0
- data/app/views/shared/forms/_fields.html.erb +3 -0
- data/app/views/shared/forms/_language.html.erb +40 -0
- data/app/views/shared/forms/_meta_texts.html.erb +27 -0
- data/app/views/shared/forms/_priority.html.erb +13 -0
- data/app/views/shared/forms/_simple_entity_link.html.erb +14 -0
- data/app/views/shared/forms/_simple_image.html.erb +47 -0
- data/app/views/shared/forms/_state_container.html.erb +7 -0
- data/app/views/shared/forms/_text_area.html.erb +25 -0
- data/app/views/shared/forms/_text_field.html.erb +24 -0
- data/app/views/shared/forms/_text_fields.html.erb +3 -0
- data/app/views/shared/forms/check.jbuilder +4 -0
- data/app/views/shared/forms/errors.jbuilder +3 -0
- data/app/views/shared/forms/simple_image/_browse.html.erb +14 -0
- data/app/views/shared/forms/simple_image/_load_image.html.erb +38 -0
- data/app/views/shared/my/_list.html.erb +10 -0
- data/app/views/shared/my/_list_with_priority.html.erb +10 -0
- 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/app/views/users/_profile.html.erb +30 -0
- data/app/views/users/profile/_data.html.erb +20 -0
- data/app/views/users/show.html.erb +21 -0
- data/config/locales/biovision-ru.yml +76 -1
- data/config/locales/components-ru.yml +55 -4
- data/config/locales/contact-ru.yml +110 -0
- data/config/locales/content-ru.yml +115 -0
- data/config/locales/users-ru.yml +142 -3
- data/config/routes.rb +99 -48
- data/db/migrate/20191228000000_create_biovision_components.rb +6 -5
- data/db/migrate/20200224000000_create_track_component.rb +9 -14
- data/db/migrate/20200224000010_create_users_component.rb +14 -83
- data/db/migrate/20200404000000_create_simple_images.rb +4 -3
- data/db/migrate/20210405000000_create_acl.rb +88 -0
- data/db/migrate/20210421000000_create_content_component.rb +80 -0
- data/db/migrate/20210421000010_create_contact_component.rb +74 -0
- 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 +17 -29
- data/lib/biovision/engine.rb +8 -13
- data/lib/biovision/version.rb +1 -1
- data/lib/tasks/components.rake +51 -0
- metadata +266 -27
- data/app/assets/images/biovision/placeholders/user.svg +0 -15
- data/app/helpers/users_helper.rb +0 -11
- data/app/lib/biovision/components/component_settings.rb +0 -30
- data/app/lib/biovision/components/privilege_handler.rb +0 -77
- data/app/lib/biovision/components/users/code_handler.rb +0 -23
- data/app/models/biovision_component_user.rb +0 -21
- data/app/models/foreign_site.rb +0 -34
- data/app/models/foreign_user.rb +0 -21
- data/app/uploaders/user_image_uploader.rb +0 -58
- data/app/views/admin/components/links/_track.html.erb +0 -2
- data/app/views/admin/components/links/_users.html.erb +0 -11
- data/app/views/admin/components/privileges/_component_user.html.erb +0 -17
- data/app/views/admin/components/privileges/_links.html.erb +0 -35
- data/app/views/admin/components/privileges/_privilege_flag.html.erb +0 -28
- data/app/views/admin/components/privileges/_users.html.erb +0 -23
- data/app/views/admin/components/privileges.html.erb +0 -20
- data/app/views/authentication/_form.html.erb +0 -40
- data/app/views/authentication/failed.js.erb +0 -3
- data/app/views/my/profiles/new/_form.html.erb +0 -147
- data/app/views/shared/admin/_toggleable.html.erb +0 -8
@@ -0,0 +1,62 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('my.index.index.nav_text'), my_path) %>
|
4
|
+
<span><%= t('.nav_text') %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article class="content-wrapper">
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<% if current_user&.email_confirmed? %>
|
11
|
+
<div class="message-box notice">
|
12
|
+
<%= t('activerecord.attributes.user.email_confirmed') %>
|
13
|
+
</div>
|
14
|
+
<% else %>
|
15
|
+
<section id="confirmation-container">
|
16
|
+
<h2><%= t('.got_code') %></h2>
|
17
|
+
<%= form_with url: my_confirmation_path, method: :patch, local: true do %>
|
18
|
+
<dl class="fields">
|
19
|
+
<div>
|
20
|
+
<dt>
|
21
|
+
<%= label_tag :code, t('activerecord.attributes.code.body') %>
|
22
|
+
</dt>
|
23
|
+
<dd>
|
24
|
+
<%=
|
25
|
+
text_field_tag(
|
26
|
+
:code,
|
27
|
+
param_from_request(:code),
|
28
|
+
class: 'input-text',
|
29
|
+
required: true
|
30
|
+
)
|
31
|
+
%>
|
32
|
+
</dd>
|
33
|
+
</div>
|
34
|
+
</dl>
|
35
|
+
<div>
|
36
|
+
<%= button_tag t('.confirm'), class: 'button button-primary' %>
|
37
|
+
</div>
|
38
|
+
<% end %>
|
39
|
+
</section>
|
40
|
+
|
41
|
+
<% unless param_from_request(:instant).blank? %>
|
42
|
+
<script>
|
43
|
+
'use strict';
|
44
|
+
|
45
|
+
document.addEventListener('DOMContentLoaded', function () {
|
46
|
+
document.querySelector('#confirmation-container form').submit();
|
47
|
+
});
|
48
|
+
</script>
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<% unless current_user.nil? %>
|
52
|
+
<section>
|
53
|
+
<h2><%= t('.no_code') %></h2>
|
54
|
+
<%= form_with url: my_confirmation_path, method: :post, local: true do %>
|
55
|
+
<div>
|
56
|
+
<%= button_tag t('.send_code'), class: 'button button-primary' %>
|
57
|
+
</div>
|
58
|
+
<% end %>
|
59
|
+
</section>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
62
|
+
</article>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<section class="my__component-cards">
|
2
|
+
<% prefix = 'my/components/' %>
|
3
|
+
<% BiovisionComponent.list_for_user.each do |component| %>
|
4
|
+
<% handler = Biovision::Components::BaseComponent.handler(component, current_user) %>
|
5
|
+
<% next unless handler&.permit?('default') %>
|
6
|
+
<% if lookup_context.exists?("#{prefix}_#{component.slug}") %>
|
7
|
+
<%=
|
8
|
+
render(
|
9
|
+
partial: "#{prefix}#{component.slug}",
|
10
|
+
locals: { user: @entity, handler: handler }
|
11
|
+
)
|
12
|
+
%>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
</section>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% if handler.needs_email_confirmation? %>
|
2
|
+
<div class="message-box warning">
|
3
|
+
<p><%= t('.email_is_not_confirmed') %></p>
|
4
|
+
<p>
|
5
|
+
<%=
|
6
|
+
link_to(
|
7
|
+
t('my.confirmations.show.nav_text'),
|
8
|
+
my_confirmation_path,
|
9
|
+
class: 'button button-secondary'
|
10
|
+
)
|
11
|
+
%>
|
12
|
+
</p>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<nav>
|
2
|
+
<%=
|
3
|
+
link_to(
|
4
|
+
t('my.profiles.show.nav_text'),
|
5
|
+
my_profile_path,
|
6
|
+
class: 'button button-ghost'
|
7
|
+
)
|
8
|
+
%>
|
9
|
+
<%=
|
10
|
+
link_to(
|
11
|
+
t('my.components.index.nav_text'),
|
12
|
+
my_dashboard_path,
|
13
|
+
class: 'button button-ghost'
|
14
|
+
)
|
15
|
+
%>
|
16
|
+
<% if current_user.role?('base.admin') %>
|
17
|
+
<%=
|
18
|
+
link_to(
|
19
|
+
t('admin.index.index.nav_text'),
|
20
|
+
admin_path,
|
21
|
+
class: 'button button-secondary'
|
22
|
+
)
|
23
|
+
%>
|
24
|
+
<% end %>
|
25
|
+
<%=
|
26
|
+
link_to(
|
27
|
+
t(:log_out),
|
28
|
+
logout_path,
|
29
|
+
class: 'button button-secondary',
|
30
|
+
method: :delete
|
31
|
+
)
|
32
|
+
%>
|
33
|
+
</nav>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<span><%= t('.nav_text') %></span>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<article class="content-wrapper">
|
7
|
+
<h1><%= t('.heading') %></h1>
|
8
|
+
|
9
|
+
<%= render partial: 'my/index/email', locals: { handler: component_handler } %>
|
10
|
+
<%= render 'my/index/navigation' %>
|
11
|
+
<%= render 'my/index/cards' %>
|
12
|
+
</article>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= form_with(model: entity, url: my_profile_path, method: :patch ) do |f| %>
|
2
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
3
|
+
<%= render partial: 'my/profiles/form/basic_parameters', locals: { f: f, entity: entity } %>
|
4
|
+
<%= render partial: 'my/profiles/form/sensitive_parameters', locals: { f: f, entity: entity } %>
|
5
|
+
<%= render 'shared/forms/state_container' %>
|
6
|
+
|
7
|
+
<div class="buttons">
|
8
|
+
<%= f.button t(:save), class: 'button button-save' %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('my.index.index.nav_text'), my_path) %>
|
4
|
+
<%= link_to(t('my.profiles.show.nav_text'), my_profile_path) %>
|
5
|
+
<span><%= t('.nav_text') %></span>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<article>
|
9
|
+
<div class="content-wrapper">
|
10
|
+
<h1><%= t('.heading') %></h1>
|
11
|
+
|
12
|
+
<%= render partial: 'my/profiles/form', locals: { entity: current_user } %>
|
13
|
+
</div>
|
14
|
+
</article>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<section class="users__profile-form">
|
2
|
+
<h3><%= t('.heading') %></h3>
|
3
|
+
|
4
|
+
<dl class="fields">
|
5
|
+
<%= render partial: 'components/users/form/image', locals: { f: f, entity: entity } %>
|
6
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :birthday } %>
|
7
|
+
<%= render partial: 'components/users/form/profile_data', locals: { data: entity.profile.to_h } %>
|
8
|
+
</dl>
|
9
|
+
</section>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<section class="users__profile-form">
|
2
|
+
<h3><%= t('.heading') %></h3>
|
3
|
+
|
4
|
+
<p class="hint"><%= t('.sensitive_parameters_require_password') %></p>
|
5
|
+
|
6
|
+
<dl class="fields">
|
7
|
+
<div>
|
8
|
+
<dt><%= label_tag :password, t('.current_password') %></dt>
|
9
|
+
<dd>
|
10
|
+
<%=
|
11
|
+
password_field_tag(
|
12
|
+
:password,
|
13
|
+
'',
|
14
|
+
class: 'input-text'
|
15
|
+
)
|
16
|
+
%>
|
17
|
+
<div class="guideline"><%= t('.leave_blank_if_not_changing') %></div>
|
18
|
+
</dd>
|
19
|
+
</div>
|
20
|
+
<div>
|
21
|
+
<dt><%= f.label :password, t('.new_password') %></dt>
|
22
|
+
<dd>
|
23
|
+
<%=
|
24
|
+
f.text_field(
|
25
|
+
:password,
|
26
|
+
class: 'input-text',
|
27
|
+
data: { check: :password },
|
28
|
+
maxlength: 70,
|
29
|
+
size: nil
|
30
|
+
)
|
31
|
+
%>
|
32
|
+
</dd>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div>
|
36
|
+
<dt><%= f.label :password_confirmation %></dt>
|
37
|
+
<dd>
|
38
|
+
<%=
|
39
|
+
f.text_field(
|
40
|
+
:password_confirmation,
|
41
|
+
class: 'input-text',
|
42
|
+
maxlength: 70,
|
43
|
+
size: nil
|
44
|
+
)
|
45
|
+
%>
|
46
|
+
</dd>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div>
|
50
|
+
<dt><%= f.label :email %></dt>
|
51
|
+
<dd>
|
52
|
+
<%=
|
53
|
+
f.email_field(
|
54
|
+
:email,
|
55
|
+
class: 'input-text',
|
56
|
+
maxlength: User::EMAIL_LIMIT,
|
57
|
+
required: entity.email_as_login?,
|
58
|
+
size: nil
|
59
|
+
)
|
60
|
+
%>
|
61
|
+
</dd>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<% if component_handler.use_phone? %>
|
65
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :phone, type: :phone } %>
|
66
|
+
<% end %>
|
67
|
+
</dl>
|
68
|
+
</section>
|
@@ -5,13 +5,11 @@
|
|
5
5
|
|
6
6
|
<article>
|
7
7
|
<div class="content-wrapper">
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<%= link_to(t('authentication.new.nav_text'), login_path, class: 'button-nav') %>
|
15
|
-
</nav>
|
8
|
+
<%=
|
9
|
+
render(
|
10
|
+
partial: 'components/users/form_tabs',
|
11
|
+
locals: { current: 'join', entity: @entity }
|
12
|
+
)
|
13
|
+
%>
|
16
14
|
</div>
|
17
15
|
</article>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('my.index.index.nav_text'), my_path) %>
|
4
|
+
<span><%= t('.nav_text') %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<div class="content-wrapper">
|
9
|
+
<h1><%= t('.heading') %></h1>
|
10
|
+
|
11
|
+
<nav>
|
12
|
+
<%=
|
13
|
+
link_to(
|
14
|
+
t('my.profiles.edit.nav_text'),
|
15
|
+
edit_my_profile_path,
|
16
|
+
class: 'button button-ghost'
|
17
|
+
)
|
18
|
+
%>
|
19
|
+
</nav>
|
20
|
+
|
21
|
+
<%= render partial: 'users/profile', locals: { user: current_user } %>
|
22
|
+
|
23
|
+
<% prefix = 'my/profiles/components/' %>
|
24
|
+
<% BiovisionComponent.list_for_user.each do |component| %>
|
25
|
+
<% handler = Biovision::Components::BaseComponent.handler(component, current_user) %>
|
26
|
+
<% if lookup_context.exists?("#{prefix}_#{component.slug}") %>
|
27
|
+
<%=
|
28
|
+
render(
|
29
|
+
partial: "#{prefix}#{component.slug}",
|
30
|
+
locals: { handler: handler }
|
31
|
+
)
|
32
|
+
%>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
</article>
|
File without changes
|
@@ -1,19 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
)
|
13
|
-
%>
|
14
|
-
</li>
|
15
|
-
<% end %>
|
16
|
-
</ul>
|
17
|
-
<% else %>
|
18
|
-
<%= render 'shared/nothing_found' %>
|
19
|
-
<% end %>
|
1
|
+
<%=
|
2
|
+
render(
|
3
|
+
partial: 'shared/entity/list',
|
4
|
+
locals: {
|
5
|
+
collection: collection,
|
6
|
+
handler: local_assigns[:handler],
|
7
|
+
scope: :admin
|
8
|
+
}
|
9
|
+
)
|
10
|
+
%>
|
@@ -1,19 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
)
|
13
|
-
%>
|
14
|
-
</li>
|
15
|
-
<% end %>
|
16
|
-
</ol>
|
17
|
-
<% else %>
|
18
|
-
<%= render 'shared/nothing_found' %>
|
19
|
-
<% end %>
|
1
|
+
<%=
|
2
|
+
render(
|
3
|
+
partial: 'shared/entity/list_with_priority',
|
4
|
+
locals: {
|
5
|
+
collection: collection,
|
6
|
+
handler: local_assigns[:handler],
|
7
|
+
scope: :admin
|
8
|
+
}
|
9
|
+
)
|
10
|
+
%>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% unless entity.image.blank? %>
|
2
|
+
<% figure_id = "#{entity.class.table_name}-image" %>
|
3
|
+
<div>
|
4
|
+
<dt><%= t('attributes.image') %></dt>
|
5
|
+
<dd>
|
6
|
+
<figure role="group" class="preview" id="<%= figure_id %>">
|
7
|
+
<%= link_to(simple_image_medium(entity), entity.image.url) %>
|
8
|
+
<% if entity.respond_to?(:image_alt_text) %>
|
9
|
+
<figcaption><%= entity.image_alt_text %></figcaption>
|
10
|
+
<% end %>
|
11
|
+
</figure>
|
12
|
+
<% if local_assigns[:image_removal_url] %>
|
13
|
+
<div>
|
14
|
+
<%=
|
15
|
+
button_tag(
|
16
|
+
t('.remove_image'),
|
17
|
+
class: 'button button-danger js-image-remover',
|
18
|
+
data: {
|
19
|
+
url: image_removal_url,
|
20
|
+
text: t(:are_you_sure),
|
21
|
+
blank_url: image_path('biovision/placeholders/1x1.svg'),
|
22
|
+
container: figure_id
|
23
|
+
},
|
24
|
+
type: :button
|
25
|
+
)
|
26
|
+
%>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
29
|
+
</dd>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%
|
2
|
+
view_scope = %i[admin my].include?(local_assigns[:scope].to_sym) ? "#{scope}/" : ''
|
3
|
+
use_pagination = collection.respond_to?(:current_page)
|
4
|
+
%>
|
5
|
+
<%= paginate collection if use_pagination %>
|
6
|
+
<% if collection.any? %>
|
7
|
+
<ul class="list-of-entities">
|
8
|
+
<% collection.each do |entity| %>
|
9
|
+
<li data-id="<%= entity.id %>">
|
10
|
+
<%=
|
11
|
+
render(
|
12
|
+
partial: "#{view_scope}#{entity.class.table_name}/entity/in_list",
|
13
|
+
locals: { entity: entity, handler: local_assigns[:handler] }
|
14
|
+
)
|
15
|
+
%>
|
16
|
+
</li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
<%= paginate collection if use_pagination %>
|
20
|
+
<% else %>
|
21
|
+
<%= render 'shared/nothing_found' %>
|
22
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%
|
2
|
+
view_scope = %i[admin my].include?(local_assigns[:scope].to_sym) ? "#{scope}/" : ''
|
3
|
+
use_pagination = collection.respond_to?(:current_page)
|
4
|
+
%>
|
5
|
+
<%= paginate collection if use_pagination %>
|
6
|
+
<% if collection.any? %>
|
7
|
+
<ol class="list-of-entities">
|
8
|
+
<% collection.each do |entity| %>
|
9
|
+
<li data-id="<%= entity.id %>" data-number="<%= entity.priority %>">
|
10
|
+
<%=
|
11
|
+
render(
|
12
|
+
partial: "#{view_scope}#{entity.class.table_name}/entity/in_list",
|
13
|
+
locals: { entity: entity, handler: local_assigns[:handler] }
|
14
|
+
)
|
15
|
+
%>
|
16
|
+
</li>
|
17
|
+
<% end %>
|
18
|
+
</ol>
|
19
|
+
<%= paginate collection if use_pagination %>
|
20
|
+
<% else %>
|
21
|
+
<%= render 'shared/nothing_found' %>
|
22
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% list = entity.meta! %>
|
2
|
+
<% unless list.blank? %>
|
3
|
+
<div>
|
4
|
+
<dt><%= t('shared.forms.meta_texts.name') %></dt>
|
5
|
+
<dd>
|
6
|
+
<% list.each do |key, value| %>
|
7
|
+
<div class="meta-text">
|
8
|
+
<dfn title="<%= key %>">
|
9
|
+
<%= t("attributes.meta.#{key}", default: key) %>
|
10
|
+
</dfn>
|
11
|
+
<div class="text"><%= value %></div>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
</dd>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% unless entity.nil? %>
|
2
|
+
<%
|
3
|
+
content_for :meta_title, entity.meta('title')
|
4
|
+
content_for :meta_description, entity.meta('description')
|
5
|
+
content_for :meta_keywords, entity.meta('keywords')
|
6
|
+
if entity.respond_to?(:image_metadata)
|
7
|
+
image = entity.image_metadata
|
8
|
+
unless image[:url].blank?
|
9
|
+
content_for :meta_image, request.protocol + request.host_with_port + image[:url]
|
10
|
+
content_for :meta_image_alt, image[:alt]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
%>
|
14
|
+
<% content_for :meta_twitter do %>
|
15
|
+
<meta name="twitter:card" content="summary_large_image"/>
|
16
|
+
<meta name="twitter:description" content="<%= entity.meta('description') %>"/>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%
|
2
|
+
view_scope = %i[admin my].include?(local_assigns[:scope].to_sym) ? "#{scope}/" : ''
|
3
|
+
url = "/#{view_scope}#{entity.class.table_name}/#{entity.id}/priority"
|
4
|
+
%>
|
5
|
+
<div class="priority-changer" data-url="<%= url %>">
|
6
|
+
<button data-delta="-1" type="button">↑</button>
|
7
|
+
<button data-delta="1" type="button">↓</button>
|
8
|
+
</div>
|