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,81 @@
|
|
1
|
+
<%= form_with(**Biovision::Components::BaseComponent.form_options(entity)) do |f| %>
|
2
|
+
<%= render partial: 'shared/list_of_errors', locals: { entity: entity } %>
|
3
|
+
|
4
|
+
<dl class="fields">
|
5
|
+
<%= render partial: 'components/users/form/image', locals: { f: f, entity: entity } %>
|
6
|
+
|
7
|
+
<% unless entity.id.nil? %>
|
8
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :slug } %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :screen_name } %>
|
12
|
+
|
13
|
+
<% if entity.id.blank? || !entity.super_user? %>
|
14
|
+
<div>
|
15
|
+
<dt><%= f.label :password %></dt>
|
16
|
+
<dd>
|
17
|
+
<%=
|
18
|
+
f.text_field(
|
19
|
+
:password,
|
20
|
+
class: 'input-text',
|
21
|
+
data: { check: :password },
|
22
|
+
maxlength: 70,
|
23
|
+
required: entity.id.nil?,
|
24
|
+
size: nil
|
25
|
+
)
|
26
|
+
%>
|
27
|
+
<div class="check-result-error" data-field="password"></div>
|
28
|
+
</dd>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div>
|
32
|
+
<dt><%= f.label :password_confirmation %></dt>
|
33
|
+
<dd>
|
34
|
+
<%=
|
35
|
+
f.text_field(
|
36
|
+
:password_confirmation,
|
37
|
+
class: 'input-text',
|
38
|
+
data: { check: :password_confirmation },
|
39
|
+
maxlength: 70,
|
40
|
+
required: entity.id.nil?,
|
41
|
+
size: nil
|
42
|
+
)
|
43
|
+
%>
|
44
|
+
<div class="check-result-error" data-field="password_confirmation"></div>
|
45
|
+
</dd>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
|
49
|
+
<div>
|
50
|
+
<dt><%= f.label :email %></dt>
|
51
|
+
<dd>
|
52
|
+
<%=
|
53
|
+
f.email_field(
|
54
|
+
:email,
|
55
|
+
class: 'input-text',
|
56
|
+
data: { check: :email },
|
57
|
+
maxlength: User::EMAIL_LIMIT,
|
58
|
+
readonly: entity.super_user?,
|
59
|
+
required: entity.email_as_login? || component_handler.require_email?,
|
60
|
+
size: nil
|
61
|
+
)
|
62
|
+
%>
|
63
|
+
</dd>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :phone, type: :phone } %>
|
67
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :birthday } %>
|
68
|
+
|
69
|
+
<%= render partial: 'components/users/form/profile_data', locals: { data: entity.profile.to_h } %>
|
70
|
+
|
71
|
+
<%= render partial: 'shared/forms/field', locals: { f: f, field: :notice } %>
|
72
|
+
<%= render partial: 'shared/forms/entity_flags', locals: { f: f } %>
|
73
|
+
</dl>
|
74
|
+
|
75
|
+
<%= render 'shared/forms/state_container' %>
|
76
|
+
|
77
|
+
<div class="buttons">
|
78
|
+
<%= hidden_field_tag :entity_id, entity.id %>
|
79
|
+
<%= f.button t(:save), class: 'button button-save' %>
|
80
|
+
</div>
|
81
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
json.id user.id
|
2
|
+
json.type user.class.table_name
|
3
|
+
json.attributes do
|
4
|
+
json.call(user, :slug, :screen_name)
|
5
|
+
end
|
6
|
+
json.meta do
|
7
|
+
json.text_for_link user.text_for_link
|
8
|
+
json.html(
|
9
|
+
render(
|
10
|
+
partial: 'admin/users/entity/in_search',
|
11
|
+
locals: { entity: user },
|
12
|
+
formats: [:html]
|
13
|
+
)
|
14
|
+
)
|
15
|
+
end
|
16
|
+
json.links do
|
17
|
+
json.self admin_user_path(id: user.id)
|
18
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<% model = entity.class %>
|
2
|
+
<dl class="fields">
|
3
|
+
<%= render partial: 'shared/entity/image', locals: { entity: entity } %>
|
4
|
+
<%= render partial: 'shared/entity/slug', locals: { entity: entity } %>
|
5
|
+
<%= render partial: 'shared/entity/text_fields', locals: { entity: entity, fields: %w[notice screen_name] } %>
|
6
|
+
|
7
|
+
<% unless entity.inviter_id.nil? %>
|
8
|
+
<div>
|
9
|
+
<dt><%= model.human_attribute_name(:inviter) %></dt>
|
10
|
+
<dd><%= admin_entity_link(entity.inviter, handler: local_assigns[:handler]) %></dd>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% unless entity.email.blank? %>
|
15
|
+
<div>
|
16
|
+
<dt><%= model.human_attribute_name(:email) %></dt>
|
17
|
+
<dd><%= link_to entity.email, "mailto:#{entity.email}" %></dd>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<% unless entity.phone.blank? %>
|
22
|
+
<div>
|
23
|
+
<dt><%= model.human_attribute_name(:phone) %></dt>
|
24
|
+
<dd><%= link_to entity.phone, "tel:#{entity.phone}" %></dd>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%=
|
29
|
+
render(
|
30
|
+
partial: 'admin/users/entity/profile',
|
31
|
+
locals: {
|
32
|
+
data: entity.profile.to_h,
|
33
|
+
entity: entity
|
34
|
+
}
|
35
|
+
)
|
36
|
+
%>
|
37
|
+
|
38
|
+
<%= render partial: 'shared/entity/timestamps', locals: { entity: entity } %>
|
39
|
+
|
40
|
+
<div>
|
41
|
+
<dt><%= model.human_attribute_name(:referral_link) %></dt>
|
42
|
+
<dd><%= root_url(rl: entity.referral_link) %></dd>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<% unless entity.last_seen.blank? %>
|
46
|
+
<div>
|
47
|
+
<dt><%= model.human_attribute_name(:last_seen) %></dt>
|
48
|
+
<dd><%= time_tag entity.last_seen %></dd>
|
49
|
+
</div>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<%= render partial: 'shared/entity/uuid', locals: { entity: entity } %>
|
53
|
+
</dl>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<figure class="image"><%= simple_image_preview(entity) %></figure>
|
2
|
+
<div class="data">
|
3
|
+
<div><%= admin_entity_link(entity, handler: local_assigns[:handler]) %></div>
|
4
|
+
<% unless entity.notice.blank? %>
|
5
|
+
<div><%= entity.notice %></div>
|
6
|
+
<% end %>
|
7
|
+
<div class="info"><%= entity.slug %></div>
|
8
|
+
<% unless entity.email.blank? %>
|
9
|
+
<div class="info"><%= entity.email %></div>
|
10
|
+
<% end %>
|
11
|
+
<div class="secondary info">UUID: <%= entity.uuid %></div>
|
12
|
+
<div class="secondary info">
|
13
|
+
<div>
|
14
|
+
<%= entity.class.human_attribute_name(:created_at) %>:
|
15
|
+
<%= time_tag entity.created_at %>
|
16
|
+
</div>
|
17
|
+
<% unless entity.last_seen.nil? %>
|
18
|
+
<div>
|
19
|
+
<%= entity.class.human_attribute_name(:last_seen) %>:
|
20
|
+
<%= time_tag entity.last_seen %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<%=
|
26
|
+
render(
|
27
|
+
partial: 'admin/users/entity/in_list/additional_data',
|
28
|
+
locals: { entity: entity }
|
29
|
+
)
|
30
|
+
%>
|
31
|
+
|
32
|
+
<%= entity_toggle(entity) %>
|
33
|
+
|
34
|
+
<div class="entity-actions">
|
35
|
+
<%= edit_icon(entity) if local_assigns[:handler]&.permit?('edit', entity) %>
|
36
|
+
<%= world_icon(entity) %>
|
37
|
+
</div>
|
38
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<figure class="image"><%= simple_image_preview(entity) %></figure>
|
2
|
+
<div class="data">
|
3
|
+
<div><%= admin_entity_link(entity, handler: local_assigns[:handler]) %></div>
|
4
|
+
<% unless entity.notice.blank? %>
|
5
|
+
<div><%= entity.notice %></div>
|
6
|
+
<% end %>
|
7
|
+
<div class="info"><%= entity.slug %></div>
|
8
|
+
<% unless entity.email.blank? %>
|
9
|
+
<div class="info"><%= entity.email %></div>
|
10
|
+
<% end %>
|
11
|
+
<div class="secondary info">UUID: <%= entity.uuid %></div>
|
12
|
+
<% unless entity.last_seen.nil? %>
|
13
|
+
<div class="secondary info">
|
14
|
+
<%= entity.class.human_attribute_name(:last_seen) %>:
|
15
|
+
<%= time_tag entity.last_seen %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<% %w[name patronymic surname].each do |field| %>
|
2
|
+
<% unless data[field].blank? %>
|
3
|
+
<div>
|
4
|
+
<dt><%= t("activerecord.attributes.user_profile.#{field}") %></dt>
|
5
|
+
<dd><%= data[field] %></dd>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% unless data['about'].blank? %>
|
11
|
+
<div>
|
12
|
+
<dt><%= t('activerecord.attributes.user_profile.about') %></dt>
|
13
|
+
<dd>
|
14
|
+
<div class="text"><%= simple_format(data['about']) %></div>
|
15
|
+
</dd>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<% unless data['gender'].blank? %>
|
20
|
+
<div>
|
21
|
+
<dt><%= t('activerecord.attributes.user_profile.gender') %></dt>
|
22
|
+
<dd>
|
23
|
+
<%= Biovision::Components::Users::ProfileHandler.gender(data['gender']) %>
|
24
|
+
</dd>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% content_for :meta_title, t('.title', page: current_page) %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
4
|
+
<span><%= t('admin.users.nav_item.text') %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<% if component_handler.permit?('users.edit') %>
|
11
|
+
<nav class="entity-actions">
|
12
|
+
<%= create_icon(new_admin_user_path) %>
|
13
|
+
</nav>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%=
|
17
|
+
render(
|
18
|
+
partial: 'admin/widgets/quick_search',
|
19
|
+
locals: { endpoint: search_admin_users_url }
|
20
|
+
)
|
21
|
+
%>
|
22
|
+
|
23
|
+
<%= entity_list(@collection) %>
|
24
|
+
</article>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<section class="component-for-user">
|
2
|
+
<h2><%= component_name(component) %></h2>
|
3
|
+
|
4
|
+
<ul class="entity-links">
|
5
|
+
<% component.roles.each do |role| %>
|
6
|
+
<li>
|
7
|
+
<label class="flag-label">
|
8
|
+
<%=
|
9
|
+
check_box_tag(
|
10
|
+
'role_id',
|
11
|
+
role.id,
|
12
|
+
entity.role_ids.include?(role.id),
|
13
|
+
data: { url: role_admin_user_path(id: entity.id, role_id: role.id) },
|
14
|
+
id: nil
|
15
|
+
)
|
16
|
+
%>
|
17
|
+
<span><%= role.slug %></span>
|
18
|
+
</label>
|
19
|
+
</li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
</section>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% content_for :meta_title, t('.title', user: @entity.screen_name) %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
4
|
+
<%= link_to(t('admin.users.nav_item.text'), admin_users_path) %>
|
5
|
+
<%= admin_entity_link(@entity, handler: component_handler) %>
|
6
|
+
<span><%= t('.nav_text') %></span>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<article>
|
10
|
+
<h1><%= t('.heading') %></h1>
|
11
|
+
|
12
|
+
<% @components.each do |component| %>
|
13
|
+
<%=
|
14
|
+
render(
|
15
|
+
partial: 'admin/users/roles/component',
|
16
|
+
locals: {
|
17
|
+
entity: @entity,
|
18
|
+
component: component
|
19
|
+
}
|
20
|
+
)
|
21
|
+
%>
|
22
|
+
<% end %>
|
23
|
+
</article>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<% content_for :meta_title, t('.title', name: @entity.profile_name) %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
4
|
+
<%= link_to(t('admin.users.nav_item.text'), admin_users_path) %>
|
5
|
+
<span><%= @entity.profile_name %></span>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<article>
|
9
|
+
<h1><%= @entity.profile_name %></q></h1>
|
10
|
+
|
11
|
+
<% if @entity.deleted? %>
|
12
|
+
<div class="message-box warning"><%= t('.deleted') %></div>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<nav class="entity-actions">
|
16
|
+
<%= edit_icon(@entity) if component_handler.permit?('edit', @entity) %>
|
17
|
+
<%= world_icon(@entity) %>
|
18
|
+
<%= destroy_icon(@entity) if component_handler.permit?('edit', @entity) %>
|
19
|
+
</nav>
|
20
|
+
|
21
|
+
<nav>
|
22
|
+
<% if current_user.super_user? %>
|
23
|
+
<%=
|
24
|
+
link_to(
|
25
|
+
"#{t('admin.users.roles.nav_text')} (#{@entity.role_ids.count})",
|
26
|
+
roles_admin_user_path,
|
27
|
+
class: 'button button-ghost'
|
28
|
+
)
|
29
|
+
%>
|
30
|
+
<% end %>
|
31
|
+
<% if component_handler.permit?('log_in', @entity) && @entity != current_user && !@entity.super_user? %>
|
32
|
+
<%=
|
33
|
+
link_to(
|
34
|
+
t('admin.users.authenticate.nav_text'),
|
35
|
+
authenticate_admin_user_path(id: @entity.id),
|
36
|
+
method: :post,
|
37
|
+
class: 'button button-secondary'
|
38
|
+
)
|
39
|
+
%>
|
40
|
+
<% end %>
|
41
|
+
</nav>
|
42
|
+
|
43
|
+
<%= render partial: 'admin/users/entity/fields', locals: { entity: @entity } %>
|
44
|
+
|
45
|
+
<%= entity_toggle(@entity) %>
|
46
|
+
|
47
|
+
<% prefix = 'admin/users/entity/components/' %>
|
48
|
+
<% BiovisionComponent.list_for_administration.each do |component| %>
|
49
|
+
<% if lookup_context.exists?("#{prefix}_#{component.slug}") %>
|
50
|
+
<% handler = Biovision::Components::BaseComponent.handler(component, @entity) %>
|
51
|
+
<section>
|
52
|
+
<h2><%= handler.name %></h2>
|
53
|
+
<%=
|
54
|
+
render(
|
55
|
+
partial: "#{prefix}#{component.slug}",
|
56
|
+
locals: { user: @entity, handler: handler }
|
57
|
+
)
|
58
|
+
%>
|
59
|
+
</section>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
62
|
+
</article>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= form_with(scope: 'filter', url: url_for, method: :get, class: 'widgets__filters') do |f| %>
|
2
|
+
<fieldset>
|
3
|
+
<legend><%= t('.heading') %></legend>
|
4
|
+
<div class="list">
|
5
|
+
<% fields.each do |key, type| %>
|
6
|
+
<% if lookup_context.exists?("admin/widgets/filters/_#{type}") %>
|
7
|
+
<%=
|
8
|
+
render(
|
9
|
+
partial: "admin/widgets/filters/#{type}",
|
10
|
+
locals: { f: f, key: key, scope: scope, value: filter[key] }
|
11
|
+
)
|
12
|
+
%>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
<div class="actions">
|
17
|
+
<%= button_tag(t('.apply'), class: 'button button-secondary', name: nil) %>
|
18
|
+
</div>
|
19
|
+
</fieldset>
|
20
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<section class="widgets__quick-search js-quick-search" data-url="<%= local_assigns[:endpoint] %>">
|
2
|
+
<div class="content-wrapper">
|
3
|
+
<h3><%= t('.heading') %></h3>
|
4
|
+
|
5
|
+
<div class="search">
|
6
|
+
<label class="floating-label">
|
7
|
+
<input type="search" class="input-text" placeholder="<%= t('.search_string') %>"/>
|
8
|
+
<span><%= t('.search_string') %></span>
|
9
|
+
</label>
|
10
|
+
</div>
|
11
|
+
<ul class="results list-of-entities"></ul>
|
12
|
+
</div>
|
13
|
+
</section>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="flag">
|
2
|
+
<dfn><%= t("filters.#{scope}.#{key}", default: key.to_s) %></dfn>
|
3
|
+
<label class="flag-label">
|
4
|
+
<%= f.radio_button(key, '', id: nil, checked: value.blank?) %>
|
5
|
+
<span><%= t('.any') %></span>
|
6
|
+
</label>
|
7
|
+
<label class="flag-label">
|
8
|
+
<%= f.radio_button(key, '1', id: nil, checked: value == '1') %>
|
9
|
+
<span><%= t('.set') %></span>
|
10
|
+
</label>
|
11
|
+
<label class="flag-label">
|
12
|
+
<%= f.radio_button(key, '0', id: nil, checked: value == '0') %>
|
13
|
+
<span><%= t('.unset') %></span>
|
14
|
+
</label>
|
15
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
|
3
|
+
<article>
|
4
|
+
<div class="content-wrapper">
|
5
|
+
<h1><%= t('.heading') %></h1>
|
6
|
+
|
7
|
+
<div class="message-box error"><%= @message %></div>
|
8
|
+
|
9
|
+
<%=
|
10
|
+
render(
|
11
|
+
partial: 'components/users/form_tabs',
|
12
|
+
locals: {
|
13
|
+
current: 'login',
|
14
|
+
from: url_for
|
15
|
+
}
|
16
|
+
)
|
17
|
+
%>
|
18
|
+
</div>
|
19
|
+
</article>
|
@@ -5,17 +5,11 @@
|
|
5
5
|
|
6
6
|
<article>
|
7
7
|
<div class="content-wrapper">
|
8
|
-
<h1><%= t('.heading') %></h1>
|
9
|
-
|
10
8
|
<%=
|
11
9
|
render(
|
12
|
-
|
13
|
-
|
10
|
+
partial: 'components/users/form_tabs',
|
11
|
+
locals: { current: 'login' }
|
14
12
|
)
|
15
13
|
%>
|
16
|
-
|
17
|
-
<nav>
|
18
|
-
<%= link_to t('my.recoveries.show.nav_text'), my_recovery_path, class: 'button-nav' %>
|
19
|
-
</nav>
|
20
14
|
</div>
|
21
15
|
</article>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% unless entity.nil? %>
|
2
|
+
<%= render partial: 'shared/entity/metadata', locals: { entity: entity } %>
|
3
|
+
<% content_for :breadcrumbs do %>
|
4
|
+
<span><%= entity.name %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<div class="content-wrapper">
|
9
|
+
<%=
|
10
|
+
render(
|
11
|
+
partial: 'components/content/dynamic_page_content',
|
12
|
+
locals: { entity: entity }
|
13
|
+
)
|
14
|
+
%>
|
15
|
+
</div>
|
16
|
+
</article>
|
17
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% unless entity.simple_image.nil? %>
|
2
|
+
<figure><%= simple_image_hd(entity) %></figure>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<h1><%= entity.meta('heading') %></h1>
|
6
|
+
|
7
|
+
<% if content_component.permit?('edit', entity) %>
|
8
|
+
<nav class="entity-actions">
|
9
|
+
<%= gear_icon(entity) %>
|
10
|
+
<%= edit_icon(entity) %>
|
11
|
+
</nav>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="text"><%= raw(entity.body) %></div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% tabs = %w[login join] %>
|
2
|
+
<section class="users__form-tabs">
|
3
|
+
<% tabs.each do |tab| %>
|
4
|
+
<%=
|
5
|
+
radio_button_tag(
|
6
|
+
'users__form_tab',
|
7
|
+
tab,
|
8
|
+
current == tab,
|
9
|
+
class: "visually-hidden tab-control-#{tab}",
|
10
|
+
id: "users__form-tab_#{tab}"
|
11
|
+
)
|
12
|
+
%>
|
13
|
+
<% end %>
|
14
|
+
<header class="labels">
|
15
|
+
<% tabs.each do |tab| %>
|
16
|
+
<%= label_tag("users__form-tab_#{tab}", t(".#{tab}"), class: tab) %>
|
17
|
+
<% end %>
|
18
|
+
</header>
|
19
|
+
<div class="tabs">
|
20
|
+
<% tabs.each do |tab| %>
|
21
|
+
<div class="tab <%= tab %>">
|
22
|
+
<%=
|
23
|
+
render(
|
24
|
+
partial: "components/users/#{tab}_form",
|
25
|
+
locals: local_assigns
|
26
|
+
)
|
27
|
+
%>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
</section>
|