decidim-initiatives 0.30.2 → 0.31.0.rc1
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/README.md +46 -9
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form/show.erb +7 -2
- data/app/cells/decidim/initiatives/initiative_g_cell.rb +5 -1
- data/app/commands/decidim/initiatives/admin/publish_initiative.rb +1 -5
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +1 -2
- data/app/commands/decidim/initiatives/create_initiative.rb +0 -1
- data/app/commands/decidim/initiatives/update_initiative.rb +1 -3
- data/app/commands/decidim/initiatives/vote_initiative.rb +1 -11
- data/app/controllers/concerns/decidim/initiatives/has_signature_workflow.rb +36 -0
- data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -12
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +10 -2
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +84 -18
- data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +133 -42
- data/app/controllers/decidim/initiatives/initiative_votes_controller.rb +3 -2
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +21 -2
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +0 -1
- data/app/forms/decidim/initiatives/initiative_form.rb +0 -3
- data/app/helpers/decidim/initiatives/application_helper.rb +2 -0
- data/app/helpers/decidim/initiatives/initiatives_helper.rb +0 -1
- data/app/models/decidim/initiative.rb +7 -31
- data/app/models/decidim/initiatives_committee_member.rb +1 -1
- data/app/models/decidim/initiatives_type.rb +5 -2
- data/app/models/decidim/initiatives_vote.rb +2 -2
- data/app/packs/entrypoints/decidim_initiatives.js +1 -1
- data/app/packs/entrypoints/decidim_initiatives_admin.scss +1 -1
- data/app/packs/src/decidim/initiatives/admin/initiatives_types.js +2 -11
- data/app/packs/src/decidim/initiatives/admin/invite_users.js +1 -1
- data/app/packs/src/decidim/initiatives/application.js +1 -1
- data/app/packs/src/decidim/initiatives/check_code.js +114 -0
- data/app/packs/src/decidim/initiatives/initiative_creation_wizard.js +16 -0
- data/app/packs/src/decidim/initiatives/scoped_type.js +1 -1
- data/app/packs/stylesheets/initiatives.scss +16 -2
- data/app/permissions/decidim/initiatives/admin/permissions.rb +1 -4
- data/app/permissions/decidim/initiatives/permissions.rb +26 -16
- data/app/presenters/decidim/initiative_presenter.rb +12 -6
- data/app/presenters/decidim/initiatives/admin_log/initiative_presenter.rb +1 -2
- data/app/queries/decidim/initiatives/initiatives_stats_followers_count.rb +14 -0
- data/app/queries/decidim/initiatives/initiatives_stats_participants_count.rb +14 -0
- data/app/serializers/decidim/initiatives/open_data_initiative_serializer.rb +0 -1
- data/app/services/decidim/initiatives/data_encryptor.rb +1 -1
- data/app/services/decidim/initiatives/legacy_signature_handler.rb +25 -0
- data/app/services/decidim/initiatives/progress_notifier.rb +1 -7
- data/app/services/decidim/initiatives/signature_handler.rb +248 -0
- data/app/services/decidim/initiatives/status_change_notifier.rb +1 -7
- data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +29 -11
- data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +17 -20
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +7 -13
- data/app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb +2 -2
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +76 -47
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +13 -21
- data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +28 -12
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +33 -15
- data/app/views/decidim/initiatives/create_initiative/_committee_member.html.erb +27 -0
- data/app/views/decidim/initiatives/create_initiative/_return_to_initiatives_button.html.erb +3 -0
- data/app/views/decidim/initiatives/create_initiative/_send_to_technical_validation_button.html.erb +10 -0
- data/app/views/decidim/initiatives/create_initiative/_share_committee_link.html.erb +5 -1
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +7 -11
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +16 -13
- data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +33 -6
- data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +40 -26
- data/app/views/decidim/initiatives/initiative_signatures/_sms_code_form.html.erb +22 -0
- data/app/views/decidim/initiatives/initiative_signatures/_sms_phone_number_form.html.erb +13 -0
- data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +23 -22
- data/app/views/decidim/initiatives/initiative_signatures/finish.html.erb +17 -5
- data/app/views/decidim/initiatives/initiative_signatures/sms_code.html.erb +6 -8
- data/app/views/decidim/initiatives/initiative_signatures/sms_phone_number.html.erb +3 -8
- data/app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb +3 -14
- data/app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb +3 -14
- data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +1 -3
- data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +10 -3
- data/app/views/decidim/initiatives/initiatives/_pending_initiatives.html.erb +5 -0
- data/app/views/decidim/initiatives/initiatives/index.html.erb +8 -0
- data/app/views/decidim/initiatives/initiatives/show.html.erb +2 -2
- data/app/views/layouts/decidim/_initiative_signature_creation_header.html.erb +20 -2
- data/app/views/layouts/decidim/admin/_manage_initiatives.html.erb +1 -1
- data/app/views/layouts/decidim/initiative_signature_creation.html.erb +3 -1
- data/config/assets.rb +2 -2
- data/config/locales/ar.yml +0 -45
- data/config/locales/bg.yml +0 -54
- data/config/locales/ca-IT.yml +99 -51
- data/config/locales/ca.yml +99 -51
- data/config/locales/cs.yml +93 -54
- data/config/locales/de.yml +99 -51
- data/config/locales/el.yml +0 -45
- data/config/locales/en.yml +99 -51
- data/config/locales/es-MX.yml +99 -51
- data/config/locales/es-PY.yml +99 -51
- data/config/locales/es.yml +99 -51
- data/config/locales/eu.yml +99 -51
- data/config/locales/fi-plain.yml +99 -51
- data/config/locales/fi.yml +99 -51
- data/config/locales/fr-CA.yml +44 -51
- data/config/locales/fr.yml +44 -51
- data/config/locales/ga-IE.yml +0 -17
- data/config/locales/gl.yml +0 -41
- data/config/locales/hu.yml +0 -54
- data/config/locales/id-ID.yml +0 -40
- data/config/locales/is-IS.yml +0 -22
- data/config/locales/it.yml +0 -53
- data/config/locales/ja.yml +98 -49
- data/config/locales/lb.yml +0 -50
- data/config/locales/lt.yml +0 -56
- data/config/locales/lv.yml +0 -46
- data/config/locales/nl.yml +0 -47
- data/config/locales/no.yml +0 -53
- data/config/locales/pl.yml +0 -56
- data/config/locales/pt-BR.yml +0 -53
- data/config/locales/pt.yml +0 -53
- data/config/locales/ro-RO.yml +92 -50
- data/config/locales/ru.yml +0 -25
- data/config/locales/sk.yml +0 -43
- data/config/locales/sl.yml +0 -1
- data/config/locales/sv.yml +10 -53
- data/config/locales/tr-TR.yml +0 -53
- data/config/locales/uk.yml +0 -25
- data/config/locales/zh-CN.yml +0 -45
- data/config/locales/zh-TW.yml +0 -53
- data/db/migrate/20250605104500_remove_hashtag_column_initiatives.rb +7 -0
- data/lib/decidim/api/initiative_api_type.rb +3 -0
- data/lib/decidim/api/initiative_type.rb +23 -4
- data/lib/decidim/exporters/initiative_votes_pdf.rb +1 -1
- data/lib/decidim/initiatives/default_signature_authorizer.rb +17 -0
- data/lib/decidim/initiatives/engine.rb +17 -14
- data/lib/decidim/initiatives/participatory_space.rb +15 -1
- data/lib/decidim/initiatives/seeds.rb +1 -2
- data/lib/decidim/initiatives/signature_workflow_manifest.rb +176 -0
- data/lib/decidim/initiatives/signatures.rb +12 -0
- data/lib/decidim/initiatives/test/factories.rb +7 -7
- data/lib/decidim/initiatives/test/initiatives_signatures_test_helpers.rb +19 -0
- data/lib/decidim/initiatives/validatable_authorizations.rb +83 -0
- data/lib/decidim/initiatives/version.rb +1 -1
- data/lib/decidim/initiatives.rb +23 -12
- metadata +33 -21
- data/app/events/decidim/initiatives/endorse_initiative_event.rb +0 -13
- data/app/forms/decidim/initiatives/vote_form.rb +0 -208
- data/app/packs/src/decidim/initiatives/identity_selector_dialog.js +0 -14
- data/app/services/decidim/initiatives/pdf_signature_example.rb +0 -110
- data/app/views/decidim/initiatives/initiative_signatures/_wizard_steps.html.erb +0 -15
- data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +0 -10
- data/app/views/layouts/decidim/_initiative_header.html.erb +0 -27
@@ -21,7 +21,7 @@ module Decidim
|
|
21
21
|
# * published, discarded: Initiative authors will be notified about the
|
22
22
|
# result of the technical validation process.
|
23
23
|
#
|
24
|
-
# * rejected, accepted: Initiative
|
24
|
+
# * rejected, accepted: Initiative authors and committee members will be
|
25
25
|
# notified about the result of the initiative.
|
26
26
|
def notify
|
27
27
|
notify_initiative_creation if initiative.created?
|
@@ -58,12 +58,6 @@ module Decidim
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def notify_support_result
|
61
|
-
initiative.followers.each do |follower|
|
62
|
-
Decidim::Initiatives::InitiativesMailer
|
63
|
-
.notify_state_change(initiative, follower)
|
64
|
-
.deliver_later
|
65
|
-
end
|
66
|
-
|
67
61
|
initiative.committee_members.approved.each do |committee_member|
|
68
62
|
Decidim::Initiatives::InitiativesMailer
|
69
63
|
.notify_state_change(initiative, committee_member.user)
|
@@ -20,12 +20,12 @@
|
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<div class="table-
|
23
|
+
<div class="table-stacked mt-4">
|
24
24
|
<table class="table-list">
|
25
25
|
<thead>
|
26
26
|
<tr>
|
27
27
|
<th><%= t "user", scope: "activemodel.attributes.initiatives_committee_member" %></th>
|
28
|
-
<th
|
28
|
+
<th><%= t "actions", scope: "decidim.admin.models.initiatives_committee_member.fields" %></th>
|
29
29
|
</tr>
|
30
30
|
</thead>
|
31
31
|
<tbody>
|
@@ -38,17 +38,35 @@
|
|
38
38
|
|
39
39
|
<% current_initiative.committee_members.each do |request| %>
|
40
40
|
<tr data-id="<%= request.id %>">
|
41
|
-
<td>
|
41
|
+
<td data-label="<%= t "user", scope: "activemodel.attributes.initiatives_committee_member" %>">
|
42
42
|
<%= link_to request.user.name, "mailto:#{request.user.email}" %>
|
43
43
|
</td>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
|
45
|
+
<td class="table-list__actions" data-label="<%= t "actions", scope: "decidim.admin.models.initiatives_committee_member.fields" %>">
|
46
|
+
<button type="button" data-controller="dropdown" data-target="actions-initiative-committee-request-<%= request.id %>" aria-label="<%= t("decidim.admin.actions.actions_label", resource: request.user.name) %>">
|
47
|
+
<%= icon "more-fill", class: "text-secondary" %>
|
48
|
+
</button>
|
49
|
+
|
50
|
+
<div class="inline-block relative">
|
51
|
+
<ul id="actions-initiative-committee-request-<%= request.id %>" class="dropdown dropdown__action" aria-hidden="true">
|
52
|
+
<% if allowed_to? :approve, :initiative_committee_member, request: request %>
|
53
|
+
<li class="dropdown__item">
|
54
|
+
<%= link_to approve_initiative_committee_request_path(current_initiative, request), class: "dropdown__button" do %> <%= icon "check-line" %>
|
55
|
+
<%= t(".approve") %>
|
56
|
+
<% end %>
|
57
|
+
</li>
|
58
|
+
<% end %>
|
59
|
+
|
60
|
+
<% if allowed_to? :revoke, :initiative_committee_member, request: request %>
|
61
|
+
<li class="dropdown__item">
|
62
|
+
<%= link_to revoke_initiative_committee_request_path(current_initiative, request), method: :delete, data: { confirm: t(".confirm_revoke") }, class: "dropdown__button" do %>
|
63
|
+
<%= icon "delete-bin-line" %>
|
64
|
+
<%= t(".revoke") %>
|
65
|
+
<% end %>
|
66
|
+
</li>
|
67
|
+
<% end %>
|
68
|
+
</ul>
|
69
|
+
</div>
|
52
70
|
</td>
|
53
71
|
</tr>
|
54
72
|
<% end %>
|
@@ -1,25 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
data-auto-focus="true"
|
15
|
-
data-close-on-click="true">
|
16
|
-
<ul class="vertical menu add-components">
|
1
|
+
<% menu_id = "top-#{SecureRandom.uuid}" %>
|
2
|
+
<div class="relative">
|
3
|
+
<button class="button button__sm button__transparent-secondary" data-controller="dropdown" data-target="dropdown-exports-<%= menu_id %>-<%= dropdown_id(collection_ids) %>">
|
4
|
+
<% if collection_ids.present? %>
|
5
|
+
<%= t("actions.export-selection", scope: "decidim.admin") %>
|
6
|
+
<% else %>
|
7
|
+
<%= t("actions.export", scope: "decidim.admin") %>
|
8
|
+
<% end %>
|
9
|
+
<%= icon "arrow-down-s-line" %>
|
10
|
+
<%= icon "arrow-down-s-line" %>
|
11
|
+
</button>
|
12
|
+
|
13
|
+
<ul id="dropdown-exports-<%= menu_id %>-<%= dropdown_id(collection_ids) %>" class="dropdown dropdown__bottom" aria-hidden="true">
|
17
14
|
<% %w(CSV JSON).each do |format| %>
|
18
|
-
|
19
|
-
|
15
|
+
<li class="dropdown__item">
|
16
|
+
<%= link_to export_initiatives_path(format:, collection_ids:), class: "dropdown__button" do %>
|
20
17
|
<%= t("decidim.admin.exports.export_as", name: t("decidim.initiatives.admin.exports.initiatives"), export_format: format.upcase) %>
|
21
|
-
|
22
|
-
|
18
|
+
<% end %>
|
19
|
+
</li>
|
23
20
|
<% end %>
|
24
21
|
</ul>
|
25
22
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="form__wrapper">
|
2
|
-
<div class="card" data-
|
2
|
+
<div class="card" data-controller="accordion" id="accordion-title">
|
3
3
|
<div class="card-divider">
|
4
4
|
<button class="card-divider-button" data-open="true" data-controls="panel-title" type="button">
|
5
5
|
<%= icon "arrow-right-s-line" %>
|
@@ -17,16 +17,10 @@
|
|
17
17
|
<div class="row column">
|
18
18
|
<%= form.translated :editor, :description, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), aria: { label: :description } %>
|
19
19
|
</div>
|
20
|
-
|
21
|
-
<div class="row column">
|
22
|
-
<div class="columns">
|
23
|
-
<%= form.text_field :hashtag, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
20
|
</div>
|
27
21
|
</div>
|
28
22
|
|
29
|
-
<div class="card" data-
|
23
|
+
<div class="card" data-controller="accordion" id="accordion-settings">
|
30
24
|
<div class="card-divider">
|
31
25
|
<button class="card-divider-button" data-open="true" data-controls="panel-settings" type="button">
|
32
26
|
<%= icon "arrow-right-s-line" %>
|
@@ -116,17 +110,17 @@
|
|
116
110
|
<% end %>
|
117
111
|
</div>
|
118
112
|
</div>
|
119
|
-
<div class="card" data-
|
113
|
+
<div class="card" data-controller="accordion" id="accordion-homepage_attachments">
|
120
114
|
<div class="card-divider">
|
121
|
-
<button class="card-divider-button" data-open="true" data-controls="panel-
|
115
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-homepage_attachments" type="button">
|
122
116
|
<%= icon "arrow-right-s-line" %>
|
123
|
-
<h2 class="card-title" id="
|
124
|
-
<%= t("
|
117
|
+
<h2 class="card-title" id="homepage_attachments">
|
118
|
+
<%= t(".attachments_title") %>
|
125
119
|
</h2>
|
126
120
|
</button>
|
127
121
|
</div>
|
128
122
|
|
129
|
-
<div id="panel-
|
123
|
+
<div id="panel-homepage_attachments" class="card-section">
|
130
124
|
<div class="row">
|
131
125
|
<% if allowed_to?(:read, :attachment, initiative: current_participatory_space) %>
|
132
126
|
<%= render partial: "initiative_attachments", locals: { current_initiative:, current_participatory_space: } %>
|
@@ -31,10 +31,10 @@
|
|
31
31
|
<% if allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
32
32
|
<%= aria_selected_link_to t(".edit"),
|
33
33
|
decidim_admin_initiatives.initiative_attachments_path(current_participatory_space),
|
34
|
-
class: "button button__sm
|
34
|
+
class: "button button__sm button__transparent-secondary" %>
|
35
35
|
<%= aria_selected_link_to t(".new"),
|
36
36
|
decidim_admin_initiatives.new_initiative_attachment_path(current_participatory_space),
|
37
|
-
class: "button button__sm
|
37
|
+
class: "button button__sm button__transparent-secondary" %>
|
38
38
|
<% else %>
|
39
39
|
<%= link_to t(".edit"), "#", class: "button button__sm button__secondary muted disabled" %>
|
40
40
|
<%= link_to t(".new"), "#", class: "button button__sm button__secondary muted disabled" %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<% link = link_to(t("button", scope:"decidim.initiatives.admin.index.initiatives_types"), new_initiatives_type_path, class: "button button__sm button__secondary mt-4") %>
|
16
16
|
<%= cell("decidim/announcement", t("alert_html", scope:"decidim.initiatives.admin.index.initiatives_types", link:), callout_class: "alert") %>
|
17
17
|
<% else %>
|
18
|
-
<div class="table-
|
18
|
+
<div class="table-stacked">
|
19
19
|
<table class="table-list">
|
20
20
|
<thead>
|
21
21
|
<tr>
|
@@ -31,8 +31,8 @@
|
|
31
31
|
<tbody>
|
32
32
|
<% @initiatives.each do |initiative| %>
|
33
33
|
<tr>
|
34
|
-
<td><%= initiative.id %></td>
|
35
|
-
<td class="!text-left">
|
34
|
+
<td data-label="<%= t("models.initiatives.fields.id", scope: "decidim.admin") %>"><%= initiative.id %></td>
|
35
|
+
<td class="!text-left" data-label="<%= t("models.initiatives.fields.title", scope: "decidim.admin") %>">
|
36
36
|
<% if allowed_to? :edit, :initiative, initiative: initiative %>
|
37
37
|
<%= link_to translated_attribute(initiative.title),
|
38
38
|
decidim_admin_initiatives.edit_initiative_path(initiative.to_param) %>
|
@@ -40,56 +40,85 @@
|
|
40
40
|
<%= translated_attribute(initiative.title) %>
|
41
41
|
<% end %>
|
42
42
|
</td>
|
43
|
-
<td><%= humanize_admin_state initiative.state %></td>
|
44
|
-
<td><%= initiative.supports_count %>/<%= initiative.scoped_type.supports_required %></td>
|
45
|
-
<td class="table-list__date"><%= l initiative.created_at, format: :short %></td>
|
46
|
-
<td class="table-list__date"><%= initiative.published_at? ? l(initiative.published_at, format: :short) : "" %></td>
|
47
|
-
<td class="table-list__actions">
|
43
|
+
<td data-label="<%= t("models.initiatives.fields.state", scope: "decidim.admin") %>"><%= humanize_admin_state initiative.state %></td>
|
44
|
+
<td data-label="<%= t("models.initiatives.fields.supports_count", scope: "decidim.admin") %>"><%= initiative.supports_count %>/<%= initiative.scoped_type.supports_required %></td>
|
45
|
+
<td class="table-list__date" data-label="<%= t("models.initiatives.fields.created_at", scope: "decidim.admin") %>"><%= l initiative.created_at, format: :short %></td>
|
46
|
+
<td class="table-list__date" data-label="<%= t("models.initiatives.fields.published_at", scope: "decidim.admin") %>"><%= initiative.published_at? ? l(initiative.published_at, format: :short) : "" %></td>
|
47
|
+
<td class="table-list__actions" data-label="<%= t(".actions_title") %>">
|
48
|
+
<button type="button" data-controller="dropdown" data-target="actions-initiative-<%= initiative.id %>" aria-label="<%= t("decidim.admin.actions.actions_label", resource: translated_attribute(initiative.title)) %>">
|
49
|
+
<%= icon "more-fill", class: "text-secondary" %>
|
50
|
+
</button>
|
48
51
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
52
|
+
<div class="inline-block relative">
|
53
|
+
<ul id="actions-initiative-<%= initiative.id %>" class="dropdown dropdown__action" aria-hidden="true">
|
54
|
+
<% if allowed_to? :edit, :initiative, initiative: initiative %>
|
55
|
+
<li class="dropdown__item">
|
56
|
+
<%= link_to decidim_admin_initiatives.edit_initiative_path(initiative.to_param), class: "dropdown__button" do %>
|
57
|
+
<%= icon "pencil-line" %>
|
58
|
+
<%= t("actions.edit", scope: "decidim.admin") %>
|
59
|
+
<% end %>
|
60
|
+
</li>
|
61
|
+
<% end %>
|
54
62
|
|
55
|
-
|
56
|
-
<%= icon_link_to "pencil-line",
|
57
|
-
decidim_admin_initiatives.edit_initiative_path(initiative.to_param),
|
58
|
-
t("actions.configure", scope: "decidim.admin"),
|
59
|
-
class: "action-icon--edit" %>
|
60
|
-
<% else %>
|
61
|
-
<span class="action-space icon"></span>
|
62
|
-
<% end %>
|
63
|
+
<hr>
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
<% if allowed_to?(:answer, :initiative, initiative: initiative) %>
|
66
|
+
<li class="dropdown__item">
|
67
|
+
<%= link_to edit_initiative_answer_path(initiative.slug), class: "dropdown__button" do %>
|
68
|
+
<%= icon "chat-1-line" %>
|
69
|
+
<%= t("actions.answer", scope: "decidim.initiatives") %>
|
70
|
+
<% end %>
|
71
|
+
</li>
|
72
|
+
<% else %>
|
73
|
+
<li class="dropdown__item">
|
74
|
+
<div class="dropdown__button-disabled">
|
75
|
+
<%= with_tooltip(t("actions.cannot_answer", scope: "decidim.admin")) do %>
|
76
|
+
<%= icon "chat-1-line", class: "text-gray" %>
|
77
|
+
<span><%= t("actions.answer", scope: "decidim.initiatives") %></span>
|
78
|
+
<% end %>
|
79
|
+
</div>
|
80
|
+
</li>
|
81
|
+
<% end %>
|
69
82
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
<span class="action-space icon"></span>
|
79
|
-
<% end %>
|
83
|
+
<% if allowed_to? :print, :initiative, initiative: initiative %>
|
84
|
+
<li class="dropdown__item">
|
85
|
+
<%= link_to decidim_initiatives.print_initiative_path(initiative), class: "dropdown__button", target: "_blank", data: { "external-link": false } do %>
|
86
|
+
<%= icon "printer-line" %>
|
87
|
+
<%= t(".print") %>
|
88
|
+
<% end %>
|
89
|
+
</li>
|
90
|
+
<% end %>
|
80
91
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
92
|
+
<hr>
|
93
|
+
|
94
|
+
<% if allowed_to? :preview, :initiative, initiative: initiative %>
|
95
|
+
<li class="dropdown__item">
|
96
|
+
<%= link_to decidim_initiatives.initiative_path(initiative.to_param), class: "dropdown__button", target: "_blank", data: { "external-link": false } do %>
|
97
|
+
<%= icon "eye-line" %>
|
98
|
+
<%= t(".preview") %>
|
99
|
+
<% end %>
|
100
|
+
</li>
|
101
|
+
<% end %>
|
102
|
+
|
103
|
+
<% if allowed_to? :read, :share_token, current_participatory_space: initiative %>
|
104
|
+
<li class="dropdown__item">
|
105
|
+
<%= link_to decidim_admin_initiatives.initiative_share_tokens_path(initiative), class: "dropdown__button" do %>
|
106
|
+
<%= icon "share-line" %>
|
107
|
+
<%= t("actions.share_tokens", scope: "decidim.admin") %>
|
108
|
+
<% end %>
|
109
|
+
</li>
|
110
|
+
|
111
|
+
<hr>
|
112
|
+
<% end %>
|
113
|
+
|
114
|
+
<% if (link = free_resource_permissions_link(initiative)) %>
|
115
|
+
<li class="dropdown__item">
|
116
|
+
<%= link %>
|
117
|
+
</li>
|
118
|
+
<% end %>
|
119
|
+
</ul>
|
120
|
+
</div>
|
91
121
|
|
92
|
-
<%= free_resource_permissions_link(initiative) || content_tag(:span, nil, class: "action-space icon") %>
|
93
122
|
</td>
|
94
123
|
</tr>
|
95
124
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="form__wrapper">
|
2
|
-
<div class="card" data-
|
2
|
+
<div class="card" data-controller="accordion" id="accordion-title">
|
3
3
|
<div class="card-divider">
|
4
4
|
<button class="card-divider-button" data-open="true" data-controls="panel-title" type="button">
|
5
5
|
<%= icon "arrow-right-s-line" %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<div class="card" data-
|
29
|
+
<div class="card" data-controller="accordion" id="accordion-options">
|
30
30
|
<div class="card-divider">
|
31
31
|
<button class="card-divider-button" data-open="true" data-controls="panel-options" type="button">
|
32
32
|
<%= icon "arrow-right-s-line" %>
|
@@ -78,43 +78,35 @@
|
|
78
78
|
<div class="row column">
|
79
79
|
<%= form.check_box :comments_enabled %>
|
80
80
|
</div>
|
81
|
-
|
82
|
-
<div class="row column">
|
83
|
-
<%= form.check_box :collect_user_extra_fields %>
|
84
|
-
</div>
|
85
|
-
|
86
|
-
<div class="row column">
|
87
|
-
<%= form.translated :editor, :extra_fields_legal_information, aria: { label: :extra_fields_legal_information } %>
|
88
|
-
</div>
|
89
81
|
</div>
|
90
82
|
</div>
|
91
83
|
|
92
|
-
<div class="card" data-
|
84
|
+
<div class="card" data-controller="accordion" id="accordion-signature-workflow">
|
93
85
|
<div class="card-divider">
|
94
|
-
<button class="card-divider-button" data-open="true" data-controls="panel-
|
86
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-signature-workflow" type="button">
|
95
87
|
<%= icon "arrow-right-s-line" %>
|
96
|
-
<h2 class="card-title" id="
|
97
|
-
<%= t("initiatives_types.form.
|
88
|
+
<h2 class="card-title" id="signature-workflow">
|
89
|
+
<%= t("initiatives_types.form.signature_workflow_settings", scope: "decidim.initiatives.admin") %>
|
98
90
|
</h2>
|
99
91
|
</button>
|
100
92
|
</div>
|
101
93
|
|
102
|
-
<div id="panel-
|
94
|
+
<div id="panel-signature-workflow" class="card-section">
|
103
95
|
<div class="row column">
|
104
96
|
<%=
|
105
97
|
form.select(
|
106
98
|
:document_number_authorization_handler,
|
107
|
-
|
99
|
+
Decidim::Initiatives::Signatures.workflows.map do |workflow|
|
100
|
+
[t("#{workflow.name}.name", scope: "decidim.initiatives.signatures.workflows"), workflow.name]
|
101
|
+
end,
|
108
102
|
include_blank: true
|
109
103
|
)
|
110
104
|
%>
|
111
105
|
</div>
|
112
106
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
</div>
|
117
|
-
<% end %>
|
107
|
+
<div class="row column">
|
108
|
+
<%= form.translated :editor, :extra_fields_legal_information, aria: { label: :extra_fields_legal_information } %>
|
109
|
+
</div>
|
118
110
|
</div>
|
119
111
|
</div>
|
120
112
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<div class="card" data-
|
1
|
+
<div class="card" data-controller="accordion" id="accordion-initiative_type_scope">
|
2
2
|
<div class="card-divider">
|
3
3
|
<h2 class="card-title gap-2" id="<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>">
|
4
|
-
<button class="card-divider-button" data-open="true" data-controls="panel
|
4
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-initiative_type_scope" type="button">
|
5
5
|
<%= icon "arrow-right-s-line" %>
|
6
6
|
<span>
|
7
7
|
<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>
|
@@ -12,8 +12,8 @@
|
|
12
12
|
class: "button button__sm button__secondary flex-none" if allowed_to? :create, :initiative_type_scope %>
|
13
13
|
</h2>
|
14
14
|
</div>
|
15
|
-
<div id="panel
|
16
|
-
<div class="table-
|
15
|
+
<div id="panel-initiative_type_scope" class="card-section">
|
16
|
+
<div class="table-stacked">
|
17
17
|
<table class="table-list">
|
18
18
|
<thead>
|
19
19
|
<tr>
|
@@ -21,19 +21,35 @@
|
|
21
21
|
<th class="text-right">
|
22
22
|
<%= t("models.initiatives_type_scope.fields.supports_required", scope: "decidim.admin") %>
|
23
23
|
</th>
|
24
|
-
<th
|
24
|
+
<th><%= t("models.initiatives_type_scope.fields.actions", scope: "decidim.admin") %></th>
|
25
25
|
</tr>
|
26
26
|
</thead>
|
27
27
|
<tbody>
|
28
28
|
<% initiative_type.scopes.each do |s| %>
|
29
29
|
<tr>
|
30
|
-
<td
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
30
|
+
<td data-label="<%= t("models.initiatives_type_scope.fields.scope", scope: "decidim.admin") %>">
|
31
|
+
<%= translated_attribute(s.scope_name) %>
|
32
|
+
</td>
|
33
|
+
<td class="text-right" data-label="<%= t("models.initiatives_type_scope.fields.supports_required", scope: "decidim.admin") %>">
|
34
|
+
<%= s.supports_required %>
|
35
|
+
</td>
|
36
|
+
<td class="table-list__actions" data-label="<%= t("models.initiatives_type_scope.fields.actions", scope: "decidim.admin") %>">
|
37
|
+
<% if allowed_to? :edit, :initiative_type_scope, initiative_type_scope: s %>
|
38
|
+
<button type="button" data-controller="dropdown" data-target="actions-initiative-type-scope-<%= s.id %>" aria-label="<%= t("decidim.admin.actions.actions_label", resource: s.scope_name) %>">
|
39
|
+
<%= icon "more-fill", class: "text-secondary" %>
|
40
|
+
</button>
|
41
|
+
|
42
|
+
<div class="inline-block relative">
|
43
|
+
<ul id="actions-initiative-type-scope-<%= s.id %>" class="dropdown dropdown__action" aria-hidden="true">
|
44
|
+
<li class="dropdown__item">
|
45
|
+
<%= link_to decidim_admin_initiatives.edit_initiatives_type_initiatives_type_scope_path(initiative_type, s), class: "dropdown__button" do %>
|
46
|
+
<%= icon "pencil-line" %>
|
47
|
+
<%= t("actions.configure", scope: "decidim.admin") %>
|
48
|
+
<% end %>
|
49
|
+
</li>
|
50
|
+
</ul>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
37
53
|
</td>
|
38
54
|
</tr>
|
39
55
|
<% end %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
class: "button button__sm button__secondary" if allowed_to? :create, :initiative_type %>
|
10
10
|
</h1>
|
11
11
|
</div>
|
12
|
-
<div class="table-
|
12
|
+
<div class="table-stacked">
|
13
13
|
<table class="table-list">
|
14
14
|
<thead>
|
15
15
|
<tr>
|
@@ -21,27 +21,45 @@
|
|
21
21
|
<tbody>
|
22
22
|
<% @initiatives_types.each do |initiative_type| %>
|
23
23
|
<tr>
|
24
|
-
<td>
|
24
|
+
<td data-label="<%= t("models.initiatives_types.fields.title", scope: "decidim.admin") %>">
|
25
25
|
<% if allowed_to? :update, :initiative_type, initiative_type: initiative_type %>
|
26
26
|
<%= link_to translated_attribute(initiative_type.title), edit_initiatives_type_path(initiative_type) %>
|
27
27
|
<% else %>
|
28
28
|
<%= translated_attribute initiative_type.title %></td>
|
29
29
|
<% end %>
|
30
|
-
<td><%= l initiative_type.created_at, format: :short %></td>
|
31
|
-
<td class="table-list__actions">
|
32
|
-
|
33
|
-
<%=
|
34
|
-
|
35
|
-
<span class="action-space icon"></span>
|
36
|
-
<% end %>
|
30
|
+
<td data-label="<%= t("models.initiatives_types.fields.created_at", scope: "decidim.admin") %>"><%= l initiative_type.created_at, format: :short %></td>
|
31
|
+
<td class="table-list__actions" data-label="<%= t("initiatives_type.actions.title", scope: "decidim.resources") %>">
|
32
|
+
<button type="button" data-controller="dropdown" data-target="actions-initiative-type-<%= initiative_type.id %>" aria-label="<%= t("decidim.admin.actions.actions_label", resource: initiative_type.title) %>">
|
33
|
+
<%= icon "more-fill", class: "text-secondary" %>
|
34
|
+
</button>
|
37
35
|
|
38
|
-
|
36
|
+
<div class="inline-block relative">
|
37
|
+
<ul id="actions-initiative-type-<%= initiative_type.id %>" class="dropdown dropdown__action" aria-hidden="true">
|
38
|
+
<% if allowed_to? :update, :initiative_type, initiative_type: initiative_type %>
|
39
|
+
<li class="dropdown__item">
|
40
|
+
<%= link_to edit_initiatives_type_path(initiative_type), class: "dropdown__button" do %>
|
41
|
+
<%= icon "pencil-line" %>
|
42
|
+
<%= t("actions.configure", scope: "decidim.admin") %>
|
43
|
+
<% end %>
|
44
|
+
</li>
|
45
|
+
<% end %>
|
39
46
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
47
|
+
<li class="dropdown__item">
|
48
|
+
<%= free_resource_permissions_link(initiative_type) %>
|
49
|
+
</li>
|
50
|
+
|
51
|
+
<% if allowed_to? :destroy, :initiative_type, initiative_type: initiative_type %>
|
52
|
+
<hr>
|
53
|
+
|
54
|
+
<li class="dropdown__item">
|
55
|
+
<%= link_to initiative_type, method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") }, class: "dropdown__button" do %>
|
56
|
+
<%= icon "delete-bin-line" %>
|
57
|
+
<%= t("actions.destroy", scope: "decidim.admin") %>
|
58
|
+
<% end %>
|
59
|
+
</li>
|
60
|
+
<% end %>
|
61
|
+
</ul>
|
62
|
+
</div>
|
45
63
|
</td>
|
46
64
|
</tr>
|
47
65
|
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="flex items-center justify-between my-1">
|
2
|
+
<%= cell "decidim/author", request.user.presenter, layout: :compact %>
|
3
|
+
|
4
|
+
<div>
|
5
|
+
<% if allowed_to? :approve, :initiative_committee_member, initiative: current_initiative, request: request %>
|
6
|
+
<%= link_to(
|
7
|
+
approve_initiative_committee_request_path(current_initiative, request),
|
8
|
+
data: { confirm: t(".confirm_approve") },
|
9
|
+
class: "button button__xs button__transparent-secondary"
|
10
|
+
) do %>
|
11
|
+
<span><%= t(".approve") %></span>
|
12
|
+
<%= icon "check-line" %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
<% if allowed_to? :revoke, :initiative_committee_member, initiative: current_initiative, request: request %>
|
16
|
+
<%= link_to(
|
17
|
+
revoke_initiative_committee_request_path(current_initiative, request),
|
18
|
+
method: :delete,
|
19
|
+
data: { confirm: t(".confirm_revoke") },
|
20
|
+
class: "button button__xs button__transparent-secondary"
|
21
|
+
) do %>
|
22
|
+
<span><%= t(".revoke") %></span>
|
23
|
+
<%= icon "forbid-line" %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
data/app/views/decidim/initiatives/create_initiative/_send_to_technical_validation_button.html.erb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if current_initiative.enough_committee_members? %>
|
2
|
+
<%= link_to t(".button"),
|
3
|
+
decidim_initiatives.send_to_technical_validation_initiative_path(current_initiative),
|
4
|
+
class: "button button__sm md:button__lg button__secondary",
|
5
|
+
data: { confirm: t(".confirm") } %>
|
6
|
+
<% else %>
|
7
|
+
<%= button_tag t(".button"),
|
8
|
+
class: "button button__sm md:button__lg button__secondary",
|
9
|
+
disabled: true %>
|
10
|
+
<% end %>
|
@@ -2,12 +2,16 @@
|
|
2
2
|
<span class="help-text mb-2">
|
3
3
|
<%= t ".invite_to_committee_help" %>
|
4
4
|
</span>
|
5
|
+
<span class="help-text mb-2">
|
6
|
+
<%= t ".invite_to_committee_help_2", committee_size: current_initiative.minimum_committee_members %>
|
7
|
+
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank" %>
|
8
|
+
</span>
|
5
9
|
<div class="initiative__form__committee">
|
6
10
|
<span>
|
7
11
|
<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>
|
8
12
|
</span>
|
9
13
|
<div class="ml-auto fill-secondary inline-block">
|
10
|
-
<button type="button" class="button button__sm button__text-secondary" data-clipboard-copy="#urlShareLink-committee">
|
14
|
+
<button type="button" class="button button__sm button__text-secondary" data-controller="clipboard-copy" data-clipboard-copy="#urlShareLink-committee">
|
11
15
|
<%= render_committee_tooltip %>
|
12
16
|
<span class="sr-only"><%= t("decidim.shared.share_modal.copy_share_link") %></span>
|
13
17
|
</button>
|