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,192 @@
|
|
1
|
+
<% handler = Biovision::Components::UsersComponent[local_assigns[:entity]] %>
|
2
|
+
<% if handler.registration_open? %>
|
3
|
+
<%=
|
4
|
+
form_with(
|
5
|
+
scope: 'user',
|
6
|
+
url: my_profile_path,
|
7
|
+
id: 'join-form',
|
8
|
+
data: { check_url: check_my_profile_path }
|
9
|
+
) do |f|
|
10
|
+
%>
|
11
|
+
<% unless local_assigns[:entity].blank? %>
|
12
|
+
<%=
|
13
|
+
render(
|
14
|
+
partial: 'shared/entity/list_of_errors',
|
15
|
+
locals: { entity: entity }
|
16
|
+
)
|
17
|
+
%>
|
18
|
+
<% end %>
|
19
|
+
<div class="fields">
|
20
|
+
<% unless handler.email_as_login? || handler.phone_as_login? %>
|
21
|
+
<div>
|
22
|
+
<label class="floating-label">
|
23
|
+
<%=
|
24
|
+
f.text_field(
|
25
|
+
:screen_name,
|
26
|
+
class: 'input-text',
|
27
|
+
data: { check: :screen_name },
|
28
|
+
maxlength: 30,
|
29
|
+
pattern: User::SLUG_PATTERN_HTML,
|
30
|
+
placeholder: User.human_attribute_name(:screen_name),
|
31
|
+
required: true,
|
32
|
+
size: nil,
|
33
|
+
value: handler.attribute(:screen_name)
|
34
|
+
)
|
35
|
+
%>
|
36
|
+
<span>
|
37
|
+
<%= User.human_attribute_name(:screen_name) %>
|
38
|
+
</span>
|
39
|
+
</label>
|
40
|
+
<div class="check-result-error" data-field="screen_name"></div>
|
41
|
+
<div class="guideline"><%= t('activerecord.guidelines.user.screen_name') %></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<% if handler.use_phone? %>
|
45
|
+
<div>
|
46
|
+
<label class="floating-label">
|
47
|
+
<%=
|
48
|
+
f.telephone_field(
|
49
|
+
:phone,
|
50
|
+
class: 'input-text',
|
51
|
+
data: { check: :phone },
|
52
|
+
maxlength: User::PHONE_LIMIT,
|
53
|
+
placeholder: User.human_attribute_name(:phone),
|
54
|
+
required: handler.require_phone?,
|
55
|
+
size: nil,
|
56
|
+
value: handler.attribute(:phone)
|
57
|
+
)
|
58
|
+
%>
|
59
|
+
<span><%= User.human_attribute_name(:email) %></span>
|
60
|
+
</label>
|
61
|
+
<div class="check-result-error" data-field="email"></div>
|
62
|
+
<% unless handler.email_as_login? %>
|
63
|
+
<div class="guideline"><%= t('activerecord.guidelines.user.email') %></div>
|
64
|
+
<% end %>
|
65
|
+
</div>
|
66
|
+
<% end %>
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<div>
|
70
|
+
<label class="floating-label">
|
71
|
+
<%=
|
72
|
+
f.email_field(
|
73
|
+
:email,
|
74
|
+
class: 'input-text',
|
75
|
+
data: { check: :email },
|
76
|
+
maxlength: User::EMAIL_LIMIT,
|
77
|
+
placeholder: User.human_attribute_name(:email),
|
78
|
+
required: handler.settings['require_email'],
|
79
|
+
size: nil,
|
80
|
+
value: handler.attribute(:email)
|
81
|
+
)
|
82
|
+
%>
|
83
|
+
<span><%= User.human_attribute_name(:email) %></span>
|
84
|
+
</label>
|
85
|
+
<div class="check-result-error" data-field="email"></div>
|
86
|
+
<% unless handler.email_as_login? %>
|
87
|
+
<div class="guideline"><%= t('activerecord.guidelines.user.email') %></div>
|
88
|
+
<% end %>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div>
|
92
|
+
<label class="floating-label">
|
93
|
+
<%=
|
94
|
+
f.password_field(
|
95
|
+
:password,
|
96
|
+
class: 'input-text',
|
97
|
+
data: { check: :password },
|
98
|
+
maxlength: 70,
|
99
|
+
placeholder: User.human_attribute_name(:password),
|
100
|
+
required: true,
|
101
|
+
size: nil
|
102
|
+
)
|
103
|
+
%>
|
104
|
+
<span><%= User.human_attribute_name(:password) %></span>
|
105
|
+
</label>
|
106
|
+
<div class="check-result-error" data-field="password"></div>
|
107
|
+
<div class="guideline"><%= t('activerecord.guidelines.user.password') %></div>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<div>
|
111
|
+
<label class="floating-label">
|
112
|
+
<%=
|
113
|
+
f.password_field(
|
114
|
+
:password_confirmation,
|
115
|
+
class: 'input-text',
|
116
|
+
data: { check: :password_confirmation },
|
117
|
+
maxlength: 70,
|
118
|
+
placeholder: User.human_attribute_name(:password_confirmation),
|
119
|
+
required: true,
|
120
|
+
size: nil
|
121
|
+
)
|
122
|
+
%>
|
123
|
+
<span><%= User.human_attribute_name(:password_confirmation) %></span>
|
124
|
+
</label>
|
125
|
+
<div class="check-result-error" data-field="password_confirmation"></div>
|
126
|
+
<div class="guideline"><%= t('activerecord.guidelines.user.password_confirmation') %></div>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<% if handler.use_invites? %>
|
130
|
+
<div>
|
131
|
+
<label class="floating-label">
|
132
|
+
<%=
|
133
|
+
text_field_tag(
|
134
|
+
:code,
|
135
|
+
param_from_request(:code),
|
136
|
+
class: 'input-text',
|
137
|
+
data: { check: :code },
|
138
|
+
maxlength: Code::BODY_LIMIT,
|
139
|
+
placeholder: t('.invitation_code'),
|
140
|
+
required: handler.settings['invite_only'],
|
141
|
+
size: nil
|
142
|
+
)
|
143
|
+
%>
|
144
|
+
<span><%= t('.invitation_code') %></span>
|
145
|
+
</label>
|
146
|
+
<div class="check-result-error" data-field="code"></div>
|
147
|
+
</div>
|
148
|
+
<% end %>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<ul class="flags">
|
152
|
+
<li>
|
153
|
+
<label class="flag-label">
|
154
|
+
<%=
|
155
|
+
f.check_box(
|
156
|
+
:consent,
|
157
|
+
checked: true,
|
158
|
+
required: true
|
159
|
+
)
|
160
|
+
%>
|
161
|
+
<span><%= User.human_attribute_name(:consent) %></span>
|
162
|
+
</label>
|
163
|
+
</li>
|
164
|
+
<!--
|
165
|
+
<li>
|
166
|
+
<label class="flag-label">
|
167
|
+
<%#=
|
168
|
+
f.check_box(
|
169
|
+
:allow_mail,
|
170
|
+
checked: handler.user.nil? ? true : handler.attribute(:allow_mail)
|
171
|
+
)
|
172
|
+
%>
|
173
|
+
<span><%#= User.human_attribute_name(:allow_mail) %></span>
|
174
|
+
</label>
|
175
|
+
</li>
|
176
|
+
-->
|
177
|
+
</ul>
|
178
|
+
|
179
|
+
<div class="visually-hidden">
|
180
|
+
<label>
|
181
|
+
<%= check_box_tag :agree, '1', false, tabindex: '-1' %>
|
182
|
+
<span><%= t('.i_am_bot') %></span>
|
183
|
+
</label>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
<div class="actions">
|
187
|
+
<%= button_tag t('.join'), class: 'button button-primary', name: nil %>
|
188
|
+
</div>
|
189
|
+
<% end %>
|
190
|
+
<% else %>
|
191
|
+
<div class="message-box warning"><%= t('.closed') %></div>
|
192
|
+
<% end %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= form_with(url: login_path, id: 'login-form') do%>
|
2
|
+
<div class="errors"></div>
|
3
|
+
<div class="fields">
|
4
|
+
<div>
|
5
|
+
<label class="floating-label">
|
6
|
+
<%=
|
7
|
+
text_field_tag(
|
8
|
+
:login,
|
9
|
+
'',
|
10
|
+
class: 'input-text',
|
11
|
+
placeholder: t('.login'),
|
12
|
+
required: true
|
13
|
+
)
|
14
|
+
%>
|
15
|
+
<span><%= t('.login') %></span>
|
16
|
+
</label>
|
17
|
+
<div class="guideline"><%= t('.guidelines.login') %></div>
|
18
|
+
</div>
|
19
|
+
<div>
|
20
|
+
<label class="floating-label">
|
21
|
+
<%=
|
22
|
+
password_field_tag(
|
23
|
+
:password,
|
24
|
+
'',
|
25
|
+
class: 'input-text',
|
26
|
+
placeholder: t('activerecord.attributes.user.password'),
|
27
|
+
required: true
|
28
|
+
)
|
29
|
+
%>
|
30
|
+
<span><%= t('activerecord.attributes.user.password') %></span>
|
31
|
+
</label>
|
32
|
+
<div class="guideline"><%= t('.guidelines.password') %></div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div class="actions">
|
36
|
+
<%= hidden_field_tag(:from, local_assigns[:from], id: nil) %>
|
37
|
+
<%= button_tag t('.log_in'), class: 'button button-primary', name: nil %>
|
38
|
+
<%=
|
39
|
+
link_to(
|
40
|
+
t('my.recoveries.show.nav_text'),
|
41
|
+
my_recovery_path,
|
42
|
+
class: 'button button-secondary'
|
43
|
+
)
|
44
|
+
%>
|
45
|
+
</div>
|
46
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div>
|
2
|
+
<dt><%= f.label :image %></dt>
|
3
|
+
<dd>
|
4
|
+
<figure id="user-image" role="group" class="image-medium">
|
5
|
+
<%= f.label(:image, image_tag(entity.image.small.url)) %>
|
6
|
+
<figcaption>
|
7
|
+
<%=
|
8
|
+
f.file_field(
|
9
|
+
:image,
|
10
|
+
accept: 'image/jpeg,image/png,image/svg+xml',
|
11
|
+
data: { image: 'user-image' }
|
12
|
+
)
|
13
|
+
%>
|
14
|
+
</figcaption>
|
15
|
+
</figure>
|
16
|
+
</dd>
|
17
|
+
</div>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<% %w[name patronymic surname].each do |field| %>
|
2
|
+
<div>
|
3
|
+
<dt>
|
4
|
+
<%= label_tag "profile_#{field}", t("activerecord.attributes.user_profile.#{field}") %>
|
5
|
+
</dt>
|
6
|
+
<dd>
|
7
|
+
<%=
|
8
|
+
text_field_tag(
|
9
|
+
"profile[#{field}]",
|
10
|
+
data[field],
|
11
|
+
class: 'input-text',
|
12
|
+
maxlength: 50,
|
13
|
+
size: nil
|
14
|
+
)
|
15
|
+
%>
|
16
|
+
</dd>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<div>
|
21
|
+
<dt>
|
22
|
+
<%= label_tag 'profile_about', t('activerecord.attributes.user_profile.about') %>
|
23
|
+
</dt>
|
24
|
+
<dd>
|
25
|
+
<%=
|
26
|
+
text_area_tag(
|
27
|
+
'profile[about]',
|
28
|
+
data['about'],
|
29
|
+
class: 'input-text',
|
30
|
+
cols: 80,
|
31
|
+
maxlength: 2000,
|
32
|
+
rows: 5
|
33
|
+
)
|
34
|
+
%>
|
35
|
+
</dd>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div>
|
39
|
+
<dt>
|
40
|
+
<%= label_tag :profile_gender, t('activerecord.attributes.user_profile.gender') %>
|
41
|
+
</dt>
|
42
|
+
<dd>
|
43
|
+
<%=
|
44
|
+
select_tag(
|
45
|
+
'profile[gender]',
|
46
|
+
options_for_select(
|
47
|
+
Biovision::Components::Users::ProfileHandler.genders_for_select,
|
48
|
+
data['gender']
|
49
|
+
),
|
50
|
+
class: 'input-select'
|
51
|
+
)
|
52
|
+
%>
|
53
|
+
</dd>
|
54
|
+
</div>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
<%
|
2
|
+
entity ||= FeedbackMessage.new
|
3
|
+
form_class ||= 'contact__feedback-form'
|
4
|
+
form_id ||= 'feedback_form'
|
5
|
+
fields ||= %i[name email comment]
|
6
|
+
required_fields ||= %i[name email comment]
|
7
|
+
message ||= t('.message')
|
8
|
+
%>
|
9
|
+
<%=
|
10
|
+
form_with(
|
11
|
+
model: entity,
|
12
|
+
url: feedback_messages_path,
|
13
|
+
html: {
|
14
|
+
id: form_id,
|
15
|
+
class: form_class
|
16
|
+
}
|
17
|
+
) do |f|
|
18
|
+
%>
|
19
|
+
<div class="state-1">
|
20
|
+
<div class="fields">
|
21
|
+
<% if fields.include?(:name) %>
|
22
|
+
<label class="floating-label feedback-name">
|
23
|
+
<%=
|
24
|
+
f.text_field(
|
25
|
+
:name,
|
26
|
+
class: 'input-text',
|
27
|
+
maxlength: FeedbackMessage::NAME_LIMIT,
|
28
|
+
placeholder: entity.class.human_attribute_name(:name),
|
29
|
+
required: required_fields.include?(:name)
|
30
|
+
)
|
31
|
+
%>
|
32
|
+
<span><%= entity.class.human_attribute_name(:name) %></span>
|
33
|
+
</label>
|
34
|
+
<% end %>
|
35
|
+
<% if fields.include?(:email) %>
|
36
|
+
<label class="floating-label feedback-email">
|
37
|
+
<%=
|
38
|
+
f.email_field(
|
39
|
+
:email,
|
40
|
+
class: 'input-text',
|
41
|
+
maxlength: FeedbackMessage::EMAIL_LIMIT,
|
42
|
+
placeholder: entity.class.human_attribute_name(:email),
|
43
|
+
required: required_fields.include?(:email)
|
44
|
+
)
|
45
|
+
%>
|
46
|
+
<span><%= entity.class.human_attribute_name(:email) %></span>
|
47
|
+
</label>
|
48
|
+
<% end %>
|
49
|
+
<% if fields.include?(:phone) %>
|
50
|
+
<label class="floating-label feedback-phone">
|
51
|
+
<%=
|
52
|
+
f.telephone_field(
|
53
|
+
:phone,
|
54
|
+
class: 'input-text',
|
55
|
+
maxlength: FeedbackMessage::PHONE_LIMIT,
|
56
|
+
placeholder: entity.class.human_attribute_name(:phone),
|
57
|
+
required: required_fields.include?(:phone)
|
58
|
+
)
|
59
|
+
%>
|
60
|
+
<span><%= entity.class.human_attribute_name(:phone) %></span>
|
61
|
+
</label>
|
62
|
+
<% end %>
|
63
|
+
<% if fields.include?(:comment) %>
|
64
|
+
<label class="floating-label feedback-comment">
|
65
|
+
<%=
|
66
|
+
f.text_area(
|
67
|
+
:comment,
|
68
|
+
class: 'input-text',
|
69
|
+
maxlength: FeedbackMessage::COMMENT_LIMIT,
|
70
|
+
placeholder: entity.class.human_attribute_name(:comment),
|
71
|
+
required: required_fields.include?(:comment)
|
72
|
+
)
|
73
|
+
%>
|
74
|
+
<span><%= entity.class.human_attribute_name(:comment) %></span>
|
75
|
+
</label>
|
76
|
+
<% end %>
|
77
|
+
<% if fields.include?(:attachment) %>
|
78
|
+
<label class="floating-label feedback-attachment">
|
79
|
+
<%=
|
80
|
+
f.file_field(
|
81
|
+
:attachment,
|
82
|
+
class: 'input-text',
|
83
|
+
placeholder: entity.class.human_attribute_name(:attachment),
|
84
|
+
required: required_fields.include?(:attachment)
|
85
|
+
)
|
86
|
+
%>
|
87
|
+
<span><%= entity.class.human_attribute_name(:attachment) %></span>
|
88
|
+
</label>
|
89
|
+
<% end %>
|
90
|
+
</div>
|
91
|
+
<div class="disclaimer">
|
92
|
+
<%= check_box_tag :agree, '1', false, class: 'visually-hidden', id: nil, tabindex: -1 %>
|
93
|
+
<p>
|
94
|
+
<%= t('.disclaimer') %>
|
95
|
+
(<%= link_to(t('legal.privacy.nav_text'), privacy_path) %>).
|
96
|
+
</p>
|
97
|
+
</div>
|
98
|
+
<div class="actions">
|
99
|
+
<%= hidden_field_tag 'form_id', form_id %>
|
100
|
+
<%= button_tag(t('.submit'), class: 'button button-primary') %>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
<div class="state-2 hidden">
|
104
|
+
<div class="result">
|
105
|
+
<p><%= raw message %></p>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Biovision.components.forms.switchElements("<%= j(param_from_request(:form_id)) %>", ".state-1", ".state-2");
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= render partial: 'shared/entity/metadata', locals: { entity: @dynamic_page } %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('contact.index.nav_text'), contact_path) %>
|
4
|
+
<span><%= @dynamic_page&.name %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<div class="content-wrapper">
|
9
|
+
<h1><%= @dynamic_page&.meta('heading') %></h1>
|
10
|
+
|
11
|
+
<%= render partial: 'form' %>
|
12
|
+
</div>
|
13
|
+
</article>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% if @dynamic_page.nil? %>
|
2
|
+
<% content_for :meta_title, t('.title') %>
|
3
|
+
<% else %>
|
4
|
+
<%= render partial: 'shared/entity/metadata', locals: { entity: @dynamic_page } %>
|
5
|
+
<% end %>
|
6
|
+
<% content_for :breadcrumbs do %>
|
7
|
+
<span><%= t('.nav_text') %></span>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<article>
|
11
|
+
<div class="content-wrapper">
|
12
|
+
<h1><%= @dynamic_page&.meta('heading') %></h1>
|
13
|
+
|
14
|
+
<div class="text"><%= raw @dynamic_page&.body %></div>
|
15
|
+
</div>
|
16
|
+
</article>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="message-box error"><%= @message %></div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h1><%= t('.title') %></h1>
|
2
|
+
|
3
|
+
<dl>
|
4
|
+
<% %w[name email phone comment attachment].each do |attribute| %>
|
5
|
+
<% next if @entity.attributes[attribute].blank? %>
|
6
|
+
<div>
|
7
|
+
<dt><%= @entity.class.human_attribute_name(attribute) %></dt>
|
8
|
+
<dd><%= @entity.attributes[attribute] %></dd>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
</dl>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= render partial: 'shared/entity/metadata', locals: { entity: @dynamic_page } %>
|
2
|
+
|
3
|
+
<article class="frontpage">
|
4
|
+
<div class="content-wrapper">
|
5
|
+
<% unless @dynamic_page.blank? %>
|
6
|
+
<%=
|
7
|
+
render(
|
8
|
+
partial: 'components/content/dynamic_page_content',
|
9
|
+
locals: { entity: @dynamic_page }
|
10
|
+
)
|
11
|
+
%>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
</article>
|
@@ -2,8 +2,13 @@
|
|
2
2
|
<%= render 'layouts/admin/header/logo' %>
|
3
3
|
<nav>
|
4
4
|
<% unless current_user.nil? %>
|
5
|
-
<ul>
|
6
|
-
<li
|
5
|
+
<ul class="header-authentication">
|
6
|
+
<li>
|
7
|
+
<a href="<%= my_path %>" class="current-user">
|
8
|
+
<span class="avatar"><%= simple_image_tiny(current_user) %></span>
|
9
|
+
<span><%= current_user.screen_name %></span>
|
10
|
+
</a>
|
11
|
+
</li>
|
7
12
|
<li>
|
8
13
|
<%=
|
9
14
|
link_to(
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<footer class="main-footer">
|
2
2
|
<div class="content-wrapper">
|
3
3
|
<div class="copyright">© <%= t(:copyright) %></div>
|
4
|
-
<% if
|
4
|
+
<% if current_user&.role?('base.admin') %>
|
5
5
|
<%= link_to(t('admin.index.index.nav_text'), admin_path) %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
@@ -2,7 +2,10 @@
|
|
2
2
|
<% if current_user.nil? %>
|
3
3
|
<%= link_to(image_tag('biovision/icons/log_in.svg', alt: t(:log_in)), login_path) %>
|
4
4
|
<% else %>
|
5
|
-
<%=
|
5
|
+
<a href="<%= my_path %>" class="current-user">
|
6
|
+
<span class="avatar"><%= simple_image_tiny(current_user) %></span>
|
7
|
+
<span><%= current_user.screen_name %></span>
|
8
|
+
</a>
|
6
9
|
<%=
|
7
10
|
link_to(
|
8
11
|
image_tag('biovision/icons/log_out.svg', alt: t(:log_out)),
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= my_home_link %>
|
4
|
+
<span><%= t('.nav_text') %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<div class="content-wrapper">
|
9
|
+
<h1><%= t('.heading') %></h1>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<% prefix = 'my/components/' %>
|
13
|
+
<% @collection.each do |component| %>
|
14
|
+
<% handler = Biovision::Components::BaseComponent.handler(component, current_user) %>
|
15
|
+
<% next unless handler&.permit?('default') %>
|
16
|
+
<% if lookup_context.exists?("#{prefix}#{component.slug}/_dashboard") %>
|
17
|
+
<%=
|
18
|
+
render(
|
19
|
+
partial: "#{prefix}#{component.slug}/dashboard",
|
20
|
+
locals: { handler: handler }
|
21
|
+
)
|
22
|
+
%>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
</article>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% content_for :meta_title, t('.title', component: @handler.name) %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('my.components.index.nav_text'), my_dashboard_path) %>
|
4
|
+
<span><%= @handler.name %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% prefix = "my/components/#{@handler.slug}/" %>
|
8
|
+
<% if lookup_context.exists?("#{prefix}_section") %>
|
9
|
+
<%=
|
10
|
+
render(
|
11
|
+
partial: "#{prefix}#{component.slug}",
|
12
|
+
locals: { handler: @handler }
|
13
|
+
)
|
14
|
+
%>
|
15
|
+
<% else %>
|
16
|
+
<article class="content-wrapper">
|
17
|
+
<h1><%= @handler.name %></h1>
|
18
|
+
|
19
|
+
<div class="message-box warning"><%= t('.no_view') %></div>
|
20
|
+
</article>
|
21
|
+
<% end %>
|