biovision 0.1.210414.0 → 0.3.210504.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -34
  3. data/app/assets/stylesheets/biovision/admin/components.scss +10 -0
  4. data/app/assets/stylesheets/biovision/admin/components/users.scss +4 -0
  5. data/app/assets/stylesheets/biovision/admin/layout.scss +0 -8
  6. data/app/assets/stylesheets/biovision/biovision.scss +8 -0
  7. data/app/assets/stylesheets/biovision/components.scss +1 -0
  8. data/app/assets/stylesheets/biovision/components/filters.scss +41 -0
  9. data/app/assets/stylesheets/biovision/components/forms.scss +16 -0
  10. data/app/assets/stylesheets/biovision/components/quick_search.scss +24 -0
  11. data/app/assets/stylesheets/biovision/default.scss +4 -4
  12. data/app/assets/stylesheets/biovision/themes/default_theme.scss +0 -1
  13. data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +6 -3
  14. data/app/assets/stylesheets/biovision/themes/default_theme/layout/footer.scss +3 -0
  15. data/app/assets/stylesheets/biovision/themes/default_theme/layout/header.scss +2 -0
  16. data/app/assets/stylesheets/biovision/vars.scss +5 -0
  17. data/app/controllers/admin/components_controller.rb +25 -79
  18. data/app/controllers/admin/dynamic_pages_controller.rb +1 -1
  19. data/app/controllers/admin/index_controller.rb +8 -2
  20. data/app/controllers/admin/navigation_groups_controller.rb +31 -0
  21. data/app/controllers/admin/tokens_controller.rb +15 -0
  22. data/app/controllers/admin/users_controller.rb +33 -3
  23. data/app/controllers/admin_controller.rb +15 -2
  24. data/app/controllers/concerns/crud_entities.rb +13 -13
  25. data/app/controllers/contact_controller.rb +1 -1
  26. data/app/helpers/biovision_components_helper.rb +7 -3
  27. data/app/lib/biovision/components/base/component_parameters.rb +8 -0
  28. data/app/lib/biovision/components/base/component_privileges.rb +26 -17
  29. data/app/lib/biovision/components/base/component_settings.rb +8 -0
  30. data/app/lib/biovision/components/base_component.rb +20 -23
  31. data/app/lib/biovision/components/contact_component.rb +5 -1
  32. data/app/lib/biovision/components/content_component.rb +36 -10
  33. data/app/lib/biovision/components/track_component.rb +1 -1
  34. data/app/lib/biovision/components/users_component.rb +28 -2
  35. data/app/lib/biovision/helpers/data_helper.rb +43 -0
  36. data/app/lib/biovision/migrations/component_migration.rb +54 -0
  37. data/app/mailers/feedback_mailer.rb +14 -0
  38. data/app/models/biovision_component.rb +3 -0
  39. data/app/models/browser.rb +1 -1
  40. data/app/models/code.rb +2 -2
  41. data/app/models/concerns/tree_structure.rb +2 -1
  42. data/app/models/contact_method.rb +1 -1
  43. data/app/models/contact_type.rb +1 -1
  44. data/app/models/dynamic_block.rb +1 -1
  45. data/app/models/dynamic_page.rb +3 -1
  46. data/app/models/feedback_message.rb +7 -1
  47. data/app/models/feedback_response.rb +2 -2
  48. data/app/models/navigation_group.rb +11 -1
  49. data/app/models/role.rb +44 -6
  50. data/app/models/simple_image.rb +1 -1
  51. data/app/models/simple_image_tag.rb +1 -1
  52. data/app/models/token.rb +6 -2
  53. data/app/models/user.rb +25 -10
  54. data/app/uploaders/simple_file_uploader.rb +1 -1
  55. data/app/views/admin/components/_list.html.erb +1 -1
  56. data/app/views/admin/components/entity/_links.html.erb +31 -21
  57. data/app/views/admin/components/links/_base.html.erb +1 -0
  58. data/app/views/admin/components/settings.html.erb +2 -1
  59. data/app/views/admin/components/settings/_settings.html.erb +3 -3
  60. data/app/views/admin/dynamic_blocks/entity/_in_list.html.erb +6 -4
  61. data/app/views/admin/dynamic_blocks/index.html.erb +5 -3
  62. data/app/views/admin/dynamic_blocks/show.html.erb +6 -4
  63. data/app/views/admin/dynamic_pages/_dynamic_page.jbuilder +18 -0
  64. data/app/views/admin/dynamic_pages/entity/_in_list.html.erb +4 -2
  65. data/app/views/admin/dynamic_pages/entity/_in_search.html.erb +7 -0
  66. data/app/views/admin/dynamic_pages/index.html.erb +11 -4
  67. data/app/views/admin/dynamic_pages/search.jbuilder +4 -0
  68. data/app/views/admin/dynamic_pages/show.html.erb +1 -1
  69. data/app/views/admin/index/index.html.erb +7 -5
  70. data/app/views/admin/navigation_group_pages/entity/_in_list.html.erb +26 -0
  71. data/app/views/admin/navigation_groups/entity/_dynamic_pages.html.erb +38 -0
  72. data/app/views/admin/navigation_groups/entity/_in_list.html.erb +6 -4
  73. data/app/views/admin/navigation_groups/index.html.erb +11 -4
  74. data/app/views/admin/navigation_groups/show.html.erb +16 -3
  75. data/app/views/admin/tokens/_form.html.erb +31 -0
  76. data/app/views/admin/tokens/_nav_item.html.erb +6 -0
  77. data/app/views/admin/tokens/entity/_in_list.html.erb +27 -0
  78. data/app/views/admin/tokens/index.html.erb +16 -0
  79. data/app/views/admin/tokens/show.html.erb +26 -0
  80. data/app/views/admin/users/_user.jbuilder +18 -0
  81. data/app/views/admin/users/entity/_in_list.html.erb +3 -1
  82. data/app/views/admin/users/entity/_in_search.html.erb +18 -0
  83. data/app/views/admin/users/index.html.erb +13 -4
  84. data/app/views/admin/users/roles.html.erb +23 -0
  85. data/app/views/admin/users/roles/_component.html.erb +22 -0
  86. data/app/views/admin/users/search.jbuilder +4 -0
  87. data/app/views/admin/users/show.html.erb +14 -2
  88. data/app/views/admin/widgets/_filters.html.erb +15 -0
  89. data/app/views/admin/widgets/_quick_search.html.erb +13 -0
  90. data/app/views/admin/widgets/filters/_flag.html.erb +15 -0
  91. data/app/views/components/content/_dynamic_page.html.erb +6 -10
  92. data/app/views/components/content/_dynamic_page_content.html.erb +14 -0
  93. data/app/views/contact/_form.html.erb +1 -1
  94. data/app/views/feedback_mailer/new_feedback_request.html.erb +11 -0
  95. data/app/views/feedback_mailer/new_feedback_request.text.erb +6 -0
  96. data/app/views/index/index.html.erb +14 -0
  97. data/app/views/layouts/admin.html.erb +0 -1
  98. data/app/views/layouts/application/_footer.html.erb +1 -1
  99. data/app/views/my/index/index.html.erb +26 -0
  100. data/app/views/shared/entity/_time_field.html.erb +6 -0
  101. data/app/views/shared/entity/_track.html.erb +12 -0
  102. data/app/views/shared/entity/_tree_caches.html.erb +8 -1
  103. data/app/views/shared/entity/edit.html.erb +5 -3
  104. data/app/views/shared/forms/_simple_image.html.erb +12 -4
  105. data/config/locales/biovision-ru.yml +14 -1
  106. data/config/locales/components-ru.yml +4 -2
  107. data/config/locales/contact-ru.yml +4 -0
  108. data/config/locales/content-ru.yml +4 -0
  109. data/config/locales/users-ru.yml +27 -5
  110. data/config/routes.rb +14 -4
  111. data/db/migrate/20191228000000_create_biovision_components.rb +2 -0
  112. data/db/migrate/20200224000000_create_track_component.rb +8 -12
  113. data/db/migrate/20200224000010_create_users_component.rb +10 -40
  114. data/db/migrate/20210405000000_create_acl.rb +15 -0
  115. data/db/migrate/{20200529000000_create_content_component.rb → 20210421000000_create_content_component.rb} +3 -18
  116. data/db/migrate/{20210401000000_create_contact_component.rb → 20210421000010_create_contact_component.rb} +1 -22
  117. data/lib/biovision/version.rb +1 -1
  118. metadata +34 -13
  119. data/app/lib/biovision/components/base/privilege_handler.rb +0 -79
  120. data/app/views/admin/components/links/_content.html.erb +0 -9
  121. data/app/views/admin/components/links/_track.html.erb +0 -2
  122. data/app/views/admin/components/links/_users.html.erb +0 -4
  123. data/app/views/admin/components/links/extra/_content.html.erb +0 -0
  124. data/app/views/admin/components/privileges.html.erb +0 -20
  125. data/app/views/admin/components/privileges/_component_user.html.erb +0 -17
  126. data/app/views/admin/components/privileges/_links.html.erb +0 -17
  127. data/app/views/admin/components/privileges/_users.html.erb +0 -23
@@ -0,0 +1,38 @@
1
+ <section
2
+ class="js-entity-list-with-search"
3
+ data-prefix="<%= dynamic_page_admin_navigation_group_path(id: entity.id, page_id: '') %>"
4
+ >
5
+ <h2><%= t('.heading') %></h2>
6
+
7
+ <div class="list">
8
+ <%=
9
+ render(
10
+ partial: 'shared/admin/list_with_priority',
11
+ locals: { collection: collection, handler: handler }
12
+ )
13
+ %>
14
+ </div>
15
+
16
+ <% if component_handler.permit?('edit', entity) %>
17
+ <section>
18
+ <h3><%= t('.add') %></h3>
19
+
20
+ <div class="search">
21
+ <label class="floating-label">
22
+ <%=
23
+ search_field_tag(
24
+ 'q',
25
+ '',
26
+ class: 'input-text',
27
+ data: { url: search_admin_dynamic_pages_url(format: :json) },
28
+ placeholder: DynamicPage.human_attribute_name(:url)
29
+ )
30
+ %>
31
+ <span><%= DynamicPage.human_attribute_name(:url) %></span>
32
+ </label>
33
+ </div>
34
+
35
+ <ul class="results"></ul>
36
+ </section>
37
+ <% end %>
38
+ </section>
@@ -5,8 +5,10 @@
5
5
  <%= t(:page_count, count: entity.dynamic_pages_count) %>
6
6
  </div>
7
7
 
8
- <div class="entity-actions">
9
- <%= edit_icon(entity) %>
10
- <%= destroy_icon(entity) %>
11
- </div>
8
+ <% if local_assigns[:handler] && handler.permit?('edit', entity) %>
9
+ <div class="entity-actions">
10
+ <%= edit_icon(entity) %>
11
+ <%= destroy_icon(entity) %>
12
+ </div>
13
+ <% end %>
12
14
  </div>
@@ -7,9 +7,16 @@
7
7
  <article>
8
8
  <h1><%= t('.heading') %></h1>
9
9
 
10
- <nav class="entity-actions">
11
- <%= create_icon(new_admin_navigation_group_path) %>
12
- </nav>
10
+ <% if component_handler.permit?("#{controller_name}.edit") %>
11
+ <nav class="entity-actions">
12
+ <%= create_icon(new_admin_navigation_group_path) %>
13
+ </nav>
14
+ <% end %>
13
15
 
14
- <%= render partial: 'shared/admin/list', locals: { collection: @collection } %>
16
+ <%=
17
+ render(
18
+ partial: 'shared/admin/list',
19
+ locals: { collection: @collection, handler: component_handler }
20
+ )
21
+ %>
15
22
  </article>
@@ -8,13 +8,26 @@
8
8
  <article>
9
9
  <h1><%= @entity.class.model_name.human %> <q><%= @entity.name %></q></h1>
10
10
 
11
- <nav class="entity-actions">
12
- <%= edit_icon(@entity) %>
13
- </nav>
11
+ <% if component_handler.permit?('edit', @entity) %>
12
+ <nav class="entity-actions">
13
+ <%= edit_icon(@entity) %>
14
+ </nav>
15
+ <% end %>
14
16
 
15
17
  <dl class="fields">
16
18
  <%= render partial: 'shared/entity/text_field', locals: { entity: @entity, field: :name } %>
17
19
  <%= render partial: 'shared/entity/slug', locals: { entity: @entity } %>
18
20
  <%= render partial: 'shared/entity/timestamps', locals: { entity: @entity } %>
19
21
  </dl>
22
+
23
+ <%=
24
+ render(
25
+ partial: 'admin/navigation_groups/entity/dynamic_pages',
26
+ locals: {
27
+ collection: @entity.navigation_group_pages,
28
+ entity: @entity,
29
+ handler: component_handler
30
+ }
31
+ )
32
+ %>
20
33
  </article>
@@ -0,0 +1,31 @@
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
+ <% if entity.id.blank? %>
6
+ <!-- <div>-->
7
+ <!-- <dt><%#= f.label :user_id %></dt>-->
8
+ <!-- <dd>-->
9
+ <%#=
10
+ <!-- f.number_field(-->
11
+ <!-- :user_id,-->
12
+ <!-- in: User.ids_range-->
13
+ <!-- )-->
14
+ %>
15
+ <%#= render partial: 'admin/users/search', locals: { target_id: 'token_user_id' } %>
16
+ <!-- </dd>-->
17
+ <!-- </div>-->
18
+ <% else %>
19
+ <%= render partial: 'shared/entity/linked_entity', locals: { entity: entity.user } %>
20
+ <%= render partial: 'shared/entity/text_field', locals: { entity: entity, field: :token } %>
21
+ <% end %>
22
+ <%= render partial: 'shared/forms/entity_flags', locals: { f: f } %>
23
+ </dl>
24
+
25
+ <%= render 'shared/forms/state_container' %>
26
+
27
+ <div class="buttons">
28
+ <%= hidden_field_tag :entity_id, entity.id %>
29
+ <%= f.button t(:save), class: 'button button-save' %>
30
+ </div>
31
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <div>
2
+ <%= link_to t('.text'), admin_tokens_path %>
3
+ </div>
4
+ <div class="description">
5
+ <%= t('.description') %>
6
+ </div>
@@ -0,0 +1,27 @@
1
+ <figure class="image"><%= simple_image_preview(entity.user) %></figure>
2
+ <div class="data">
3
+ <div><%= admin_entity_link(entity) %></div>
4
+ <div class="info">
5
+ <% unless entity.last_used.nil? %>
6
+ <div>
7
+ <%= entity.class.human_attribute_name(:last_used) %>
8
+ <%= time_tag entity.last_used %>
9
+ </div>
10
+ <% end %>
11
+ </div>
12
+ <div class="secondary info">
13
+ <div><%= entity.ip_address&.ip %></div>
14
+ <% unless entity.agent.blank? %>
15
+ <div class="truncate"><%= entity.agent.name %></div>
16
+ <% end %>
17
+ </div>
18
+
19
+ <%= render(partial: 'shared/admin/toggle', locals: { entity: entity }) %>
20
+
21
+ <% if local_assigns[:handler] && handler.permit?('edit', entity) %>
22
+ <div class="entity-actions">
23
+ <%= edit_icon(entity) %>
24
+ <%= destroy_icon(entity) %>
25
+ </div>
26
+ <% end %>
27
+ </div>
@@ -0,0 +1,16 @@
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.tokens.nav_item.text') %></span>
5
+ <% end %>
6
+
7
+ <article>
8
+ <h1><%= t('.heading') %></h1>
9
+
10
+ <%=
11
+ render(
12
+ partial: 'shared/admin/list',
13
+ locals: { collection: @collection, handler: component_handler }
14
+ )
15
+ %>
16
+ </article>
@@ -0,0 +1,26 @@
1
+ <% content_for :meta_title, t('.title', id: @entity.id) %>
2
+ <% content_for :breadcrumbs do %>
3
+ <%= admin_biovision_component_link(component_handler.component) %>
4
+ <%= link_to(t('admin.tokens.nav_item.text'), admin_tokens_path) %>
5
+ <span><%= @entity.token %></span>
6
+ <% end %>
7
+
8
+ <article>
9
+ <h1><%= @entity.class.model_name.human %> <%= @entity.id %></h1>
10
+
11
+ <% if component_handler.permit?('edit', @entity) %>
12
+ <nav class="entity-actions">
13
+ <%= edit_icon(@entity) %>
14
+ <%= destroy_icon(@entity) %>
15
+ </nav>
16
+ <% end %>
17
+
18
+ <dl class="fields">
19
+ <%= render partial: 'shared/entity/linked_entity', locals: { entity: @entity.user } %>
20
+ <%= render partial: 'shared/entity/time_field', locals: { entity: @entity, field: :last_used } %>
21
+ <%= render partial: 'shared/entity/timestamps', locals: { entity: @entity } %>
22
+ <%= render partial: 'shared/entity/track', locals: { entity: @entity } %>
23
+ </dl>
24
+
25
+ <%= render(partial: 'shared/admin/toggle', locals: { entity: @entity }) %>
26
+ </article>
@@ -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
@@ -32,7 +32,9 @@
32
32
  <%= render(partial: 'shared/admin/toggle', locals: { entity: entity }) %>
33
33
 
34
34
  <div class="entity-actions">
35
- <%= edit_icon(entity) %>
35
+ <% if local_assigns[:handler] %>
36
+ <%= edit_icon(entity) if handler.permit?('edit', entity) %>
37
+ <% end %>
36
38
  <%= world_icon(entity) %>
37
39
  </div>
38
40
  </div>
@@ -0,0 +1,18 @@
1
+ <figure class="image"><%= simple_image_preview(entity) %></figure>
2
+ <div class="data">
3
+ <div><%= admin_entity_link(entity) %></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>
@@ -7,9 +7,18 @@
7
7
  <article>
8
8
  <h1><%= t('.heading') %></h1>
9
9
 
10
- <nav class="entity-actions">
11
- <%= create_icon(new_admin_user_path) %>
12
- </nav>
10
+ <% if component_handler.permit?('users.edit') %>
11
+ <nav class="entity-actions">
12
+ <%= create_icon(new_admin_user_path) %>
13
+ </nav>
14
+ <% end %>
13
15
 
14
- <%= render partial: 'shared/admin/list', locals: { collection: @collection } %>
16
+ <%=
17
+ render(
18
+ partial: 'admin/widgets/quick_search',
19
+ locals: { endpoint: search_admin_users_url }
20
+ )
21
+ %>
22
+
23
+ <%= render partial: 'shared/admin/list', locals: { collection: @collection, handler: component_handler } %>
15
24
  </article>
@@ -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) %>
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,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,4 @@
1
+ json.data @collection do |entity|
2
+ json.partial! entity
3
+ end
4
+ json.partial! 'shared/pagination', locals: { collection: @collection }
@@ -13,11 +13,23 @@
13
13
  <% end %>
14
14
 
15
15
  <nav class="entity-actions">
16
- <%= edit_icon(@entity) %>
16
+ <%= edit_icon(@entity) if component_handler.permit?('edit', @entity) %>
17
17
  <%= world_icon(@entity) %>
18
- <%= destroy_icon(@entity) %>
18
+ <%= destroy_icon(@entity) if component_handler.permit?('edit', @entity) %>
19
19
  </nav>
20
20
 
21
+ <% if current_user.super_user? %>
22
+ <nav>
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
+ </nav>
31
+ <% end %>
32
+
21
33
  <%= render partial: 'admin/users/entity/fields', locals: { entity: @entity } %>
22
34
 
23
35
  <%=
@@ -0,0 +1,15 @@
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 type == :flag %>
7
+ <%= render partial: 'admin/widgets/filters/flag', locals: { f: f, key: key, scope: scope, value: filter[key] } %>
8
+ <% end %>
9
+ <% end %>
10
+ </div>
11
+ <div class="actions">
12
+ <%= button_tag(t('.apply'), class: 'button button-secondary', name: nil) %>
13
+ </div>
14
+ </fieldset>
15
+ <% 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>
@@ -6,16 +6,12 @@
6
6
 
7
7
  <article>
8
8
  <div class="content-wrapper">
9
- <h1><%= entity.meta('heading') %></h1>
10
-
11
- <% if content_component.editable?(entity) %>
12
- <nav class="entity-actions">
13
- <%= gear_icon(entity) %>
14
- <%= edit_icon(entity) %>
15
- </nav>
16
- <% end %>
17
-
18
- <div class="text"><%= raw(entity.body) %></div>
9
+ <%=
10
+ render(
11
+ partial: 'components/content/dynamic_page_content',
12
+ locals: { entity: entity }
13
+ )
14
+ %>
19
15
  </div>
20
16
  </article>
21
17
  <% end %>