decidim-sortitions 0.27.10 → 0.28.0.rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/sortitions/sortition_cell.rb +1 -1
- data/app/cells/decidim/sortitions/sortition_l_cell.rb +26 -0
- data/app/cells/decidim/sortitions/sortition_metadata_cell.rb +66 -0
- data/app/commands/decidim/sortitions/admin/create_sortition.rb +2 -2
- data/app/commands/decidim/sortitions/admin/destroy_sortition.rb +1 -1
- data/app/commands/decidim/sortitions/admin/update_sortition.rb +1 -1
- data/app/controllers/decidim/sortitions/admin/sortitions_controller.rb +11 -11
- data/app/controllers/decidim/sortitions/sortitions_controller.rb +0 -1
- data/app/helpers/decidim/sortitions/admin/sortitions_helper.rb +1 -0
- data/app/helpers/decidim/sortitions/sortitions_helper.rb +25 -1
- data/app/models/decidim/sortitions/sortition.rb +3 -3
- data/app/packs/entrypoints/decidim_sortitions.js +3 -0
- data/app/packs/stylesheets/sortitions.scss +31 -0
- data/app/permissions/decidim/sortitions/permissions.rb +0 -14
- data/app/presenters/decidim/sortitions/admin_log/sortition_presenter.rb +2 -2
- data/app/queries/decidim/sortitions/admin/participatory_space_proposal_components.rb +1 -1
- data/app/views/decidim/sortitions/admin/sortitions/_form.html.erb +29 -31
- data/app/views/decidim/sortitions/admin/sortitions/confirm_destroy.html.erb +24 -15
- data/app/views/decidim/sortitions/admin/sortitions/edit.html.erb +26 -22
- data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +47 -54
- data/app/views/decidim/sortitions/admin/sortitions/new.html.erb +16 -10
- data/app/views/decidim/sortitions/admin/sortitions/show.html.erb +42 -46
- data/app/views/decidim/sortitions/sortitions/_proposal.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/_results_count.html.erb +3 -3
- data/app/views/decidim/sortitions/sortitions/_sortitions.html.erb +10 -11
- data/app/views/decidim/sortitions/sortitions/_tags.html.erb +0 -1
- data/app/views/decidim/sortitions/sortitions/index.html.erb +14 -17
- data/app/views/decidim/sortitions/sortitions/index.js.erb +0 -5
- data/app/views/decidim/sortitions/sortitions/show.html.erb +123 -118
- data/config/locales/ar.yml +2 -24
- data/config/locales/bg.yml +1 -144
- data/config/locales/ca.yml +10 -21
- data/config/locales/cs.yml +7 -22
- data/config/locales/de.yml +10 -21
- data/config/locales/el.yml +6 -19
- data/config/locales/en.yml +14 -25
- data/config/locales/es-MX.yml +9 -20
- data/config/locales/es-PY.yml +9 -20
- data/config/locales/es.yml +9 -20
- data/config/locales/eu.yml +25 -32
- data/config/locales/fi-plain.yml +7 -20
- data/config/locales/fi.yml +27 -40
- data/config/locales/fr-CA.yml +7 -20
- data/config/locales/fr.yml +10 -21
- data/config/locales/ga-IE.yml +0 -6
- data/config/locales/gl.yml +2 -22
- data/config/locales/hu.yml +2 -22
- data/config/locales/id-ID.yml +2 -19
- data/config/locales/is-IS.yml +2 -16
- data/config/locales/it.yml +2 -21
- data/config/locales/ja.yml +7 -19
- data/config/locales/lt.yml +6 -22
- data/config/locales/lv.yml +2 -22
- data/config/locales/nl.yml +2 -21
- data/config/locales/no.yml +2 -21
- data/config/locales/pl.yml +2 -28
- data/config/locales/pt-BR.yml +3 -25
- data/config/locales/pt.yml +2 -21
- data/config/locales/ro-RO.yml +5 -21
- data/config/locales/ru.yml +2 -22
- data/config/locales/sk.yml +2 -23
- data/config/locales/sr-CS.yml +0 -6
- data/config/locales/sv.yml +7 -26
- data/config/locales/tr-TR.yml +3 -21
- data/config/locales/uk.yml +2 -22
- data/config/locales/zh-CN.yml +2 -20
- data/config/locales/zh-TW.yml +5 -18
- data/lib/decidim/sortitions/component.rb +5 -7
- data/lib/decidim/sortitions/engine.rb +8 -3
- data/lib/decidim/sortitions/seeds.rb +24 -0
- data/lib/decidim/sortitions/test/factories.rb +11 -16
- data/lib/decidim/sortitions/version.rb +1 -1
- metadata +28 -31
- data/app/cells/decidim/sortitions/sortition_m/data.erb +0 -15
- data/app/cells/decidim/sortitions/sortition_m/footer.erb +0 -13
- data/app/cells/decidim/sortitions/sortition_m_cell.rb +0 -55
- data/app/controllers/decidim/sortitions/widgets_controller.rb +0 -30
- data/app/packs/stylesheets/decidim/sortitions/_sortitions.scss +0 -49
- data/app/views/decidim/sortitions/sortition_widgets/show.html.erb +0 -4
- data/app/views/decidim/sortitions/sortitions/_filters.html.erb +0 -39
- data/app/views/decidim/sortitions/sortitions/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/sortitions/sortitions/_sortitions_count.html.erb +0 -1
- data/config/locales/he-IL.yml +0 -1
- data/decidim-sortitions.gemspec +0 -32
- data/lib/tasks/decidim/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5be4a8d72565a12df3e2fd05734597bbe71a1e14a5a056b088ba2d5e09c1c95
|
4
|
+
data.tar.gz: 741c81d9b1718a83b5b9e783b05d3368597bfd1613b8613e9473792f8a6e5438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87c3ca33a587afca502d04d11bf55f301d002c05dcf234198a7b5b9941bbeb40a35838af4c482b70a18d4466221a73bc82a378bfbe90c40b1ba0f36b82ed753f
|
7
|
+
data.tar.gz: '098d446e98c7334bb8ee053d8e35a0f2a852de313cd2f94d8160a6bca2e2fa60053e9e2af79f286c9b9bcf64dc2afee7a39fcd655cb0ff9c58fc2c4638a9b099'
|
@@ -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
|
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:
|
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
|
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
|
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:
|
15
|
+
enforce_permission_to :read, :sortition, sortition:
|
16
16
|
end
|
17
17
|
|
18
18
|
def edit
|
19
|
-
enforce_permission_to
|
19
|
+
enforce_permission_to(:update, :sortition, sortition:)
|
20
20
|
|
21
|
-
@form = edit_sortition_form.from_model(sortition, 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
|
25
|
+
enforce_permission_to(:update, :sortition, sortition:)
|
26
26
|
|
27
|
-
@form = edit_sortition_form.from_params(params, 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:
|
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:
|
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
|
65
|
+
enforce_permission_to(:destroy, :sortition, sortition:)
|
66
66
|
|
67
|
-
@form = destroy_sortition_form.from_model(sortition, 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
|
71
|
+
enforce_permission_to(:destroy, :sortition, sortition:)
|
72
72
|
|
73
|
-
@form = destroy_sortition_form.from_params(params, 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
|
@@ -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("
|
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:
|
45
|
-
.where(decidim_proposals_component:
|
44
|
+
Sortition.where(component:)
|
45
|
+
.where(decidim_proposals_component:)
|
46
46
|
.with_category(category&.id)
|
47
|
-
.where(target_items:
|
47
|
+
.where(target_items:)
|
48
48
|
.count
|
49
49
|
end
|
50
50
|
|
@@ -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
|
10
|
-
# directly, but here
|
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
|
@@ -1,40 +1,38 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
21
|
+
<div class="columns">
|
22
|
+
<%= form.number_field :target_items, min: 1, step: 1 %>
|
23
|
+
</div>
|
27
24
|
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
<div class="columns">
|
26
|
+
<%= form.translated :editor, :witnesses, lines: 10, toolbar: :content, aria: { label: :witnesses } %>
|
27
|
+
</div>
|
31
28
|
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
<div class="columns">
|
30
|
+
<%= form.translated :editor, :additional_info, lines: 10, aria: { label: :additional_info } %>
|
31
|
+
</div>
|
35
32
|
|
36
|
-
|
37
|
-
|
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
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h2 class="item_show__header-title">
|
5
|
+
<%= t(".title") %>
|
6
|
+
</h2>
|
7
|
+
</div>
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
20
|
-
|
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
|
-
|
31
|
+
</div>
|
@@ -1,28 +1,32 @@
|
|
1
1
|
<% add_decidim_page_title(translated_attribute(sortition.title)) %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
19
|
-
|
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
|
-
|
23
|
-
</div>
|
24
|
-
|
25
|
-
<div class="button--double form-general-submit">
|
26
|
-
<%= form.submit t(".update") %>
|
30
|
+
<% end %>
|
27
31
|
</div>
|
28
|
-
|
32
|
+
</div>
|