biovision 0.0.200518.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +214 -0
  4. data/Rakefile +22 -0
  5. data/app/assets/config/biovision_manifest.js +1 -0
  6. data/app/assets/images/biovision/components/carousel/arrow-left.svg +4 -0
  7. data/app/assets/images/biovision/components/carousel/arrow-right.svg +4 -0
  8. data/app/assets/images/biovision/icons/breadcrumb-hover.svg +1 -0
  9. data/app/assets/images/biovision/icons/breadcrumb.svg +1 -0
  10. data/app/assets/images/biovision/icons/components/contact.svg +26 -0
  11. data/app/assets/images/biovision/icons/components/content.svg +20 -0
  12. data/app/assets/images/biovision/icons/components/users.svg +21 -0
  13. data/app/assets/images/biovision/icons/key.svg +16 -0
  14. data/app/assets/images/biovision/icons/log_in.svg +15 -0
  15. data/app/assets/images/biovision/icons/log_out.svg +15 -0
  16. data/app/assets/images/biovision/icons/messages/error.svg +14 -0
  17. data/app/assets/images/biovision/icons/messages/info.svg +8 -0
  18. data/app/assets/images/biovision/icons/messages/success.svg +12 -0
  19. data/app/assets/images/biovision/icons/messages/warning.svg +13 -0
  20. data/app/assets/images/biovision/icons/settings.svg +41 -0
  21. data/app/assets/images/biovision/placeholders/16x9.svg +11 -0
  22. data/app/assets/images/biovision/placeholders/1x1.svg +11 -0
  23. data/app/assets/images/biovision/placeholders/3x2.svg +11 -0
  24. data/app/assets/images/biovision/placeholders/user.svg +15 -0
  25. data/app/assets/stylesheets/biovision/admin.scss +6 -0
  26. data/app/assets/stylesheets/biovision/admin/components.scss +59 -0
  27. data/app/assets/stylesheets/biovision/admin/default.scss +57 -0
  28. data/app/assets/stylesheets/biovision/admin/layout.scss +95 -0
  29. data/app/assets/stylesheets/biovision/admin/vars.scss +56 -0
  30. data/app/assets/stylesheets/biovision/biovision.scss +134 -0
  31. data/app/assets/stylesheets/biovision/biovision/messages.scss +41 -0
  32. data/app/assets/stylesheets/biovision/components/carousel.scss +53 -0
  33. data/app/assets/stylesheets/biovision/components/forms.scss +85 -0
  34. data/app/assets/stylesheets/biovision/components/hamburger.scss +56 -0
  35. data/app/assets/stylesheets/biovision/components/lists.scss +91 -0
  36. data/app/assets/stylesheets/biovision/default.scss +57 -0
  37. data/app/assets/stylesheets/biovision/themes/default_theme.scss +2 -0
  38. data/app/assets/stylesheets/biovision/themes/default_theme/components.scss +3 -0
  39. data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +44 -0
  40. data/app/assets/stylesheets/biovision/themes/default_theme/layout/footer.scss +0 -0
  41. data/app/assets/stylesheets/biovision/themes/default_theme/layout/header.scss +39 -0
  42. data/app/assets/stylesheets/biovision/vars.scss +53 -0
  43. data/app/controllers/admin/agents_controller.rb +15 -0
  44. data/app/controllers/admin/components_controller.rb +174 -0
  45. data/app/controllers/admin/index_controller.rb +11 -0
  46. data/app/controllers/admin/ip_addresses_controller.rb +15 -0
  47. data/app/controllers/admin_controller.rb +14 -0
  48. data/app/controllers/authentication_controller.rb +79 -0
  49. data/app/controllers/concerns/authentication.rb +45 -0
  50. data/app/controllers/index_controller.rb +8 -0
  51. data/app/controllers/my/confirmations_controller.rb +2 -0
  52. data/app/controllers/my/index_controller.rb +8 -0
  53. data/app/controllers/my/profiles_controller.rb +128 -0
  54. data/app/controllers/my/recoveries_controller.rb +2 -0
  55. data/app/helpers/biovision_components_helper.rb +14 -0
  56. data/app/helpers/users_helper.rb +11 -0
  57. data/app/lib/biovision/components/base_component.rb +177 -0
  58. data/app/lib/biovision/components/component_settings.rb +30 -0
  59. data/app/lib/biovision/components/privilege_handler.rb +77 -0
  60. data/app/lib/biovision/components/track_component.rb +9 -0
  61. data/app/lib/biovision/components/users/authentication.rb +47 -0
  62. data/app/lib/biovision/components/users/code_handler.rb +23 -0
  63. data/app/lib/biovision/components/users/profile_handler.rb +12 -0
  64. data/app/lib/biovision/components/users/registration_handler.rb +99 -0
  65. data/app/lib/biovision/components/users_component.rb +47 -0
  66. data/app/lib/biovision/notifiers/base_notifier.rb +69 -0
  67. data/app/lib/biovision/notifiers/socialization_notifier.rb +31 -0
  68. data/app/lib/biovision/notifiers/users_notifier.rb +15 -0
  69. data/app/models/agent.rb +35 -0
  70. data/app/models/biovision_component.rb +45 -0
  71. data/app/models/biovision_component_user.rb +21 -0
  72. data/app/models/browser.rb +34 -0
  73. data/app/models/code.rb +71 -0
  74. data/app/models/concerns/checkable.rb +22 -0
  75. data/app/models/concerns/flat_priority.rb +50 -0
  76. data/app/models/concerns/has_language.rb +10 -0
  77. data/app/models/concerns/has_owner.rb +22 -0
  78. data/app/models/concerns/has_simple_image.rb +18 -0
  79. data/app/models/concerns/has_track.rb +10 -0
  80. data/app/models/concerns/has_uuid.rb +12 -0
  81. data/app/models/concerns/meta_texts.rb +16 -0
  82. data/app/models/concerns/nested_priority.rb +58 -0
  83. data/app/models/concerns/required_unique_name.rb +16 -0
  84. data/app/models/concerns/required_unique_slug.rb +15 -0
  85. data/app/models/concerns/toggleable.rb +33 -0
  86. data/app/models/foreign_site.rb +34 -0
  87. data/app/models/foreign_user.rb +21 -0
  88. data/app/models/ip_address.rb +31 -0
  89. data/app/models/language.rb +31 -0
  90. data/app/models/login_attempt.rb +35 -0
  91. data/app/models/metric.rb +48 -0
  92. data/app/models/metric_value.rb +11 -0
  93. data/app/models/notification.rb +37 -0
  94. data/app/models/simple_image.rb +47 -0
  95. data/app/models/simple_image_tag.rb +30 -0
  96. data/app/models/simple_image_tag_image.rb +13 -0
  97. data/app/models/token.rb +96 -0
  98. data/app/models/user.rb +136 -0
  99. data/app/models/user_language.rb +15 -0
  100. data/app/uploaders/simple_image_uploader.rb +96 -0
  101. data/app/uploaders/user_image_uploader.rb +58 -0
  102. data/app/views/admin/agents/_nav_item.html.erb +6 -0
  103. data/app/views/admin/agents/entity/_in_list.html.erb +6 -0
  104. data/app/views/admin/agents/index.html.erb +13 -0
  105. data/app/views/admin/components/_list.html.erb +12 -0
  106. data/app/views/admin/components/entity/_links.html.erb +35 -0
  107. data/app/views/admin/components/entity/_section.html.erb +12 -0
  108. data/app/views/admin/components/index.html.erb +12 -0
  109. data/app/views/admin/components/links/_track.html.erb +2 -0
  110. data/app/views/admin/components/links/_users.html.erb +11 -0
  111. data/app/views/admin/components/privileges.html.erb +20 -0
  112. data/app/views/admin/components/privileges/_component_user.html.erb +17 -0
  113. data/app/views/admin/components/privileges/_links.html.erb +35 -0
  114. data/app/views/admin/components/privileges/_privilege_flag.html.erb +28 -0
  115. data/app/views/admin/components/privileges/_users.html.erb +23 -0
  116. data/app/views/admin/components/settings.html.erb +39 -0
  117. data/app/views/admin/components/settings/_new_parameter.html.erb +46 -0
  118. data/app/views/admin/components/settings/_parameters.html.erb +20 -0
  119. data/app/views/admin/components/settings/_setting.html.erb +18 -0
  120. data/app/views/admin/components/settings/_settings.html.erb +31 -0
  121. data/app/views/admin/components/show.html.erb +14 -0
  122. data/app/views/admin/index/index.html.erb +14 -0
  123. data/app/views/admin/ip_addresses/_nav_item.html.erb +6 -0
  124. data/app/views/admin/ip_addresses/entity/_in_list.html.erb +6 -0
  125. data/app/views/admin/ip_addresses/index.html.erb +13 -0
  126. data/app/views/admin/unauthorized.html.erb +19 -0
  127. data/app/views/authentication/_form.html.erb +40 -0
  128. data/app/views/authentication/failed.js.erb +3 -0
  129. data/app/views/authentication/new.html.erb +21 -0
  130. data/app/views/index/index.html.erb +0 -0
  131. data/app/views/layouts/admin.html.erb +23 -0
  132. data/app/views/layouts/admin/_breadcrumbs.html.erb +8 -0
  133. data/app/views/layouts/admin/_footer.html.erb +10 -0
  134. data/app/views/layouts/admin/_header.html.erb +18 -0
  135. data/app/views/layouts/admin/header/_logo.html.erb +3 -0
  136. data/app/views/layouts/application/_footer.html.erb +8 -0
  137. data/app/views/layouts/application/_header.html.erb +9 -0
  138. data/app/views/layouts/application/header/_authentication.html.erb +13 -0
  139. data/app/views/my/index/index.html.erb +0 -0
  140. data/app/views/my/profiles/closed.html.erb +12 -0
  141. data/app/views/my/profiles/new.html.erb +17 -0
  142. data/app/views/my/profiles/new/_form.html.erb +147 -0
  143. data/app/views/shared/_breadcrumbs.html.erb +8 -0
  144. data/app/views/shared/_cookie_notification.html.erb +4 -0
  145. data/app/views/shared/_flash_messages.html.erb +7 -0
  146. data/app/views/shared/_meta_texts.html.erb +31 -0
  147. data/app/views/shared/_nothing_found.html.erb +1 -0
  148. data/app/views/shared/_pagination.jbuilder +15 -0
  149. data/app/views/shared/admin/_list.html.erb +19 -0
  150. data/app/views/shared/admin/_list_with_priority.html.erb +19 -0
  151. data/app/views/shared/admin/_toggleable.html.erb +8 -0
  152. data/app/views/shared/entity/_list_of_errors.html.erb +7 -0
  153. data/app/views/shared/forms/errors.js.erb +5 -0
  154. data/config/initializers/carrierwave.rb +27 -0
  155. data/config/initializers/pluralization.rb +2 -0
  156. data/config/locales/biovision-ru.yml +90 -0
  157. data/config/locales/components-ru.yml +81 -0
  158. data/config/locales/track-ru.yml +40 -0
  159. data/config/locales/users-ru.yml +130 -0
  160. data/config/routes.rb +75 -0
  161. data/db/migrate/20191228000000_create_biovision_components.rb +72 -0
  162. data/db/migrate/20200224000000_create_track_component.rb +59 -0
  163. data/db/migrate/20200224000010_create_users_component.rb +189 -0
  164. data/db/migrate/20200404000000_create_simple_images.rb +54 -0
  165. data/lib/biovision.rb +9 -0
  166. data/lib/biovision/base_methods.rb +167 -0
  167. data/lib/biovision/engine.rb +40 -0
  168. data/lib/biovision/version.rb +5 -0
  169. data/lib/tasks/biovision_tasks.rake +4 -0
  170. metadata +392 -0
@@ -0,0 +1,14 @@
1
+ <% content_for :meta_title, t('.title', slug: @handler.slug) %>
2
+ <% content_for :breadcrumbs do %>
3
+ <%= link_to(t('admin.components.index.nav_text'), admin_components_path) %>
4
+ <span><%= @handler.name %></span>
5
+ <% end %>
6
+
7
+ <article>
8
+ <%=
9
+ render(
10
+ partial: 'admin/components/entity/section',
11
+ locals: { component: @handler.component, handler: @handler }
12
+ )
13
+ %>
14
+ </article>
@@ -0,0 +1,14 @@
1
+ <% content_for :meta_title, t('.title') %>
2
+
3
+ <article>
4
+ <h1><%= t('.heading') %></h1>
5
+
6
+ <%=
7
+ render(
8
+ partial: 'admin/components/list',
9
+ locals: {
10
+ collection: BiovisionComponent.list_for_administration
11
+ }
12
+ )
13
+ %>
14
+ </article>
@@ -0,0 +1,6 @@
1
+ <div>
2
+ <%= link_to t('.text'), admin_ip_addresses_path %>
3
+ </div>
4
+ <div class="description">
5
+ <%= t('.description') %>
6
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="data">
2
+ <div><%= entity.ip %></div>
3
+ <div class="secondary info">
4
+ <%= t(:object_count, count: entity.object_count) %>
5
+ </div>
6
+ </div>
@@ -0,0 +1,13 @@
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.ip_addresses.nav_item.text') %></span>
5
+ <% end %>
6
+
7
+ <article>
8
+ <h1><%= t('.heading') %></h1>
9
+
10
+ <%= paginate @collection %>
11
+ <%= render partial: 'shared/admin/list', locals: { collection: @collection } %>
12
+ <%= paginate @collection %>
13
+ </article>
@@ -0,0 +1,19 @@
1
+ <% content_for :meta_title, t('application.errors.unauthorized') %>
2
+
3
+ <article>
4
+ <h1><%= t('admin.errors.unauthorized.heading') %></h1>
5
+
6
+ <div class="message-box error">
7
+ <%= @message %>
8
+ </div>
9
+
10
+ <%=
11
+ render(
12
+ partial: 'authentication/form',
13
+ locals: {
14
+ form_id: 'auth-form_admin',
15
+ from: url_for
16
+ }
17
+ )
18
+ %>
19
+ </article>
@@ -0,0 +1,40 @@
1
+ <%
2
+ component = Biovision::Components::UsersComponent[current_user]
3
+ form_id = local_assigns[:form_id]
4
+ from = local_assigns[:from]
5
+ %>
6
+ <%=
7
+ form_with(
8
+ url: login_path,
9
+ html: { class: 'authentication-form', id: form_id }
10
+ ) do
11
+ %>
12
+ <dl class="fields">
13
+ <div>
14
+ <dt><%= label_tag :login, t('.login') %></dt>
15
+ <dd>
16
+ <%=
17
+ text_field_tag(:login, '', class: 'input-text', required: true)
18
+ %>
19
+ </dd>
20
+ </div>
21
+ <div>
22
+ <dt>
23
+ <%= label_tag :password, t('activerecord.attributes.user.password') %>
24
+ </dt>
25
+ <dd>
26
+ <%=
27
+ password_field_tag(:password, '', class: 'input-text', required: true)
28
+ %>
29
+ </dd>
30
+ </div>
31
+ </dl>
32
+ <div class="actions">
33
+ <%= hidden_field_tag :from, from unless from.blank? %>
34
+ <%= hidden_field_tag :form_id, form_id %>
35
+ <%= button_tag t('.log_in'), class: 'button-primary' %>
36
+ <% if component.settings['registration_open'] %>
37
+ <%= link_to t('my.profiles.new.title'), new_my_profile_path, class: 'button-nav' %>
38
+ <% end %>
39
+ </div>
40
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <% unless @form_id.blank? %>
2
+ Biovision.components.forms.showError("<%= j(@form_id) %>", "<%= j(@error) %>")
3
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <% content_for :meta_title, t('.title') %>
2
+ <% content_for :breadcrumbs do %>
3
+ <span><%= t('.nav_text') %></span>
4
+ <% end %>
5
+
6
+ <article>
7
+ <div class="content-wrapper">
8
+ <h1><%= t('.heading') %></h1>
9
+
10
+ <%=
11
+ render(
12
+ partial: 'authentication/form',
13
+ locals: { form_id: 'authentication_form' }
14
+ )
15
+ %>
16
+
17
+ <nav>
18
+ <%= link_to t('my.recoveries.show.nav_text'), my_recovery_path, class: 'button-nav' %>
19
+ </nav>
20
+ </div>
21
+ </article>
File without changes
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= locale %>">
3
+ <head>
4
+ <meta charset="UTF-8"/>
5
+ <title><%= yield :meta_title %></title>
6
+ <%= stylesheet_link_tag 'admin', media: 'all' %>
7
+ <%= javascript_pack_tag 'application' %>
8
+ <%= csrf_meta_tags %>
9
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
10
+ </head>
11
+ <body>
12
+ <%= render 'layouts/admin/header' %>
13
+
14
+ <main id="main">
15
+ <%= render 'shared/flash_messages' %>
16
+ <%= render 'layouts/admin/breadcrumbs' %>
17
+
18
+ <%= yield %>
19
+ </main>
20
+
21
+ <%= render 'layouts/admin/footer' %>
22
+ </body>
23
+ </html>
@@ -0,0 +1,8 @@
1
+ <% if content_for? :breadcrumbs %>
2
+ <nav class="breadcrumbs">
3
+ <div class="content-wrapper">
4
+ <%= link_to(t('admin.index.index.heading'), admin_path) %>
5
+ <%= yield :breadcrumbs %>
6
+ </div>
7
+ </nav>
8
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <footer class="main-footer">
2
+ <div>
3
+ &copy; 2012–2020 Biovision
4
+ </div>
5
+ <% unless current_user.nil? %>
6
+ <div class="support">
7
+ <%= link_to(t('.support'), 'mailto:maxim.km@gmail.com') %>
8
+ </div>
9
+ <% end %>
10
+ </footer>
@@ -0,0 +1,18 @@
1
+ <header class="main-header">
2
+ <%= render 'layouts/admin/header/logo' %>
3
+ <nav>
4
+ <% unless current_user.nil? %>
5
+ <ul>
6
+ <li><%= current_user.screen_name %></li>
7
+ <li>
8
+ <%=
9
+ link_to(
10
+ image_tag('biovision/icons/log_out.svg', alt: t(:log_out)),
11
+ logout_path, method: :delete
12
+ )
13
+ %>
14
+ </li>
15
+ </ul>
16
+ <% end %>
17
+ </nav>
18
+ </header>
@@ -0,0 +1,3 @@
1
+ <div class="logo">
2
+ <%= link_to t(:site_name), root_path %>
3
+ </div>
@@ -0,0 +1,8 @@
1
+ <footer class="main-footer">
2
+ <div class="content-wrapper">
3
+ <div class="copyright">&copy; <%= t(:copyright) %></div>
4
+ <% if Biovision::Components::BaseComponent.privileged?(current_user) %>
5
+ <%= link_to(t('admin.index.index.nav_text'), admin_path) %>
6
+ <% end %>
7
+ </div>
8
+ </footer>
@@ -0,0 +1,9 @@
1
+ <header class="main-header">
2
+ <div class="content-wrapper">
3
+ <figure class="logo">
4
+ <%= link_to(image_tag('biovision/placeholders/1x1.svg', alt: ''), root_path) %>
5
+ </figure>
6
+ <nav></nav>
7
+ <%= render partial: 'layouts/application/header/authentication' %>
8
+ </div>
9
+ </header>
@@ -0,0 +1,13 @@
1
+ <div class="header-authentication">
2
+ <% if current_user.nil? %>
3
+ <%= link_to(image_tag('biovision/icons/log_in.svg', alt: t(:log_in)), login_path) %>
4
+ <% else %>
5
+ <%= link_to(user_image_tiny(current_user), my_path, class: 'avatar') %>
6
+ <%=
7
+ link_to(
8
+ image_tag('biovision/icons/log_out.svg', alt: t(:log_out)),
9
+ logout_path, method: :delete
10
+ )
11
+ %>
12
+ <% end %>
13
+ </div>
File without changes
@@ -0,0 +1,12 @@
1
+ <% content_for :meta_title, t('.title') %>
2
+ <% content_for :breadcrumbs do %>
3
+ <span><%= t('my.profiles.new.nav_text') %></span>
4
+ <% end %>
5
+
6
+ <article>
7
+ <div class="content-wrapper">
8
+ <h1><%= t('.heading') %></h1>
9
+
10
+ <div class="message-box alert"><%= t('.registration_is_closed') %></div>
11
+ </div>
12
+ </article>
@@ -0,0 +1,17 @@
1
+ <% content_for :meta_title, t('.title') %>
2
+ <% content_for :breadcrumbs do %>
3
+ <span><%= t('.nav_text') %></span>
4
+ <% end %>
5
+
6
+ <article>
7
+ <div class="content-wrapper">
8
+ <h1><%= t('.heading') %></h1>
9
+
10
+ <%= render partial: 'my/profiles/new/form', locals: { entity: @entity } %>
11
+
12
+ <nav>
13
+ <p><%= t('.already_joined') %></p>
14
+ <%= link_to(t('authentication.new.nav_text'), login_path, class: 'button-nav') %>
15
+ </nav>
16
+ </div>
17
+ </article>
@@ -0,0 +1,147 @@
1
+ <% model_name = entity.class.to_s.underscore %>
2
+ <%=
3
+ form_with(
4
+ model: entity,
5
+ scope: model_name,
6
+ url: my_profile_path,
7
+ class: 'users_registration-form',
8
+ id: "#{model_name}-form",
9
+ data: { check_url: check_my_profile_path }
10
+ ) do |f|
11
+ %>
12
+ <%=
13
+ render(
14
+ partial: 'shared/entity/list_of_errors',
15
+ locals: { entity: entity }
16
+ )
17
+ %>
18
+ <dl class="fields">
19
+ <% unless component_handler.settings['email_as_login'] %>
20
+ <div>
21
+ <dt>
22
+ <%= f.label :screen_name, t('activerecord.attributes.user.screen_name') %>
23
+ </dt>
24
+ <dd>
25
+ <%=
26
+ f.text_field(
27
+ :screen_name,
28
+ class: 'input-text',
29
+ data: { check: :screen_name },
30
+ maxlength: 30,
31
+ pattern: '^[-_a-z0-9A-Z]+$',
32
+ required: true,
33
+ title: t('.guidelines.screen_name'),
34
+ )
35
+ %>
36
+ <div class="check-result-error" data-field="screen_name"></div>
37
+ <div class="guideline"><%= t('.guidelines.screen_name') %></div>
38
+ </dd>
39
+ </div>
40
+ <% end %>
41
+
42
+ <div>
43
+ <dt>
44
+ <%= f.label :email, t('activerecord.attributes.user.email') %>
45
+ </dt>
46
+ <dd>
47
+ <%=
48
+ f.email_field(
49
+ :email,
50
+ class: 'input-text',
51
+ data: { check: :email },
52
+ maxlength: User::EMAIL_LIMIT,
53
+ required: component_handler.settings['require_email'],
54
+ size: nil
55
+ )
56
+ %>
57
+ <div class="check-result-error" data-field="email"></div>
58
+ <% unless component_handler.settings['email_as_login'] %>
59
+ <div class="guideline"><%= t('.guidelines.email') %></div>
60
+ <% end %>
61
+ </dd>
62
+ </div>
63
+
64
+ <div>
65
+ <dt>
66
+ <%= f.label :password, t('activerecord.attributes.user.password') %>
67
+ </dt>
68
+ <dd>
69
+ <%=
70
+ f.password_field(
71
+ :password,
72
+ class: 'input-text',
73
+ data: { check: :password },
74
+ maxlength: 70,
75
+ required: true,
76
+ size: nil
77
+ )
78
+ %>
79
+ <div class="check-result-error" data-field="password"></div>
80
+ <div class="guideline"><%= t('.guidelines.password') %></div>
81
+ </dd>
82
+ </div>
83
+
84
+ <div>
85
+ <dt>
86
+ <%= f.label :password_confirmation, t('activerecord.attributes.user.password_confirmation') %>
87
+ </dt>
88
+ <dd>
89
+ <%=
90
+ f.password_field(
91
+ :password_confirmation,
92
+ class: 'input-text',
93
+ data: { check: :password_confirmation },
94
+ maxlength: 70,
95
+ required: true,
96
+ size: nil
97
+ )
98
+ %>
99
+ <div class="check-result-error" data-field="password_confirmation"></div>
100
+ <div class="guideline"><%= t('.guidelines.password_confirmation') %></div>
101
+ </dd>
102
+ </div>
103
+
104
+ <% if component_handler.settings['use_invites'] %>
105
+ <div>
106
+ <dt>
107
+ <%= label_tag :code, t('.invitation_code') %>
108
+ </dt>
109
+ <dd>
110
+ <%=
111
+ text_field_tag(
112
+ :code,
113
+ param_from_request(:code),
114
+ class: 'input-text',
115
+ data: { check: :code },
116
+ maxlength: Code::BODY_LIMIT,
117
+ required: component_handler.settings['invite_only'],
118
+ size: nil
119
+ )
120
+ %>
121
+ <div class="check-result-error" data-field="code"></div>
122
+ </dd>
123
+ </div>
124
+ <% end %>
125
+ </dl>
126
+
127
+ <ul class="flags">
128
+ <li>
129
+ <%= f.check_box :consent, id: "#{model_name}_consent", required: true %>
130
+ <%= f.label :consent, t('.consent') %>
131
+ </li>
132
+ <li>
133
+ <%= f.check_box :allow_mail, id: :user_allow_mail %>
134
+ <%= f.label :allow_mail, t('activerecord.attributes.user.allow_mail') %>
135
+ </li>
136
+ </ul>
137
+
138
+ <div class="visually-hidden">
139
+ <%= check_box_tag :agree, '1', false, tabindex: '-1' %>
140
+ <%= label_tag :agree, t('.i_am_bot') %>
141
+ </div>
142
+
143
+ <div class="actions">
144
+ <%= button_tag t('.join'), type: :submit, class: 'button-primary' %>
145
+ <%#= link_to t('authentication.nav_item.log_in'), login_path, class: 'button-nav' %>
146
+ </div>
147
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% if content_for? :breadcrumbs %>
2
+ <nav class="breadcrumbs">
3
+ <div class="content-wrapper">
4
+ <%= link_to(t(:home), root_path) %>
5
+ <%= yield :breadcrumbs %>
6
+ </div>
7
+ </nav>
8
+ <% end %>