biovision 0.0.200518.1 → 0.1.210414.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -18
  3. data/app/assets/images/biovision/icons/back.svg +19 -0
  4. data/app/assets/images/biovision/icons/create.svg +19 -0
  5. data/app/assets/images/biovision/icons/destroy.svg +12 -0
  6. data/app/assets/images/biovision/icons/dropdown.svg +3 -0
  7. data/app/assets/images/biovision/icons/edit.svg +22 -0
  8. data/app/assets/images/biovision/icons/gear.svg +11 -0
  9. data/app/assets/images/biovision/icons/return.svg +25 -0
  10. data/app/assets/images/biovision/icons/world.svg +11 -0
  11. data/app/assets/stylesheets/biovision/admin/components.scss +3 -1
  12. data/app/assets/stylesheets/biovision/admin/components/users.scss +16 -0
  13. data/app/assets/stylesheets/biovision/admin/layout.scss +6 -17
  14. data/app/assets/stylesheets/biovision/biovision.scss +42 -1
  15. data/app/assets/stylesheets/biovision/components.scss +6 -0
  16. data/app/assets/stylesheets/biovision/components/breadcrumbs.scss +13 -0
  17. data/app/assets/stylesheets/biovision/components/buttons.scss +130 -0
  18. data/app/assets/stylesheets/biovision/components/forms.scss +162 -1
  19. data/app/assets/stylesheets/biovision/components/lists.scss +6 -7
  20. data/app/assets/stylesheets/biovision/{biovision → components}/messages.scss +9 -0
  21. data/app/assets/stylesheets/biovision/components/pagination.scss +34 -0
  22. data/app/assets/stylesheets/biovision/components/simple_image.scss +112 -0
  23. data/app/assets/stylesheets/biovision/components/toggleable.scss +71 -0
  24. data/app/assets/stylesheets/biovision/themes/default_theme/components.scss +2 -3
  25. data/app/assets/stylesheets/biovision/themes/default_theme/components/users.scss +2 -0
  26. data/app/assets/stylesheets/biovision/themes/default_theme/components/users/form_tabs.scss +101 -0
  27. data/app/assets/stylesheets/biovision/themes/default_theme/components/users/profile.scss +77 -0
  28. data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +2 -16
  29. data/app/controllers/admin/components_controller.rb +9 -19
  30. data/app/controllers/admin/dynamic_blocks_controller.rb +15 -0
  31. data/app/controllers/admin/dynamic_pages_controller.rb +15 -0
  32. data/app/controllers/admin/navigation_groups_controller.rb +14 -0
  33. data/app/controllers/admin/users_controller.rb +70 -0
  34. data/app/controllers/admin_controller.rb +3 -2
  35. data/app/controllers/authentication_controller.rb +6 -34
  36. data/app/controllers/concerns/authentication.rb +12 -12
  37. data/app/controllers/concerns/crud_entities.rb +132 -0
  38. data/app/controllers/concerns/entity_priority.rb +10 -0
  39. data/app/controllers/concerns/toggleable_entity.rb +31 -0
  40. data/app/controllers/contact_controller.rb +49 -0
  41. data/app/controllers/fallback_controller.rb +12 -0
  42. data/app/controllers/index_controller.rb +1 -0
  43. data/app/controllers/legal_controller.rb +14 -0
  44. data/app/controllers/my/components_controller.rb +5 -0
  45. data/app/controllers/my/confirmations_controller.rb +44 -0
  46. data/app/controllers/my/index_controller.rb +8 -0
  47. data/app/controllers/my/profiles_controller.rb +31 -16
  48. data/app/controllers/profile_controller.rb +12 -0
  49. data/app/controllers/users_controller.rb +61 -0
  50. data/app/helpers/biovision_helper.rb +171 -0
  51. data/app/helpers/simple_image_helper.rb +125 -0
  52. data/app/jobs/application_job.rb +7 -0
  53. data/app/jobs/send_phone_confirmation_job.rb +16 -0
  54. data/app/lib/biovision/components/base/component_parameters.rb +44 -0
  55. data/app/lib/biovision/components/base/component_privileges.rb +65 -0
  56. data/app/lib/biovision/components/base/component_settings.rb +32 -0
  57. data/app/lib/biovision/components/base/privilege_handler.rb +79 -0
  58. data/app/lib/biovision/components/base_component.rb +51 -54
  59. data/app/lib/biovision/components/contact_component.rb +22 -0
  60. data/app/lib/biovision/components/content_component.rb +28 -0
  61. data/app/lib/biovision/components/track_component.rb +3 -0
  62. data/app/lib/biovision/components/users/authentication.rb +15 -7
  63. data/app/lib/biovision/components/users/codes.rb +104 -0
  64. data/app/lib/biovision/components/users/flag_helpers.rb +72 -0
  65. data/app/lib/biovision/components/users/profile_handler.rb +111 -1
  66. data/app/lib/biovision/components/users/registration_handler.rb +40 -52
  67. data/app/lib/biovision/components/users/validation.rb +83 -0
  68. data/app/lib/biovision/components/users_component.rb +82 -19
  69. data/app/lib/biovision/notifiers/base_notifier.rb +2 -2
  70. data/app/lib/biovision/notifiers/contact_notifier.rb +15 -0
  71. data/app/lib/canonizer.rb +38 -0
  72. data/app/lib/carrier_wave/image_optim.rb +32 -0
  73. data/app/mailers/code_sender.rb +29 -0
  74. data/app/models/agent.rb +4 -0
  75. data/app/models/biovision_component.rb +22 -2
  76. data/app/models/browser.rb +1 -1
  77. data/app/models/code.rb +32 -9
  78. data/app/models/concerns/has_simple_image.rb +9 -0
  79. data/app/models/concerns/meta_texts.rb +25 -5
  80. data/app/models/concerns/tree_structure.rb +72 -0
  81. data/app/models/contact_method.rb +47 -0
  82. data/app/models/contact_type.rb +27 -0
  83. data/app/models/dynamic_block.rb +43 -0
  84. data/app/models/dynamic_page.rb +71 -0
  85. data/app/models/feedback_message.rb +59 -0
  86. data/app/models/feedback_response.rb +50 -0
  87. data/app/models/group.rb +48 -0
  88. data/app/models/language.rb +4 -0
  89. data/app/models/navigation_group.rb +33 -0
  90. data/app/models/navigation_group_page.rb +23 -0
  91. data/app/models/role.rb +56 -0
  92. data/app/models/role_group.rb +13 -0
  93. data/app/models/simple_image.rb +22 -8
  94. data/app/models/simple_image_tag.rb +1 -1
  95. data/app/models/token.rb +4 -4
  96. data/app/models/user.rb +94 -26
  97. data/app/models/user_group.rb +20 -0
  98. data/app/models/user_role.rb +19 -0
  99. data/app/uploaders/simple_file_uploader.rb +27 -0
  100. data/app/uploaders/simple_image_uploader.rb +20 -0
  101. data/app/views/admin/agents/index.html.erb +0 -2
  102. data/app/views/admin/components/_image.jbuilder +18 -0
  103. data/app/views/admin/components/_list.html.erb +1 -1
  104. data/app/views/admin/components/entity/_links.html.erb +1 -1
  105. data/app/views/admin/components/image.jbuilder +1 -0
  106. data/app/views/admin/components/images.jbuilder +4 -0
  107. data/app/views/admin/components/links/_content.html.erb +9 -0
  108. data/app/views/admin/components/links/_users.html.erb +1 -8
  109. data/app/views/admin/components/links/extra/_content.html.erb +0 -0
  110. data/app/views/admin/components/privileges/_links.html.erb +0 -18
  111. data/app/views/admin/components/settings/_new_parameter.html.erb +4 -2
  112. data/app/views/admin/components/settings/_parameters.html.erb +8 -2
  113. data/app/views/admin/components/settings/_settings.html.erb +1 -1
  114. data/app/views/admin/components/update_privileges.jbuilder +21 -0
  115. data/app/views/admin/dynamic_blocks/_form.html.erb +16 -0
  116. data/app/views/admin/dynamic_blocks/_nav_item.html.erb +6 -0
  117. data/app/views/admin/dynamic_blocks/entity/_in_list.html.erb +10 -0
  118. data/app/views/admin/dynamic_blocks/index.html.erb +15 -0
  119. data/app/views/admin/dynamic_blocks/show.html.erb +23 -0
  120. data/app/views/admin/dynamic_pages/_form.html.erb +21 -0
  121. data/app/views/admin/dynamic_pages/_nav_item.html.erb +6 -0
  122. data/app/views/admin/dynamic_pages/entity/_in_list.html.erb +15 -0
  123. data/app/views/admin/dynamic_pages/index.html.erb +15 -0
  124. data/app/views/admin/dynamic_pages/show.html.erb +28 -0
  125. data/app/views/admin/ip_addresses/index.html.erb +0 -2
  126. data/app/views/admin/navigation_groups/_form.html.erb +15 -0
  127. data/app/views/admin/navigation_groups/_nav_item.html.erb +6 -0
  128. data/app/views/admin/navigation_groups/entity/_in_list.html.erb +12 -0
  129. data/app/views/admin/navigation_groups/index.html.erb +15 -0
  130. data/app/views/admin/navigation_groups/show.html.erb +20 -0
  131. data/app/views/admin/unauthorized.html.erb +2 -5
  132. data/app/views/admin/users/_form.html.erb +81 -0
  133. data/app/views/admin/users/_nav_item.html.erb +6 -0
  134. data/app/views/admin/users/entity/_fields.html.erb +53 -0
  135. data/app/views/admin/users/entity/_in_list.html.erb +38 -0
  136. data/app/views/admin/users/entity/_profile.html.erb +26 -0
  137. data/app/views/admin/users/entity/in_list/_additional_data.html.erb +0 -0
  138. data/app/views/admin/users/index.html.erb +15 -0
  139. data/app/views/admin/users/show.html.erb +44 -0
  140. data/app/views/application/forbidden.html.erb +9 -0
  141. data/app/views/application/forbidden.jbuilder +4 -0
  142. data/app/views/application/not_found.html.erb +9 -0
  143. data/app/views/application/not_found.jbuilder +4 -0
  144. data/app/views/application/unauthorized.html.erb +16 -0
  145. data/app/views/application/unauthorized.jbuilder +4 -0
  146. data/app/views/authentication/new.html.erb +2 -8
  147. data/app/views/components/content/_dynamic_page.html.erb +21 -0
  148. data/app/views/components/users/_form_tabs.html.erb +31 -0
  149. data/app/views/components/users/_join_form.html.erb +192 -0
  150. data/app/views/components/users/_login_form.html.erb +45 -0
  151. data/app/views/components/users/form/_image.html.erb +17 -0
  152. data/app/views/components/users/form/_profile_data.html.erb +54 -0
  153. data/app/views/contact/_form.html.erb +108 -0
  154. data/app/views/contact/create_feedback_message.js.erb +1 -0
  155. data/app/views/contact/feedback.html.erb +13 -0
  156. data/app/views/contact/index.html.erb +16 -0
  157. data/app/views/fallback/show.html.erb +6 -0
  158. data/app/views/layouts/admin.html.erb +1 -1
  159. data/app/views/layouts/admin/_footer.html.erb +1 -1
  160. data/app/views/layouts/application/header/_authentication.html.erb +1 -1
  161. data/app/views/legal/privacy.html.erb +5 -0
  162. data/app/views/legal/tos.html.erb +5 -0
  163. data/app/views/my/confirmations/show.html.erb +62 -0
  164. data/app/views/my/index/index.html.erb +33 -0
  165. data/app/views/my/profiles/_form.html.erb +10 -0
  166. data/app/views/my/profiles/check.jbuilder +4 -0
  167. data/app/views/my/profiles/edit.html.erb +14 -0
  168. data/app/views/my/profiles/form/_basic_parameters.html.erb +9 -0
  169. data/app/views/my/profiles/form/_sensitive_parameters.html.erb +68 -0
  170. data/app/views/my/profiles/new.html.erb +6 -8
  171. data/app/views/my/profiles/show.html.erb +23 -0
  172. data/app/views/shared/_flash_messages.html.erb +1 -1
  173. data/app/views/shared/_list_of_errors.html.erb +7 -0
  174. data/app/views/shared/admin/_breadcrumbs.html.erb +8 -0
  175. data/app/views/shared/admin/_list.html.erb +4 -4
  176. data/app/views/shared/admin/_list_with_priority.html.erb +4 -4
  177. data/app/views/shared/admin/_priority.html.erb +5 -0
  178. data/app/views/shared/admin/_toggle.html.erb +11 -0
  179. data/app/views/shared/entity/_formatted_text_field.html.erb +10 -0
  180. data/app/views/shared/entity/_image.html.erb +31 -0
  181. data/app/views/shared/entity/_language.html.erb +6 -0
  182. data/app/views/shared/entity/_linked_entity.html.erb +6 -0
  183. data/app/views/shared/entity/_meta_texts.html.erb +16 -0
  184. data/app/views/shared/entity/_metadata.html.erb +18 -0
  185. data/app/views/shared/entity/_parent.html.erb +6 -0
  186. data/app/views/shared/entity/_priority.html.erb +4 -0
  187. data/app/views/shared/entity/_raw_text_field.html.erb +10 -0
  188. data/app/views/shared/entity/_simple_image.html.erb +10 -0
  189. data/app/views/shared/entity/_slug.html.erb +6 -0
  190. data/app/views/shared/entity/_text_field.html.erb +6 -0
  191. data/app/views/shared/entity/_text_fields.html.erb +9 -0
  192. data/app/views/shared/entity/_timestamps.html.erb +13 -0
  193. data/app/views/shared/entity/_tree_caches.html.erb +12 -0
  194. data/app/views/shared/entity/_uuid.html.erb +4 -0
  195. data/app/views/shared/entity/edit.html.erb +21 -0
  196. data/app/views/shared/entity/new.html.erb +16 -0
  197. data/app/views/shared/forms/_entity_flags.html.erb +15 -0
  198. data/app/views/shared/forms/_field.html.erb +46 -0
  199. data/app/views/shared/forms/_fields.html.erb +3 -0
  200. data/app/views/shared/forms/_language.html.erb +40 -0
  201. data/app/views/shared/forms/_meta_texts.html.erb +27 -0
  202. data/app/views/shared/forms/_priority.html.erb +13 -0
  203. data/app/views/shared/forms/_simple_image.html.erb +39 -0
  204. data/app/views/shared/forms/_state_container.html.erb +7 -0
  205. data/app/views/shared/forms/_text_area.html.erb +25 -0
  206. data/app/views/shared/forms/_text_field.html.erb +24 -0
  207. data/app/views/shared/forms/_text_fields.html.erb +3 -0
  208. data/app/views/shared/forms/check.jbuilder +4 -0
  209. data/app/views/shared/forms/errors.jbuilder +3 -0
  210. data/app/views/shared/forms/simple_image/_browse.html.erb +14 -0
  211. data/app/views/shared/forms/simple_image/_load_image.html.erb +38 -0
  212. data/app/views/shared/my/_list.html.erb +19 -0
  213. data/app/views/shared/my/_list_with_priority.html.erb +19 -0
  214. data/app/views/users/_profile.html.erb +30 -0
  215. data/app/views/users/profile/_data.html.erb +20 -0
  216. data/app/views/users/show.html.erb +21 -0
  217. data/config/locales/biovision-ru.yml +58 -0
  218. data/config/locales/components-ru.yml +30 -2
  219. data/config/locales/contact-ru.yml +106 -0
  220. data/config/locales/content-ru.yml +103 -0
  221. data/config/locales/users-ru.yml +117 -3
  222. data/config/routes.rb +70 -50
  223. data/db/migrate/20191228000000_create_biovision_components.rb +4 -5
  224. data/db/migrate/20200224000000_create_track_component.rb +7 -8
  225. data/db/migrate/20200224000010_create_users_component.rb +15 -43
  226. data/db/migrate/20200404000000_create_simple_images.rb +3 -3
  227. data/db/migrate/20200529000000_create_content_component.rb +74 -0
  228. data/db/migrate/20210401000000_create_contact_component.rb +95 -0
  229. data/db/migrate/20210405000000_create_acl.rb +74 -0
  230. data/lib/biovision/base_methods.rb +18 -10
  231. data/lib/biovision/engine.rb +8 -13
  232. data/lib/biovision/version.rb +1 -1
  233. metadata +186 -20
  234. data/app/assets/images/biovision/placeholders/user.svg +0 -15
  235. data/app/helpers/users_helper.rb +0 -11
  236. data/app/lib/biovision/components/component_settings.rb +0 -30
  237. data/app/lib/biovision/components/privilege_handler.rb +0 -77
  238. data/app/lib/biovision/components/users/code_handler.rb +0 -23
  239. data/app/models/foreign_site.rb +0 -34
  240. data/app/models/foreign_user.rb +0 -21
  241. data/app/uploaders/user_image_uploader.rb +0 -58
  242. data/app/views/admin/components/privileges/_privilege_flag.html.erb +0 -28
  243. data/app/views/authentication/_form.html.erb +0 -40
  244. data/app/views/authentication/failed.js.erb +0 -3
  245. data/app/views/my/profiles/new/_form.html.erb +0 -147
  246. data/app/views/shared/admin/_toggleable.html.erb +0 -8
@@ -0,0 +1,24 @@
1
+ <%
2
+ model = f.object.class
3
+ validators = model.validators_on(field)
4
+ length_options = validators.select { |v| v.kind == :length }.first&.options.to_h
5
+ options = {
6
+ class: 'input-text',
7
+ data: { check: field }.merge(local_assigns[:data].to_h),
8
+ manlength: length_options[:maximum],
9
+ minlength: length_options[:minimum],
10
+ required: validators.select { |v| v.kind == :presence }.any?,
11
+ size: nil
12
+ }.merge(local_assigns[:options].to_h)
13
+ guide_key = "#{controller_path.gsub('/', '.')}.form.guidelines.#{field}"
14
+ %>
15
+ <div>
16
+ <dt><%= f.label field %></dt>
17
+ <dd>
18
+ <%= f.text_field(field, options) %>
19
+ <div class="check-result-error" data-field="<%= field %>"></div>
20
+ <% if I18n.exists?(guide_key) %>
21
+ <div class="guideline"><%= t(guide_key) %></div>
22
+ <% end %>
23
+ </dd>
24
+ </div>
@@ -0,0 +1,3 @@
1
+ <% list.each do |field| %>
2
+ <%= render partial: 'shared/forms/text_field', locals: { f: f, field: field } %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ json.meta do
2
+ json.valid @entity.valid?
3
+ json.errors @entity.errors
4
+ end
@@ -0,0 +1,3 @@
1
+ json.errors @errors do |error|
2
+ json.details error
3
+ end
@@ -0,0 +1,14 @@
1
+ <div class="browse-images hidden">
2
+ <nav class="pagination">
3
+ <button class="first" type="button">&larrb;</button>
4
+ <button class="prev" type="button">&larr;</button>
5
+ <input type="number" class="current" min="1"/>
6
+ <button class="next" type="button">&rarr;</button>
7
+ <button class="last" type="button">&rarrb;</button>
8
+ </nav>
9
+ <label class="floating-label">
10
+ <input class="input-text filter" placeholder="<%= t('.filter') %>"/>
11
+ <span><%= t('.filter') %></span>
12
+ </label>
13
+ <ul class="list-of-entities"></ul>
14
+ </div>
@@ -0,0 +1,38 @@
1
+ <div class="load-image hidden">
2
+ <label class="floating-label">
3
+ <%=
4
+ file_field_tag(
5
+ nil,
6
+ accept: 'image/jpeg,image/png,image/svg+xml',
7
+ class: 'input-text'
8
+ )
9
+ %>
10
+ <span><%= t('.new_image') %></span>
11
+ </label>
12
+ <% %i[image_alt_text caption source_link source_name].each do |field| %>
13
+ <label class="floating-label">
14
+ <% text = SimpleImage.human_attribute_name(field) %>
15
+ <%=
16
+ text_field_tag(
17
+ nil,
18
+ '',
19
+ class: 'input-text',
20
+ data: { name: field },
21
+ placeholder: text
22
+ )
23
+ %>
24
+ <span><%= text %></span>
25
+ </label>
26
+ <% end %>
27
+ <div class="buttons">
28
+ <%=
29
+ button_tag(
30
+ t('.upload'),
31
+ class: 'button button-primary upload',
32
+ name: nil,
33
+ type: :button
34
+ )
35
+ %>
36
+ <!-- <button type="button" class="button button-ghost cancel"><%#= t('.cancel') %></button>-->
37
+ </div>
38
+ </div>
@@ -0,0 +1,19 @@
1
+ <% use_pagination = collection.respond_to?(:current_page) %>
2
+ <%= paginate collection if use_pagination %>
3
+ <% if collection.any? %>
4
+ <ul class="list-of-entities">
5
+ <% collection.each do |entity| %>
6
+ <li data-id="<%= entity.id %>">
7
+ <%=
8
+ render(
9
+ partial: "my/#{entity.class.table_name}/entity/in_list",
10
+ locals: { entity: entity, handler: local_assigns[:handler] }
11
+ )
12
+ %>
13
+ </li>
14
+ <% end %>
15
+ </ul>
16
+ <%= paginate collection if use_pagination %>
17
+ <% else %>
18
+ <%= render 'shared/nothing_found' %>
19
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <% use_pagination = collection.respond_to?(:current_page) %>
2
+ <%= paginate collection if use_pagination %>
3
+ <% if collection.any? %>
4
+ <ol class="list-of-entities">
5
+ <% collection.each do |entity| %>
6
+ <li data-id="<%= entity.id %>" data-number="<%= entity.priority %>">
7
+ <%=
8
+ render(
9
+ partial: "my/#{entity.class.table_name}/entity/in_list",
10
+ locals: { entity: entity, handler: local_assigns[:handler] }
11
+ )
12
+ %>
13
+ </li>
14
+ <% end %>
15
+ </ol>
16
+ <%= paginate collection if use_pagination %>
17
+ <% else %>
18
+ <%= render 'shared/nothing_found' %>
19
+ <% end %>
@@ -0,0 +1,30 @@
1
+ <% if component_handler&.permit?('edit', user) %>
2
+ <nav class="entity-actions">
3
+ <%= gear_icon(user) %>
4
+ </nav>
5
+ <% end %>
6
+
7
+ <section class="users__profile">
8
+ <% unless user.image.blank? %>
9
+ <figure class="avatar">
10
+ <div class="image">
11
+ <%= simple_image_medium(user) %>
12
+ </div>
13
+ </figure>
14
+ <% end %>
15
+
16
+ <dl class="fields">
17
+ <div>
18
+ <dt><%= t('.registration_date') %></dt>
19
+ <dd><%= time_tag user.created_at %></dd>
20
+ </div>
21
+ <% unless user.last_seen.blank? %>
22
+ <div>
23
+ <dt><%= t('activerecord.attributes.user.last_seen') %></dt>
24
+ <dd><%= time_tag user.last_seen %></dd>
25
+ </div>
26
+ <% end %>
27
+
28
+ <%= render partial: 'users/profile/data', locals: { user: user, data: user.profile } %>
29
+ </dl>
30
+ </section>
@@ -0,0 +1,20 @@
1
+ <div>
2
+ <dt><%= t('activerecord.attributes.user_profile.name') %></dt>
3
+ <dd><%= user.full_name %></dd>
4
+ </div>
5
+
6
+ <% unless data['about'].blank? %>
7
+ <div>
8
+ <dt><%= t('activerecord.attributes.user_profile.about') %></dt>
9
+ <dd><%= simple_format(data['about']) %></dd>
10
+ </div>
11
+ <% end %>
12
+
13
+ <% unless data['gender'].blank? %>
14
+ <div>
15
+ <dt><%= t('activerecord.attributes.user_profile.gender') %></dt>
16
+ <dd>
17
+ <%= Biovision::Components::Users::ProfileHandler.gender(data['gender']) %>
18
+ </dd>
19
+ </div>
20
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <% content_for :meta_title, @entity.profile_name %>
2
+ <% content_for :meta_image, (request.protocol + request.host_with_port + @entity.image.medium_url) unless @entity.image.blank? %>
3
+ <% content_for :breadcrumbs do %>
4
+ <span><%= t('.breadcrumb', name: @entity.profile_name) %></span>
5
+ <% end %>
6
+
7
+ <article>
8
+ <div class="content-wrapper">
9
+ <h1><%= @entity.profile_name %></h1>
10
+
11
+ <% if current_user == @entity %>
12
+ <aside class="users__profile-aside">
13
+ <nav>
14
+ <%= link_to t(:edit), edit_my_profile_path, class: 'button button-primary' %>
15
+ </nav>
16
+ </aside>
17
+ <% end %>
18
+
19
+ <%= render partial: 'profile', locals: { user: @entity } %>
20
+ </div>
21
+ </article>
@@ -5,12 +5,32 @@ ru:
5
5
  few: "%{count} объекта"
6
6
  many: "%{count} объектов"
7
7
  other: "%{count} объектов"
8
+ child_count:
9
+ zero: "дочерних объектов нет"
10
+ one: "%{count} дочерний объект"
11
+ few: "%{count} дочерних объекта"
12
+ many: "%{count} дочерних объектов"
13
+ other: "%{count} дочерних объектов"
8
14
  attributes:
9
15
  banned: "В чёрном списке"
16
+ children_cache: "Кеш дочек"
10
17
  created_at: "Время создания"
11
18
  data: "Данные"
12
19
  deleted: "Объект удалён"
20
+ description: "Описание"
21
+ image: "Картинка"
22
+ language: "Язык"
23
+ language_id: "Язык"
24
+ meta:
25
+ description: "Описание"
26
+ heading: "Заголовок страницы (h1/h2)"
27
+ keywords: "Ключевые слова"
28
+ title: "Заголовок окна (title)"
29
+ name: "Название"
13
30
  object_count: "Количество объектов"
31
+ parent: "Родитель"
32
+ parent_id: "Родитель"
33
+ parents_cache: "Кеш родителей"
14
34
  priority: "Порядок сортировки"
15
35
  updated_at: "Время обновления"
16
36
  uuid: "UUID"
@@ -59,6 +79,15 @@ ru:
59
79
  restricted_access: "Доступ к странице ограничен (401)."
60
80
  service_unavailable: "Сервис временно недоступен (503)."
61
81
  unauthorized: "Не хватает прав для просмотра страницы (401)."
82
+ unauthorized:
83
+ title: "Доступ ограничен"
84
+ heading: "Доступ ограничен"
85
+ not_found:
86
+ title: "Страница не найдена"
87
+ heading: "Страница не найдена"
88
+ forbidden:
89
+ title: "Доступ запрещён"
90
+ heading: "Доступ запрещён"
62
91
  admin:
63
92
  errors:
64
93
  unauthorized:
@@ -73,6 +102,15 @@ ru:
73
102
  admin:
74
103
  footer:
75
104
  support: "Поддержка"
105
+ legal:
106
+ tos:
107
+ heading: "Пользовательское соглашение"
108
+ nav_text: "Пользовательское соглашение"
109
+ title: "Пользовательское соглашение"
110
+ privacy:
111
+ heading: "Политика конфиденциальности"
112
+ nav_text: "Конфиденциальность"
113
+ title: "Политика конфиденциальности"
76
114
  site_name: "example.com"
77
115
  my:
78
116
  recoveries:
@@ -87,4 +125,24 @@ ru:
87
125
  notice: "Замечание"
88
126
  success: "Успешно"
89
127
  warning: "Предупреждение"
128
+ forms:
129
+ state_container:
130
+ saving: "Сохранение…"
131
+ meta_texts:
132
+ name: "Метаданные"
133
+ entity:
134
+ edit:
135
+ nav_text: "Редактировать"
136
+ new:
137
+ nav_text: "Создать"
90
138
  nothing_found: "Ничего не нашлось"
139
+ save: "Сохранить"
140
+ are_you_sure: "Вы уверены?"
141
+ view_as_visitor: "Посмотреть как пользователь"
142
+ view_settings: "Посмотреть настройки"
143
+ create: "Создать"
144
+ back: "Назад"
145
+ edit: "Редактировать"
146
+ delete: "Удалить"
147
+ flags: "Флаги"
148
+ not_set: "Не задано"
@@ -8,12 +8,17 @@ ru:
8
8
  activerecord:
9
9
  models:
10
10
  biovision_component: "Компонент"
11
+ group: "Группа доступа"
11
12
  language: "Язык"
12
13
  metric: "Метрика"
13
14
  metric_value: "Значение метрики"
15
+ role: "Роль доступа"
16
+ role_group: "Роль доступа в группе"
14
17
  simple_image: "Простое изображение"
15
18
  simple_image_tag: "Метка простого изображения"
16
19
  simple_image_tag_image: "Связь метки и простого изображения"
20
+ user_group: "Пользователь в группе доступа"
21
+ user_role: "Роль доступа для пользователя"
17
22
  attributes:
18
23
  biovision_component:
19
24
  active: "Активен"
@@ -47,11 +52,15 @@ ru:
47
52
  simple_image_tag_image:
48
53
  simple_image_tag: "Метка"
49
54
  simple_image_tag_id: "Метка"
55
+ user_role:
56
+ inclusive: "Инклюзивно"
50
57
  attributes:
51
58
  biovision_component: "Компонент"
52
59
  biovision_component_id: "Компонент"
53
- language: "Язык"
54
- language_id: "Язык"
60
+ group: "Группа доступа"
61
+ group_id: "Группа доступа"
62
+ role: "Роль доступа"
63
+ role_id: "Роль доступа"
55
64
  simple_image: "Изображение"
56
65
  simple_image_id: "Изображение"
57
66
  languages:
@@ -71,6 +80,13 @@ ru:
71
80
  heading: "Настройки"
72
81
  parameters:
73
82
  heading: "Параметры"
83
+ new_parameter:
84
+ heading: "Новый параметр"
85
+ parameter_slug: "Идентификатор"
86
+ parameter_value: "Значение"
87
+ guidelines:
88
+ slug: "Только латинские буквы, цифры, дефис и подчёркивание (кроме начала и конца)."
89
+ value: "Произвольная строка"
74
90
  update_settings:
75
91
  success: "Настройки успешно изменены"
76
92
  index:
@@ -79,3 +95,15 @@ ru:
79
95
  heading: "Компоненты"
80
96
  show:
81
97
  title: "Компонент «%{slug}»"
98
+ shared:
99
+ forms:
100
+ simple_image:
101
+ guideline: "Картинка в формате SVG, JPG или PNG размером в пределах 1280×1280."
102
+ load_image:
103
+ upload: "Загрузить"
104
+ cancel: "Отменить"
105
+ new_image: "Новая картинка"
106
+ new_image: "Загрузить"
107
+ select: "Выбрать"
108
+ browse:
109
+ filter: "Фильтр по названию или имени файла"
@@ -0,0 +1,106 @@
1
+ ru:
2
+ activerecord:
3
+ models:
4
+ contact_method: "Способ связи"
5
+ contact_type: "Тип связи"
6
+ feedback_message: "Сообщение от посетителя"
7
+ feedback_response: "Ответ на сообщение посетителя"
8
+ attributes:
9
+ contact_method:
10
+ contact_type: "Тип связи"
11
+ contact_type_id: "Тип связи"
12
+ value: "Значение"
13
+ feedback_message:
14
+ attachment: "Приложение"
15
+ comment: "Комментарий"
16
+ email: "Электронная почта"
17
+ name: "Имя"
18
+ phone: "Телефон"
19
+ processed: "Обработано"
20
+ feedback_response:
21
+ body: "Текст"
22
+ feedback_message: "Сообщение посетителя"
23
+ feedback_message_id: "Сообщение посетителя"
24
+ biovision:
25
+ components:
26
+ contact:
27
+ name: "Контакты"
28
+ settings:
29
+ feedback_email: "Email для обратной связи"
30
+ admin:
31
+ contact_methods:
32
+ destroy:
33
+ success: "Способ связи удалён"
34
+ edit:
35
+ title: "Редактирование способа связи"
36
+ nav_text: "Редактировать"
37
+ heading: "Редактирование способа связи"
38
+ index:
39
+ title: "Все способы связи"
40
+ heading: "Способы связи"
41
+ nav_item:
42
+ text: "Способы связи"
43
+ description: "Управление способами связи"
44
+ new:
45
+ title: "Добавление способа связи"
46
+ nav_text: "Создать"
47
+ heading: "Новый способ связи"
48
+ show:
49
+ title: "Способ связи «%{name}»"
50
+ contact_types:
51
+ destroy:
52
+ success: "Тип связи удалён"
53
+ edit:
54
+ title: "Редактирование типа связи"
55
+ nav_text: "Редактировать"
56
+ heading: "Редактирование типа связи"
57
+ index:
58
+ title: "Все типы связи"
59
+ heading: "Типы связи"
60
+ nav_item:
61
+ text: "Типы связи"
62
+ description: "Управление типами связи"
63
+ new:
64
+ title: "Добавление типа связи"
65
+ nav_text: "Создать"
66
+ heading: "Новый тип связи"
67
+ show:
68
+ title: "Тип связи «%{slug}»"
69
+ feedback_messages:
70
+ destroy:
71
+ success: "Сообщение от посетилеля удалено"
72
+ edit:
73
+ title: "Редактирование сообщения от посетителя"
74
+ nav_text: "Редактировать"
75
+ heading: "Редактирование сообщения от посетителя"
76
+ index:
77
+ title: "Сообщения от посетителей, страница %{page}"
78
+ heading: "Сообщения от посетителей"
79
+ nav_item:
80
+ text: "Сообщения от посетителей"
81
+ description: "Управление сообщениями от посетителей"
82
+ show:
83
+ title: "Сообщение от посетителя №%{id}"
84
+ feedback_responses:
85
+ destroy:
86
+ success: "Ответ на сообщение от посетилеля удалён"
87
+ edit:
88
+ title: "Редактирование ответа на сообщение от посетителя"
89
+ nav_text: "Редактировать"
90
+ heading: "Редактирование ответ на сообщение от посетителя"
91
+ index:
92
+ title: "Ответы на сообщения от посетителей, страница %{page}"
93
+ heading: "Ответы на сообщения от посетителей"
94
+ nav_item:
95
+ text: "Ответы на сообщения от посетителей"
96
+ description: "Управление ответами на сообщения от посетителей"
97
+ show:
98
+ title: "Ответ на сообщение от посетителя №%{id}"
99
+ contact:
100
+ form:
101
+ message: "Спасибо за обратную связь."
102
+ disclaimer: "Отправляя данную форму, вы соглашаетесь на обработку своих персональных данных"
103
+ submit: "Отправить"
104
+ index:
105
+ nav_text: "Контакты"
106
+ title: "Контакты"