decidim-sortitions 0.27.6 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/sortitions/sortition_cell.rb +1 -1
  3. data/app/cells/decidim/sortitions/sortition_l_cell.rb +26 -0
  4. data/app/cells/decidim/sortitions/sortition_metadata_cell.rb +66 -0
  5. data/app/commands/decidim/sortitions/admin/create_sortition.rb +2 -2
  6. data/app/commands/decidim/sortitions/admin/destroy_sortition.rb +1 -1
  7. data/app/commands/decidim/sortitions/admin/update_sortition.rb +1 -1
  8. data/app/controllers/decidim/sortitions/admin/sortitions_controller.rb +11 -11
  9. data/app/controllers/decidim/sortitions/sortitions_controller.rb +0 -1
  10. data/app/helpers/decidim/sortitions/admin/sortitions_helper.rb +1 -0
  11. data/app/helpers/decidim/sortitions/sortitions_helper.rb +25 -1
  12. data/app/models/decidim/sortitions/sortition.rb +3 -3
  13. data/app/packs/entrypoints/decidim_sortitions.js +3 -0
  14. data/app/packs/stylesheets/sortitions.scss +31 -0
  15. data/app/permissions/decidim/sortitions/permissions.rb +0 -14
  16. data/app/presenters/decidim/sortitions/admin_log/sortition_presenter.rb +2 -2
  17. data/app/queries/decidim/sortitions/admin/participatory_space_proposal_components.rb +1 -1
  18. data/app/views/decidim/sortitions/admin/sortitions/_form.html.erb +29 -31
  19. data/app/views/decidim/sortitions/admin/sortitions/confirm_destroy.html.erb +24 -15
  20. data/app/views/decidim/sortitions/admin/sortitions/edit.html.erb +26 -22
  21. data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +47 -54
  22. data/app/views/decidim/sortitions/admin/sortitions/new.html.erb +16 -10
  23. data/app/views/decidim/sortitions/admin/sortitions/show.html.erb +42 -46
  24. data/app/views/decidim/sortitions/sortitions/_proposal.html.erb +1 -1
  25. data/app/views/decidim/sortitions/sortitions/_results_count.html.erb +3 -3
  26. data/app/views/decidim/sortitions/sortitions/_sortitions.html.erb +10 -11
  27. data/app/views/decidim/sortitions/sortitions/_tags.html.erb +0 -1
  28. data/app/views/decidim/sortitions/sortitions/index.html.erb +14 -17
  29. data/app/views/decidim/sortitions/sortitions/index.js.erb +0 -5
  30. data/app/views/decidim/sortitions/sortitions/show.html.erb +123 -118
  31. data/config/locales/ar.yml +2 -24
  32. data/config/locales/bg.yml +0 -36
  33. data/config/locales/ca.yml +10 -21
  34. data/config/locales/cs.yml +7 -22
  35. data/config/locales/de.yml +10 -21
  36. data/config/locales/el.yml +6 -19
  37. data/config/locales/en.yml +14 -25
  38. data/config/locales/es-MX.yml +9 -20
  39. data/config/locales/es-PY.yml +9 -20
  40. data/config/locales/es.yml +9 -20
  41. data/config/locales/eu.yml +25 -32
  42. data/config/locales/fi-plain.yml +7 -20
  43. data/config/locales/fi.yml +27 -40
  44. data/config/locales/fr-CA.yml +7 -20
  45. data/config/locales/fr.yml +10 -21
  46. data/config/locales/ga-IE.yml +0 -6
  47. data/config/locales/gl.yml +2 -22
  48. data/config/locales/hu.yml +2 -22
  49. data/config/locales/id-ID.yml +2 -19
  50. data/config/locales/is-IS.yml +2 -16
  51. data/config/locales/it.yml +2 -21
  52. data/config/locales/ja.yml +7 -19
  53. data/config/locales/lt.yml +6 -22
  54. data/config/locales/lv.yml +2 -22
  55. data/config/locales/nl.yml +2 -21
  56. data/config/locales/no.yml +2 -21
  57. data/config/locales/pl.yml +2 -24
  58. data/config/locales/pt-BR.yml +3 -25
  59. data/config/locales/pt.yml +2 -21
  60. data/config/locales/ro-RO.yml +5 -21
  61. data/config/locales/ru.yml +2 -22
  62. data/config/locales/sk.yml +2 -23
  63. data/config/locales/sr-CS.yml +0 -6
  64. data/config/locales/sv.yml +2 -21
  65. data/config/locales/tr-TR.yml +3 -21
  66. data/config/locales/uk.yml +2 -22
  67. data/config/locales/zh-CN.yml +2 -20
  68. data/config/locales/zh-TW.yml +5 -18
  69. data/lib/decidim/sortitions/component.rb +5 -7
  70. data/lib/decidim/sortitions/engine.rb +8 -3
  71. data/lib/decidim/sortitions/seeds.rb +24 -0
  72. data/lib/decidim/sortitions/test/factories.rb +11 -16
  73. data/lib/decidim/sortitions/version.rb +1 -1
  74. metadata +31 -34
  75. data/app/cells/decidim/sortitions/sortition_m/data.erb +0 -15
  76. data/app/cells/decidim/sortitions/sortition_m/footer.erb +0 -13
  77. data/app/cells/decidim/sortitions/sortition_m_cell.rb +0 -55
  78. data/app/controllers/decidim/sortitions/widgets_controller.rb +0 -30
  79. data/app/packs/stylesheets/decidim/sortitions/_sortitions.scss +0 -49
  80. data/app/views/decidim/sortitions/sortition_widgets/show.html.erb +0 -4
  81. data/app/views/decidim/sortitions/sortitions/_filters.html.erb +0 -39
  82. data/app/views/decidim/sortitions/sortitions/_filters_small_view.html.erb +0 -18
  83. data/app/views/decidim/sortitions/sortitions/_sortitions_count.html.erb +0 -1
  84. data/config/locales/he-IL.yml +0 -1
  85. data/decidim-sortitions.gemspec +0 -32
  86. data/lib/tasks/decidim/.keep +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3f3f195e687563902d388e9cedbc8430378a6a072b5f998650d3068b76aec3e
4
- data.tar.gz: 037313434d4200f71a148758e354b5253a4fb9b36b8d8992481c76926efa10b2
3
+ metadata.gz: a5be4a8d72565a12df3e2fd05734597bbe71a1e14a5a056b088ba2d5e09c1c95
4
+ data.tar.gz: 741c81d9b1718a83b5b9e783b05d3368597bfd1613b8613e9473792f8a6e5438
5
5
  SHA512:
6
- metadata.gz: 86b6179b79eb8dc0d11c93d6b1ae2b9a1e35e522204acaf4963771a4dcb93fe6760e15c54d5c33cef5dbb16d85bb3d644c75341d68b4d37ea30630bdc9e2f673
7
- data.tar.gz: '0902b6c5048f567ab5753be849b45f909df50ecc28fd7101683c6b81ab8b272911270d1b1f8626e929b7d37fb0f64b203f7c726f6fc7208d55f0762fa032b28f'
6
+ metadata.gz: 87c3ca33a587afca502d04d11bf55f301d002c05dcf234198a7b5b9941bbeb40a35838af4c482b70a18d4466221a73bc82a378bfbe90c40b1ba0f36b82ed753f
7
+ data.tar.gz: '098d446e98c7334bb8ee053d8e35a0f2a852de313cd2f94d8160a6bca2e2fa60053e9e2af79f286c9b9bcf64dc2afee7a39fcd655cb0ff9c58fc2c4638a9b099'
@@ -14,7 +14,7 @@ module Decidim
14
14
  private
15
15
 
16
16
  def card_size
17
- "decidim/sortitions/sortition_m"
17
+ "decidim/sortitions/sortition_l"
18
18
  end
19
19
  end
20
20
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cell/partial"
4
+
5
+ module Decidim
6
+ module Sortitions
7
+ # This cell renders a sortition with its L-size card.
8
+ class SortitionLCell < Decidim::CardLCell
9
+ include Decidim::Sortitions::Engine.routes.url_helpers
10
+
11
+ private
12
+
13
+ def has_author?
14
+ false
15
+ end
16
+
17
+ def has_state?
18
+ true
19
+ end
20
+
21
+ def metadata_cell
22
+ "decidim/sortitions/sortition_metadata"
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Sortitions
5
+ # This cell renders the assembly metadata for l card
6
+ class SortitionMetadataCell < Decidim::CardMetadataCell
7
+ include Decidim::Sortitions::SortitionsHelper
8
+
9
+ delegate :state, to: :model
10
+
11
+ def initialize(*)
12
+ super
13
+
14
+ @items.prepend(*sortition_items)
15
+ end
16
+
17
+ def sortition_items
18
+ [count_item, seed_item, badge_item]
19
+ end
20
+
21
+ def count_item
22
+ {
23
+ text: data_with_text(proposals_count, t("decidim.sortitions.sortitions.sortition.selected_proposals", count: proposals_count)),
24
+ icon: "chat-new-line"
25
+ }
26
+ end
27
+
28
+ def seed_item
29
+ {
30
+ text: data_with_text(model.seed, t("random_seed", scope: "decidim.sortitions.sortitions.sortition")),
31
+ icon: "seedling-line"
32
+ }
33
+ end
34
+
35
+ def badge_item
36
+ {
37
+ text: content_tag(:span, class: "label #{state_classes}") { badge_name }
38
+ }
39
+ end
40
+
41
+ def has_badge?
42
+ false
43
+ end
44
+
45
+ def badge_name
46
+ return t("filters.cancelled", scope: "decidim.sortitions.sortitions") if model.cancelled?
47
+
48
+ t("filters.active", scope: "decidim.sortitions.sortitions")
49
+ end
50
+
51
+ def data_with_text(data, text)
52
+ "#{content_tag(:strong) { data }}#{content_tag(:span) { text }}".html_safe
53
+ end
54
+
55
+ def state_classes
56
+ return "alert" if model.cancelled?
57
+
58
+ "success"
59
+ end
60
+
61
+ def proposals_count
62
+ @proposals_count = model.proposals.count
63
+ end
64
+ end
65
+ end
66
+ end
@@ -15,7 +15,7 @@ module Decidim
15
15
  # Executes the command. Broadcasts these events:
16
16
  #
17
17
  # - :ok when everything is valid.
18
- # - :invalid if the form wasn't valid and we couldn't proceed.
18
+ # - :invalid if the form was not valid and we could not proceed.
19
19
  #
20
20
  # Returns nothing.
21
21
  def call
@@ -49,7 +49,7 @@ module Decidim
49
49
  additional_info: form.additional_info,
50
50
  selected_proposals: [],
51
51
  candidate_proposals: [],
52
- category: category
52
+ category:
53
53
  )
54
54
  end
55
55
 
@@ -15,7 +15,7 @@ module Decidim
15
15
  # Executes the command. Broadcasts these events:
16
16
  #
17
17
  # - :ok when everything is valid.
18
- # - :invalid if the form wasn't valid and we couldn't proceed.
18
+ # - :invalid if the form was not valid and we could not proceed.
19
19
  #
20
20
  # Returns nothing.
21
21
  def call
@@ -15,7 +15,7 @@ module Decidim
15
15
  # Executes the command. Broadcasts these events:
16
16
  #
17
17
  # - :ok when everything is valid.
18
- # - :invalid if the form wasn't valid and we couldn't proceed.
18
+ # - :invalid if the form was not valid and we could not proceed.
19
19
  #
20
20
  # Returns nothing.
21
21
  def call
@@ -12,19 +12,19 @@ module Decidim
12
12
  def index; end
13
13
 
14
14
  def show
15
- enforce_permission_to :read, :sortition, sortition: sortition
15
+ enforce_permission_to :read, :sortition, sortition:
16
16
  end
17
17
 
18
18
  def edit
19
- enforce_permission_to :update, :sortition, sortition: sortition
19
+ enforce_permission_to(:update, :sortition, sortition:)
20
20
 
21
- @form = edit_sortition_form.from_model(sortition, current_participatory_space: current_participatory_space)
21
+ @form = edit_sortition_form.from_model(sortition, current_participatory_space:)
22
22
  end
23
23
 
24
24
  def update
25
- enforce_permission_to :update, :sortition, sortition: sortition
25
+ enforce_permission_to(:update, :sortition, sortition:)
26
26
 
27
- @form = edit_sortition_form.from_params(params, current_participatory_space: current_participatory_space)
27
+ @form = edit_sortition_form.from_params(params, current_participatory_space:)
28
28
  UpdateSortition.call(@form) do
29
29
  on(:ok) do |_sortition|
30
30
  flash[:notice] = I18n.t("sortitions.update.success", scope: "decidim.sortitions.admin")
@@ -41,13 +41,13 @@ module Decidim
41
41
  def new
42
42
  enforce_permission_to :create, :sortition
43
43
 
44
- @form = sortition_form.instance(current_participatory_space: current_participatory_space)
44
+ @form = sortition_form.instance(current_participatory_space:)
45
45
  end
46
46
 
47
47
  def create
48
48
  enforce_permission_to :create, :sortition
49
49
 
50
- @form = sortition_form.from_params(params, current_participatory_space: current_participatory_space)
50
+ @form = sortition_form.from_params(params, current_participatory_space:)
51
51
  CreateSortition.call(@form) do
52
52
  on(:ok) do |sortition|
53
53
  flash[:notice] = I18n.t("sortitions.create.success", scope: "decidim.sortitions.admin")
@@ -62,15 +62,15 @@ module Decidim
62
62
  end
63
63
 
64
64
  def confirm_destroy
65
- enforce_permission_to :destroy, :sortition, sortition: sortition
65
+ enforce_permission_to(:destroy, :sortition, sortition:)
66
66
 
67
- @form = destroy_sortition_form.from_model(sortition, current_participatory_space: current_participatory_space)
67
+ @form = destroy_sortition_form.from_model(sortition, current_participatory_space:)
68
68
  end
69
69
 
70
70
  def destroy
71
- enforce_permission_to :destroy, :sortition, sortition: sortition
71
+ enforce_permission_to(:destroy, :sortition, sortition:)
72
72
 
73
- @form = destroy_sortition_form.from_params(params, current_participatory_space: current_participatory_space)
73
+ @form = destroy_sortition_form.from_params(params, current_participatory_space:)
74
74
  DestroySortition.call(@form) do
75
75
  on(:ok) do |_sortition|
76
76
  flash[:notice] = I18n.t("sortitions.destroy.success", scope: "decidim.sortitions.admin")
@@ -4,7 +4,6 @@ module Decidim
4
4
  module Sortitions
5
5
  # Exposes the sortition resource so users can view them
6
6
  class SortitionsController < Decidim::Sortitions::ApplicationController
7
- helper Decidim::WidgetUrlsHelper
8
7
  include FilterResource
9
8
  include Decidim::Sortitions::Orderable
10
9
  include Paginable
@@ -5,6 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  module SortitionsHelper
7
7
  include Decidim::TranslationsHelper
8
+ include Decidim::PaginateHelper
8
9
 
9
10
  # Converst a list of components into a list of selectable options
10
11
  def components_options(components)
@@ -10,6 +10,10 @@ module Decidim
10
10
  EngineRouter.main_proxy(proposal.component).proposal_path(proposal)
11
11
  end
12
12
 
13
+ def component_name
14
+ (defined?(current_component) && translated_attribute(current_component&.name).presence) || t("decidim.components.sortitions.name")
15
+ end
16
+
13
17
  # Generates the sortition category label
14
18
  def sortition_category_label(sortition)
15
19
  if sortition.category.present?
@@ -32,7 +36,27 @@ module Decidim
32
36
  end
33
37
  end
34
38
 
35
- result.join(", ").html_safe
39
+ result.join(" - ").html_safe
40
+ end
41
+
42
+ def filter_sections_sortitions
43
+ sections = [{ method: :with_any_state, collection: filter_state_values, label_scope: "decidim.sortitions.sortitions.filters", id: "state" }]
44
+ if current_participatory_space.categories.any?
45
+ sections.append(
46
+ method: :with_category,
47
+ collection: filter_categories_values,
48
+ label_scope: "decidim.sortitions.sortitions.filters", id: "category"
49
+ )
50
+ end
51
+ sections.reject { |item| item[:collection].blank? }
52
+ end
53
+
54
+ def filter_state_values
55
+ [
56
+ ["all", t("all", scope: "decidim.sortitions.sortitions.filters")],
57
+ ["active", t("active", scope: "decidim.sortitions.sortitions.filters")],
58
+ ["cancelled", t("cancelled", scope: "decidim.sortitions.sortitions.filters")]
59
+ ]
36
60
  end
37
61
  end
38
62
  end
@@ -41,10 +41,10 @@ module Decidim
41
41
  end
42
42
 
43
43
  def similar_count
44
- Sortition.where(component: component)
45
- .where(decidim_proposals_component: decidim_proposals_component)
44
+ Sortition.where(component:)
45
+ .where(decidim_proposals_component:)
46
46
  .with_category(category&.id)
47
- .where(target_items: target_items)
47
+ .where(target_items:)
48
48
  .count
49
49
  end
50
50
 
@@ -1,2 +1,5 @@
1
1
  // Images
2
2
  require.context("../images", true)
3
+
4
+ // CSS
5
+ import "stylesheets/sortitions.scss"
@@ -0,0 +1,31 @@
1
+ .sortition {
2
+ &__aside-element {
3
+ &-item {
4
+ @apply border-b border-gray-3 py-4 first:pt-0 last:pb-0 last:border-b-0;
5
+ }
6
+
7
+ &-item__title {
8
+ @apply text-sm block text-gray-2 mb-1;
9
+ }
10
+
11
+ &-item__text {
12
+ @apply text-md block font-semibold text-gray-2;
13
+ }
14
+
15
+ &-item__numbers {
16
+ @apply text-md block text-gray-2;
17
+ }
18
+ }
19
+
20
+ &__aside__count-number {
21
+ @apply text-5xl block text-center text-gray-2 font-bold;
22
+ }
23
+
24
+ &__aside__count-text {
25
+ @apply text-gray-2 text-sm block text-center;
26
+ }
27
+ }
28
+
29
+ a.sortition__aside-element-item__title {
30
+ @apply text-secondary underline;
31
+ }
@@ -4,26 +4,12 @@ module Decidim
4
4
  module Sortitions
5
5
  class Permissions < Decidim::DefaultPermissions
6
6
  def permissions
7
- allow_embed_sortition?
8
7
  return permission_action unless user
9
8
 
10
9
  return Decidim::Sortitions::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin
11
10
 
12
11
  permission_action
13
12
  end
14
-
15
- private
16
-
17
- def sortition
18
- @sortition ||= context.fetch(:sortition, nil) || context.fetch(:resource, nil)
19
- end
20
-
21
- # As this is a public action, we need to run this before other checks
22
- def allow_embed_sortition?
23
- return unless permission_action.action == :embed && permission_action.subject == :sortition && sortition
24
-
25
- allow!
26
- end
27
13
  end
28
14
  end
29
15
  end
@@ -6,8 +6,8 @@ module Decidim
6
6
  # This class holds the logic to present a `Decidim::Sortitions::Sortition`
7
7
  # for the `AdminLog` log.
8
8
  #
9
- # Usage should be automatic and you shouldn't need to call this class
10
- # directly, but here's an example:
9
+ # Usage should be automatic and you should not need to call this class
10
+ # directly, but here is an example:
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
@@ -20,7 +20,7 @@ module Decidim
20
20
 
21
21
  def query
22
22
  Component
23
- .where(participatory_space: participatory_space, manifest_name: "proposals")
23
+ .where(participatory_space:, manifest_name: "proposals")
24
24
  .published
25
25
  end
26
26
  end
@@ -1,40 +1,38 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= t ".title" %></h2>
4
- </div>
5
-
6
- <div class="card-section">
7
- <div class="row">
8
- <div class="columns xlarge-12">
9
- <%= form.translated :text_field, :title, autofocus: true %>
10
- </div>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="row">
5
+ <div class="columns">
6
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
7
+ </div>
11
8
 
12
- <div class="columns xlarge-4">
13
- <%= form.select :decidim_proposals_component_id,
14
- components_options(proposal_components),
15
- prompt: t(".select_proposal_component") %>
16
- </div>
9
+ <div class="columns">
10
+ <%= form.select :decidim_proposals_component_id,
11
+ components_options(proposal_components),
12
+ prompt: t(".select_proposal_component") %>
13
+ </div>
17
14
 
18
- <div class="columns xlarge-4">
19
- <%= form.categories_select :decidim_category_id,
20
- @form.categories,
21
- include_blank: t(".all_categories") %>
22
- </div>
15
+ <div class="columns">
16
+ <%= form.categories_select :decidim_category_id,
17
+ @form.categories,
18
+ include_blank: t(".all_categories") %>
19
+ </div>
23
20
 
24
- <div class="columns xlarge-4">
25
- <%= form.number_field :target_items, min: 1, step: 1 %>
26
- </div>
21
+ <div class="columns">
22
+ <%= form.number_field :target_items, min: 1, step: 1 %>
23
+ </div>
27
24
 
28
- <div class="columns xlarge-12">
29
- <%= form.translated :editor, :witnesses, lines: 10, toolbar: :content %>
30
- </div>
25
+ <div class="columns">
26
+ <%= form.translated :editor, :witnesses, lines: 10, toolbar: :content, aria: { label: :witnesses } %>
27
+ </div>
31
28
 
32
- <div class="columns xlarge-12">
33
- <%= form.translated :editor, :additional_info, lines: 10 %>
34
- </div>
29
+ <div class="columns">
30
+ <%= form.translated :editor, :additional_info, lines: 10, aria: { label: :additional_info } %>
31
+ </div>
35
32
 
36
- <div class="columns xlarge-2">
37
- <%= form.number_field :dice, min: 1, max: 6, step: 1 %>
33
+ <div class="columns">
34
+ <%= form.number_field :dice, min: 1, max: 6, step: 1 %>
35
+ </div>
38
36
  </div>
39
37
  </div>
40
38
  </div>
@@ -1,22 +1,31 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
- <h2 class="process-title-summary"><%= t ".title" %></h2>
3
2
 
4
- <%= decidim_form_for(@form, html: { class: "form confirm_destroy_sortition" }, method: :delete) do |form| %>
5
- <div class="card">
6
- <div class="card-divider">
7
- <h2 class="card-title"><%= decidim_html_escape(translated_attribute(sortition.title)) %></h2>
8
- </div>
3
+ <div class="item_show__header">
4
+ <h2 class="item_show__header-title">
5
+ <%= t(".title") %>
6
+ </h2>
7
+ </div>
9
8
 
10
- <div class="card-section">
11
- <div class="row">
12
- <div class="columns xlarge-12">
13
- <%= form.translated :editor, :cancel_reason, lines: 10, toolbar: :content %>
9
+ <div class="item__edit item__edit-1col">
10
+ <div class="item__edit-form">
11
+ <%= decidim_form_for(@form, html: { class: "form form-defaults confirm_destroy_sortition" }, method: :delete) do |form| %>
12
+ <div class="form__wrapper">
13
+ <div class="card pt-4">
14
+ <div class="card-section">
15
+ <div class="row">
16
+ <div class="columns">
17
+ <%= form.translated :editor, :cancel_reason, lines: 10, toolbar: :content, aria: { label: :cancel_reason } %>
18
+ </div>
19
+ </div>
20
+ </div>
14
21
  </div>
15
22
  </div>
16
- </div>
17
- </div>
18
23
 
19
- <div class="button--double form-general-submit">
20
- <%= form.submit t(".destroy"), data: { confirm: t(".confirm_destroy") } %>
24
+ <div class="item__edit-sticky">
25
+ <div class="item__edit-sticky-container">
26
+ <%= form.submit t(".destroy"), data: { confirm: t(".confirm_destroy") }, class: "button button__sm button__secondary" %>
27
+ </div>
28
+ </div>
29
+ <% end %>
21
30
  </div>
22
- <% end %>
31
+ </div>
@@ -1,28 +1,32 @@
1
1
  <% add_decidim_page_title(translated_attribute(sortition.title)) %>
2
- <h2 class="process-title-summary">
3
- <%= decidim_html_escape(translated_attribute(sortition.title)) %>
4
- </h2>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t ".title" %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, html: { class: "form-defaults form edit_sortition" }) do |form| %>
10
+ <div class="form__wrapper">
11
+ <div class="card pt-4">
12
+ <div class="card-section">
13
+ <div class="row">
14
+ <div class="columns">
15
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
16
+ </div>
5
17
 
6
- <%= decidim_form_for(@form, html: { class: "form edit_sortition" }) do |form| %>
7
- <div class="card">
8
- <div class="card-divider">
9
- <h2 class="card-title"><%= t ".title" %></h2>
10
- </div>
11
-
12
- <div class="card-section">
13
- <div class="row">
14
- <div class="columns xlarge-12">
15
- <%= form.translated :text_field, :title, autofocus: true %>
18
+ <div class="columns">
19
+ <%= form.translated :editor, :additional_info, lines: 10, aria: { label: :additional_info } %>
20
+ </div>
21
+ </div>
22
+ </div>
16
23
  </div>
17
-
18
- <div class="columns xlarge-12">
19
- <%= form.translated :editor, :additional_info, lines: 10 %>
24
+ <div class="item__edit-sticky">
25
+ <div class="item__edit-sticky-container">
26
+ <%= form.submit t(".update"), class: "button button__sm button__secondary" %>
27
+ </div>
20
28
  </div>
21
29
  </div>
22
- </div>
23
- </div>
24
-
25
- <div class="button--double form-general-submit">
26
- <%= form.submit t(".update") %>
30
+ <% end %>
27
31
  </div>
28
- <% end %>
32
+ </div>