decidim-action_delegator 0.8.2 → 0.9.0
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 +104 -58
- data/Rakefile +2 -2
- data/app/commands/decidim/action_delegator/admin/create_delegation.rb +1 -3
- data/app/commands/decidim/action_delegator/admin/create_setting.rb +5 -2
- data/app/commands/decidim/action_delegator/admin/update_setting.rb +4 -2
- data/app/controllers/concerns/decidim/action_delegator/devise/sessions_controller_override.rb +1 -1
- data/app/controllers/concerns/decidim/action_delegator/election_per_question_votes_controller_override.rb +65 -0
- data/app/controllers/concerns/decidim/action_delegator/election_votes_controller_override.rb +38 -0
- data/app/controllers/concerns/decidim/action_delegator/votes_controller_methods.rb +46 -0
- data/app/controllers/decidim/action_delegator/admin/application_controller.rb +11 -5
- data/app/controllers/decidim/action_delegator/admin/delegations_controller.rb +2 -10
- data/app/controllers/decidim/action_delegator/admin/invite_participants_controller.rb +0 -8
- data/app/controllers/decidim/action_delegator/admin/manage_delegations_controller.rb +13 -20
- data/app/controllers/decidim/action_delegator/admin/manage_participants_controller.rb +11 -19
- data/app/controllers/decidim/action_delegator/admin/participants_controller.rb +1 -9
- data/app/controllers/decidim/action_delegator/admin/permissions_controller.rb +1 -24
- data/app/controllers/decidim/action_delegator/admin/ponderations_controller.rb +0 -8
- data/app/controllers/decidim/action_delegator/admin/settings_controller.rb +12 -12
- data/app/controllers/decidim/action_delegator/application_controller.rb +3 -3
- data/app/controllers/decidim/action_delegator/elections/admin/results_controller.rb +58 -0
- data/app/controllers/decidim/action_delegator/elections/results_controller.rb +36 -0
- data/app/controllers/decidim/action_delegator/user_delegations_controller.rb +1 -1
- data/app/controllers/decidim/action_delegator/verifications/delegations_verifier/authorizations_controller.rb +14 -18
- data/app/forms/decidim/action_delegator/admin/action_delegator_census_form.rb +44 -0
- data/app/forms/decidim/action_delegator/admin/csv_import_form.rb +17 -0
- data/app/forms/decidim/action_delegator/admin/ponderation_form.rb +2 -1
- data/app/forms/decidim/action_delegator/admin/setting_form.rb +16 -10
- data/app/forms/decidim/action_delegator/censuses/internal_users_form.rb +32 -0
- data/app/forms/decidim/action_delegator/verifications/delegations_verifier_form.rb +41 -25
- data/app/helpers/decidim/action_delegator/admin/{delegation_helper.rb → settings_helper.rb} +3 -16
- data/app/helpers/decidim/action_delegator/settings_helper.rb +124 -0
- data/app/jobs/decidim/action_delegator/admin/invite_participants_job.rb +1 -1
- data/app/jobs/decidim/action_delegator/send_sms_job.rb +2 -2
- data/app/jobs/decidim/action_delegator/twilio_send_sms_job.rb +2 -2
- data/app/models/decidim/action_delegator/delegation.rb +15 -14
- data/app/models/decidim/action_delegator/participant.rb +7 -10
- data/app/models/decidim/action_delegator/ponderation.rb +0 -2
- data/app/models/decidim/action_delegator/setting.rb +14 -32
- data/app/overrides/decidim/elections/admin/dashboard/_results/_add_results_contents.html.erb.deface +10 -0
- data/app/overrides/decidim/elections/admin/dashboard/_results/_add_results_tabs.html.erb.deface +3 -0
- data/app/overrides/decidim/elections/elections/_election_aside/add_delegation_buttons.html.erb.deface +3 -0
- data/app/overrides/decidim/elections/elections/_vote_results/replace_results_div.html.erb.deface +8 -0
- data/app/overrides/decidim/elections/per_question_votes/show/add_delegation_hidden_input.html.erb.deface +3 -0
- data/app/overrides/decidim/elections/per_question_votes/show/add_delegation_id_to_links.html.erb.deface +3 -0
- data/app/overrides/decidim/elections/per_question_votes/waiting/add_delegation_buttons.html.erb.deface +3 -0
- data/app/overrides/decidim/elections/votes/receipt/add_delegation_buttons.html.erb.deface +3 -0
- data/app/packs/entrypoints/decidim_action_delegator_elections.js +1 -0
- data/app/packs/src/decidim/action_delegator/elections_live_results.js +160 -0
- data/app/permissions/decidim/action_delegator/admin/permissions.rb +29 -0
- data/app/permissions/decidim/action_delegator/permissions.rb +6 -30
- data/app/presenters/decidim/action_delegator/setting_presenter.rb +33 -0
- data/app/queries/decidim/action_delegator/action_delegator_census_users.rb +51 -0
- data/app/queries/decidim/action_delegator/authorized_resources.rb +28 -0
- data/app/queries/decidim/action_delegator/election_settings.rb +23 -0
- data/app/queries/decidim/action_delegator/{delegated_votes_versions.rb → elections_delegated_votes_versions.rb} +8 -8
- data/app/queries/decidim/action_delegator/elections_question_responses_by_type.rb +33 -0
- data/app/queries/decidim/action_delegator/elections_question_weighted_responses.rb +28 -0
- data/app/queries/decidim/action_delegator/elections_votes_with_ponderations.rb +62 -0
- data/app/services/decidim/action_delegator/participants_csv_importer.rb +1 -1
- data/app/services/decidim/action_delegator/sms_gateway.rb +2 -2
- data/app/views/decidim/action_delegator/admin/censuses/_action_delegator_census_form.html.erb +44 -0
- data/app/views/decidim/action_delegator/admin/censuses/_action_delegator_census_options_form.html.erb +25 -0
- data/app/views/decidim/action_delegator/admin/delegations/index.html.erb +12 -13
- data/app/views/decidim/action_delegator/admin/delegations/new.html.erb +29 -27
- data/app/views/decidim/action_delegator/admin/manage_delegations/new.html.erb +36 -24
- data/app/views/decidim/action_delegator/admin/manage_participants/new.html.erb +47 -33
- data/app/views/decidim/action_delegator/admin/participants/_form.html.erb +14 -8
- data/app/views/decidim/action_delegator/admin/participants/edit.html.erb +11 -13
- data/app/views/decidim/action_delegator/admin/participants/index.html.erb +20 -25
- data/app/views/decidim/action_delegator/admin/participants/new.html.erb +11 -13
- data/app/views/decidim/action_delegator/admin/ponderations/_form.html.erb +13 -7
- data/app/views/decidim/action_delegator/admin/ponderations/edit.html.erb +11 -13
- data/app/views/decidim/action_delegator/admin/ponderations/index.html.erb +8 -11
- data/app/views/decidim/action_delegator/admin/ponderations/new.html.erb +11 -13
- data/app/views/decidim/action_delegator/admin/settings/_form.html.erb +26 -12
- data/app/views/decidim/action_delegator/admin/settings/_participants_sync_check.html.erb +1 -1
- data/app/views/decidim/action_delegator/admin/settings/_setting_checks.html.erb +11 -16
- data/app/views/decidim/action_delegator/admin/settings/edit.html.erb +11 -12
- data/app/views/decidim/action_delegator/admin/settings/index.html.erb +22 -19
- data/app/views/decidim/action_delegator/admin/settings/new.html.erb +11 -12
- data/app/views/decidim/action_delegator/admin/shared/_tabs_menu.html.erb +15 -0
- data/app/views/decidim/action_delegator/censuses/_internal_users_form.html.erb +61 -0
- data/app/views/decidim/action_delegator/elections/_delegation_buttons.html.erb +10 -0
- data/app/views/decidim/action_delegator/elections/_normal_election_buttons.html.erb +13 -0
- data/app/views/decidim/action_delegator/elections/_per_question_buttons.html.erb +9 -0
- data/app/views/decidim/action_delegator/elections/_per_question_waiting_buttons.html.erb +19 -0
- data/app/views/decidim/action_delegator/elections/_vote_results.html.erb +10 -0
- data/app/views/decidim/action_delegator/elections/_vote_results_question.html.erb +13 -0
- data/app/views/decidim/action_delegator/elections/admin/dashboard/_by_type_and_weight.html.erb +45 -0
- data/app/views/decidim/action_delegator/elections/admin/dashboard/_results_tabs.html.erb +5 -0
- data/app/views/decidim/action_delegator/elections/admin/dashboard/_results_type_info.html.erb +4 -0
- data/app/views/decidim/action_delegator/elections/admin/dashboard/_sum_of_weights.html.erb +43 -0
- data/app/views/decidim/action_delegator/elections/admin/dashboard/_totals.html.erb +27 -0
- data/app/views/decidim/action_delegator/user_delegations/index.html.erb +13 -14
- data/app/views/decidim/action_delegator/verifications/delegations_verifier/authorizations/edit.html.erb +19 -29
- data/app/views/decidim/action_delegator/verifications/delegations_verifier/authorizations/new.html.erb +42 -40
- data/config/assets.rb +3 -36
- data/config/i18n-tasks.yml +27 -5
- data/config/locales/ca.yml +103 -146
- data/config/locales/cs.yml +161 -145
- data/config/locales/en.yml +110 -75
- data/config/locales/es.yml +108 -154
- data/db/migrate/20200824113801_create_settings.rb +1 -1
- data/db/migrate/20250729104037_add_title_to_action_delegator_settings.rb +31 -0
- data/lib/decidim/action_delegator/admin_engine.rb +72 -45
- data/lib/decidim/action_delegator/common_rake.rb +13 -0
- data/lib/decidim/action_delegator/engine.rb +48 -19
- data/lib/decidim/action_delegator/test/delegation_examples.rb +144 -0
- data/lib/decidim/action_delegator/test/factories.rb +11 -6
- data/lib/decidim/action_delegator/verifications/delegations_authorizer.rb +80 -47
- data/lib/decidim/action_delegator/version.rb +3 -3
- data/lib/decidim/action_delegator.rb +8 -26
- data/lib/tasks/migrate_consultations.rake +382 -0
- data/lib/tasks/upgrade_tasks.rake +5 -0
- data/package.json +10 -27
- metadata +72 -122
- data/app/commands/concerns/decidim/action_delegator/consultations/multiple_vote_question_override.rb +0 -31
- data/app/commands/concerns/decidim/action_delegator/consultations/vote_question_override.rb +0 -44
- data/app/commands/decidim/action_delegator/admin/fix_resource_permissions.rb +0 -46
- data/app/commands/decidim/action_delegator/vote_delegation.rb +0 -28
- data/app/controllers/concerns/decidim/action_delegator/consultations/consultations_controller_override.rb +0 -16
- data/app/controllers/concerns/decidim/action_delegator/consultations/question_multiple_votes_controller_override.rb +0 -29
- data/app/controllers/concerns/decidim/action_delegator/consultations/question_votes_controller_override.rb +0 -57
- data/app/controllers/concerns/decidim/action_delegator/consultations/questions_controller_override.rb +0 -16
- data/app/controllers/concerns/decidim/action_delegator/needs_consultation_styles.rb +0 -24
- data/app/controllers/decidim/action_delegator/admin/consultations/exports_controller.rb +0 -27
- data/app/controllers/decidim/action_delegator/admin/consultations_controller.rb +0 -47
- data/app/controllers/decidim/action_delegator/admin/exports/_sum_of_weights_controller.rb +0 -15
- data/app/controllers/decidim/action_delegator/questions_summary_controller.rb +0 -14
- data/app/forms/concerns/decidim/action_delegator/consultations/vote_form_override.rb +0 -15
- data/app/helpers/decidim/action_delegator/delegation_helper.rb +0 -13
- data/app/jobs/decidim/action_delegator/export_consultation_results_job.rb +0 -51
- data/app/models/concerns/decidim/action_delegator/consultations/question_override.rb +0 -36
- data/app/models/concerns/decidim/action_delegator/consultations/vote_override.rb +0 -15
- data/app/models/decidim/action_delegator/unversioned_vote.rb +0 -19
- data/app/models/decidim/action_delegator/whodunnit_vote.rb +0 -28
- data/app/overrides/decidim/consultations/admin/consultations/results/add_ongoing_warning.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/consultations/_question/add_delegation_link.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/consultations/_question/replace_vote_info.html.erb.deface +0 -4
- data/app/overrides/decidim/consultations/consultations/_regular_questions/prevent_empty_questions.html.erb.deface +0 -10
- data/app/overrides/decidim/consultations/consultations/_regular_questions/remove_highlighted_scopes.html.erb.deface +0 -5
- data/app/overrides/decidim/consultations/question_multiple_votes/_form/add_delegation_notice.html.erb.deface +0 -8
- data/app/overrides/decidim/consultations/questions/_results/replace_results.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/questions/_vote_button/add_delegations_link.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/questions/_vote_button/add_modal.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/questions/_vote_button/add_modal_javascript.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/questions/_vote_button/replace_delegation_to_multivote_link.html.erb.deface +0 -8
- data/app/overrides/decidim/consultations/questions/_vote_modal/add_delegation_callout.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/questions/_vote_modal_confirm/add_delegation_callout.html.erb.deface +0 -3
- data/app/overrides/decidim/consultations/questions/_vote_modal_confirm/add_hidden_field.html.erb.deface +0 -3
- data/app/overrides/layouts/decidim/_consultation_header/add_consultation_callout.html.erb.deface +0 -9
- data/app/overrides/layouts/decidim/_question_header/add_consultation_callout.html.erb.deface +0 -9
- data/app/overrides/layouts/decidim/admin/remove_deprecation.rb +0 -10
- data/app/packs/entrypoints/decidim_action_delegator.scss +0 -1
- data/app/packs/entrypoints/decidim_action_delegator_questions.js +0 -5
- data/app/packs/entrypoints/decidim_action_delegator_questions_summary.js +0 -1
- data/app/packs/src/decidim/action_delegator/questions.js +0 -33
- data/app/packs/src/decidim/action_delegator/summary.js +0 -24
- data/app/packs/stylesheets/decidim/action_delegator/questions.scss +0 -26
- data/app/permissions/concerns/decidim/action_delegator/consultations/permissions_override.rb +0 -35
- data/app/presenters/decidim/action_delegator/question_with_totals.rb +0 -24
- data/app/queries/decidim/action_delegator/consultation_delegations.rb +0 -25
- data/app/queries/decidim/action_delegator/delegates_votes_by_consultation.rb +0 -24
- data/app/queries/decidim/action_delegator/delegates_votes_by_question.rb +0 -26
- data/app/queries/decidim/action_delegator/delegation_votes.rb +0 -30
- data/app/queries/decidim/action_delegator/grantee_delegations.rb +0 -24
- data/app/queries/decidim/action_delegator/organization_delegations.rb +0 -26
- data/app/queries/decidim/action_delegator/organization_settings.rb +0 -31
- data/app/queries/decidim/action_delegator/responses.rb +0 -24
- data/app/queries/decidim/action_delegator/responses_by_membership.rb +0 -58
- data/app/queries/decidim/action_delegator/scrutiny.rb +0 -87
- data/app/queries/decidim/action_delegator/setting_delegations.rb +0 -19
- data/app/queries/decidim/action_delegator/sum_of_membership_weight.rb +0 -44
- data/app/queries/decidim/action_delegator/sum_of_weights.rb +0 -25
- data/app/queries/decidim/action_delegator/type_and_weight.rb +0 -26
- data/app/queries/decidim/action_delegator/voted_with_ponderations.rb +0 -30
- data/app/queries/decidim/action_delegator/votes_count_aggregation.rb +0 -34
- data/app/serializers/decidim/action_delegator/consultation_results_serializer.rb +0 -19
- data/app/views/decidim/action_delegator/admin/consultations/_ongoing_consultation_warning.html.erb +0 -3
- data/app/views/decidim/action_delegator/admin/consultations/results.html.erb +0 -65
- data/app/views/decidim/action_delegator/admin/consultations/weighted_results.html.erb +0 -66
- data/app/views/decidim/action_delegator/consultations/_link_to_question.html.erb +0 -11
- data/app/views/decidim/action_delegator/consultations/_link_with_results.html.erb +0 -11
- data/app/views/decidim/action_delegator/consultations/questions/_callout.html.erb +0 -5
- data/app/views/decidim/action_delegator/consultations/questions/_delegations_modal.html.erb +0 -34
- data/app/views/decidim/action_delegator/consultations/questions/_link_to_delegations.html.erb +0 -15
- data/app/views/decidim/action_delegator/consultations/questions/_vote_delegated_active.html.erb +0 -32
- data/app/views/decidim/action_delegator/consultations/questions/_vote_delegated_finished.html.erb +0 -9
- data/app/views/decidim/action_delegator/consultations/questions/_vote_delegated_upcoming.html.erb +0 -8
- data/app/views/decidim/action_delegator/consultations/questions/_weight_results.html.erb +0 -8
- data/app/views/decidim/consultations/question_votes/_callout.html.erb +0 -47
- data/app/views/decidim/consultations/question_votes/update_vote_button.js.erb +0 -82
- data/lib/tasks/import_direct_verification.rake +0 -30
@@ -1,15 +1,14 @@
|
|
1
|
-
|
2
|
-
<div
|
3
|
-
|
4
|
-
|
5
|
-
<%= t ".title" %>
|
6
|
-
<%= link_to t(".actions.new_delegation"), decidim_admin_action_delegator.new_setting_delegation_path(current_setting), class: "button tiny button--title" %>
|
7
|
-
<%= link_to t(".actions.csv_import"), decidim_admin_action_delegator.new_setting_manage_delegation_path(current_setting), class: "button tiny button--title import" %>
|
8
|
-
</h2>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<div>
|
3
|
+
<%= link_to t("decidim.action_delegator.admin.delegations.index.actions.new_delegation"), decidim_admin_action_delegator.new_setting_delegation_path(current_setting), class: "main-tabs-menu__cta-button" %>
|
4
|
+
<%= link_to t("decidim.action_delegator.admin.delegations.index.actions.csv_import"), decidim_admin_action_delegator.new_setting_manage_delegation_path(current_setting), class: "main-tabs-menu__cta-button" %>
|
9
5
|
</div>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<div class="card" id='user-groups'>
|
10
9
|
<div class="card-section">
|
11
|
-
<p class="help-text"><%= t ".description_html" %></p>
|
12
|
-
<div class="table-
|
10
|
+
<p class="help-text mb-4"><%= t ".description_html" %></p>
|
11
|
+
<div class="table-stacked">
|
13
12
|
<table class="table-list">
|
14
13
|
<thead>
|
15
14
|
<tr>
|
@@ -23,13 +22,13 @@
|
|
23
22
|
<tbody>
|
24
23
|
<% delegations.each do |delegation| %>
|
25
24
|
<tr data-delegation-id="<%= delegation.id %>">
|
26
|
-
<td><%= delegation.granter.name
|
27
|
-
<td><%= delegation.grantee.name
|
25
|
+
<td><%= delegation.granter.name %> (<%= delegation.granter.email %>)</td>
|
26
|
+
<td><%= delegation.grantee.name %> (<%= delegation.grantee.email %>)</td>
|
28
27
|
<td><%= t("booleans.#{delegation.grantee_voted?}") %></td>
|
29
28
|
<td><%= l delegation.created_at, format: :short %></td>
|
30
29
|
|
31
30
|
<td class="table-list__actions">
|
32
|
-
<%= icon_link_to "
|
31
|
+
<%= icon_link_to "delete-bin-line", decidim_admin_action_delegator.setting_delegation_path(delegation.setting, delegation), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } unless delegation.grantee_voted? %>
|
33
32
|
</td>
|
34
33
|
</tr>
|
35
34
|
<% end %>
|
@@ -1,31 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
5
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.delegations.index"), decidim_admin_action_delegator.setting_delegations_path(current_setting) %> >
|
6
|
-
<%= t ".title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="card-section">
|
11
|
-
<%= decidim_form_for @form, url: { action: "create" }, html: { class: "form new_delegation" } do |f| %>
|
12
|
-
<% prompt_options = { url: decidim_admin.users_organization_url, placeholder: t(".select_member") } %>
|
13
|
-
|
14
|
-
<div class="row column">
|
15
|
-
<%= f.autocomplete_select(:granter_id, @form.granter, { multiple: false, label: t(".granter") }, prompt_options) do |user|
|
16
|
-
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
17
|
-
end %>
|
18
|
-
</div>
|
19
|
-
<div class="row column">
|
20
|
-
<%= f.autocomplete_select(:grantee_id, @form.grantee, { multiple: false, label: t(".grantee") }, prompt_options) do |user|
|
21
|
-
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
22
|
-
end %>
|
23
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<%= button_tag t("decidim.action_delegator.admin.settings.new.save"), class: "main-tabs-menu__cta-button", form: "delegation-form-edit" %>
|
3
|
+
<% end %>
|
24
4
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
5
|
+
<div class="item__edit item__edit-1col">
|
6
|
+
<div class="item__edit-form">
|
7
|
+
<%= decidim_form_for(@form, url: { action: "create" }, html: { id: "delegation-form-edit", class: "form-defaults form new_delegation" }) do |form| %>
|
8
|
+
<div class="form__wrapper">
|
9
|
+
<div class="card pt-4">
|
10
|
+
<div class="card-section">
|
11
|
+
<% prompt_options = { url: decidim_admin.users_organization_url, placeholder: t(".select_member") } %>
|
29
12
|
|
13
|
+
<div class="row column">
|
14
|
+
<%= form.autocomplete_select(:granter_id, @form.granter, { multiple: false, label: t(".granter"), class: "autocomplete-field--results-inline" }, prompt_options) do |user|
|
15
|
+
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
16
|
+
end %>
|
17
|
+
</div>
|
18
|
+
<div class="row column">
|
19
|
+
<%= form.autocomplete_select(:grantee_id, @form.grantee, { multiple: false, label: t(".grantee"), class: "autocomplete-field--results-inline" }, prompt_options) do |user|
|
20
|
+
{ value: user.id, label: "#{user.name} (@#{user.nickname})" }
|
21
|
+
end %>
|
22
|
+
</div>
|
23
|
+
<div class="item__edit-sticky">
|
24
|
+
<div class="item__edit-sticky-container">
|
25
|
+
<%= form.submit t(".save"), class: "button button__sm button__secondary" %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
30
32
|
</div>
|
31
33
|
</div>
|
@@ -1,29 +1,41 @@
|
|
1
|
-
|
2
|
-
<div class="card-divider">
|
3
|
-
<h2 class="card-title">
|
4
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
5
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.delegations.index"), decidim_admin_action_delegator.setting_delegations_path(current_setting) %> >
|
6
|
-
<%= t ".title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" %>
|
9
2
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
3
|
+
<div class="item__edit item__edit-1col">
|
4
|
+
<div class="item__edit-form">
|
5
|
+
<%= decidim_form_for @form, url: setting_manage_delegations_path(current_setting), multipart: true, html: { class: "form-defaults new_import" } do |form| %>
|
6
|
+
<div class="form__wrapper">
|
7
|
+
<div class="card pt-4">
|
8
|
+
<div class="card-section">
|
9
|
+
<%= form.hidden_field :setting_id, value: current_setting.id %>
|
10
|
+
<div class="row column">
|
11
|
+
<h2 class="h3 mb-4">
|
12
|
+
<%= t("decidim.action_delegator.admin.manage_delegations.new.title") %>
|
13
|
+
</h2>
|
14
|
+
<p><%= t(".upload_instructions") %></p>
|
15
|
+
<p><%= t(".required_fields") %></p>
|
16
|
+
<p><%= t(".title_example") %></p>
|
17
|
+
<pre class="code-block">
|
18
|
+
from,to
|
19
|
+
user_1@example.org,user_2@example.org
|
20
|
+
user_3@example.org,user_4@example.org
|
21
|
+
...
|
22
|
+
</pre>
|
23
|
+
</div>
|
24
|
+
<div class="row column">
|
25
|
+
<%= form.upload :csv_file,
|
26
|
+
button_label: t(".upload_button"),
|
27
|
+
help_i18n_scope: nil,
|
28
|
+
help: t(".upload_help"),
|
29
|
+
button_class: "button button__sm button__transparent-secondary" %>
|
30
|
+
</div>
|
24
31
|
|
25
|
-
|
26
|
-
|
32
|
+
<div class="item__edit-sticky">
|
33
|
+
<div class="item__edit-sticky-container">
|
34
|
+
<%= form.submit t(".import"), class: "button button__sm button__secondary" %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
27
39
|
</div>
|
28
40
|
<% end %>
|
29
41
|
</div>
|
@@ -1,35 +1,49 @@
|
|
1
|
-
<%=
|
2
|
-
<%= hidden_field_tag :setting_id, current_setting.id %>
|
3
|
-
<div class="card">
|
4
|
-
<div class="card-divider">
|
5
|
-
<h2 class="card-title">
|
6
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
7
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.participants.index"), decidim_admin_action_delegator.setting_participants_path(current_setting) %> >
|
8
|
-
<%= t ".title" %>
|
9
|
-
</h2>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<p><%= t(".upload_instructions") %></p>
|
13
|
-
<p><%= t(".required_fields", authorization_method: t(".authorization_method.#{current_setting.authorization_method}")) %></p>
|
14
|
-
<p><%= t(".title_example") %></p>
|
15
|
-
<pre class="code-block">
|
16
|
-
email,phone,weight
|
17
|
-
foo@example.org,6660000,1.5
|
18
|
-
bar@example.org,6660001,1
|
19
|
-
baz@example.org,6660002,2
|
20
|
-
...</pre>
|
21
|
-
<p><%= t(".describe") %></p>
|
22
|
-
<pre class="code-block">
|
23
|
-
email,phone,weight
|
24
|
-
foo@example.org,6660000,producer
|
25
|
-
bar@example.org,6660001,consumer
|
26
|
-
baz@example.org,6660002,associate
|
27
|
-
...</pre>
|
28
|
-
<div class="row column">
|
29
|
-
<%= file_field_tag :csv_file %>
|
30
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" %>
|
31
2
|
|
32
|
-
|
33
|
-
|
3
|
+
<div class="item__edit item__edit-1col">
|
4
|
+
<div class="item__edit-form">
|
5
|
+
<%= decidim_form_for @form, url: setting_manage_participants_path(current_setting), multipart: true, html: { id: "csv-form-edit", class: "form-defaults new_import" } do |form| %>
|
6
|
+
<%= form.hidden_field :setting_id, value: current_setting.id %>
|
7
|
+
<div class="form__wrapper">
|
8
|
+
<div class="card pt-4">
|
9
|
+
<div class="card-section">
|
10
|
+
<div class="row column">
|
11
|
+
<h2 class="h3 mb-4">
|
12
|
+
<%= t("decidim.action_delegator.admin.manage_participants.new.title") %>
|
13
|
+
</h2>
|
14
|
+
<p><%= t(".upload_instructions") %></p>
|
15
|
+
<p><%= t(".required_fields", authorization_method: t(".authorization_method.#{current_setting.authorization_method}")) %></p>
|
16
|
+
<p><%= t(".title_example") %></p>
|
17
|
+
<pre class="code-block">
|
18
|
+
email,phone,weight
|
19
|
+
foo@example.org,6660000,1.5
|
20
|
+
bar@example.org,6660001,1
|
21
|
+
baz@example.org,6660002,2
|
22
|
+
...</pre>
|
23
|
+
<p><%= t(".describe") %></p>
|
24
|
+
<pre class="code-block">
|
25
|
+
email,phone,weight
|
26
|
+
foo@example.org,6660000,producer
|
27
|
+
bar@example.org,6660001,consumer
|
28
|
+
baz@example.org,6660002,associate
|
29
|
+
...
|
30
|
+
</pre>
|
31
|
+
</div>
|
32
|
+
<div class="row column">
|
33
|
+
<%= form.upload :csv_file,
|
34
|
+
button_label: t(".upload_button"),
|
35
|
+
help: t(".upload_help"),
|
36
|
+
help_i18n_scope: nil,
|
37
|
+
button_class: "button button__sm button__transparent-secondary" %>
|
38
|
+
</div>
|
39
|
+
<div class="item__edit-sticky">
|
40
|
+
<div class="item__edit-sticky-container">
|
41
|
+
<%= form.submit t(".import"), class: "button button__sm button__secondary" %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
34
48
|
</div>
|
35
|
-
|
49
|
+
</div>
|
@@ -1,9 +1,15 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
<div class="row column">
|
5
|
-
|
6
|
-
</div>
|
7
|
-
<div class="row column">
|
8
|
-
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card pt-4">
|
3
|
+
<div class="card-section">
|
4
|
+
<div class="row column">
|
5
|
+
<%= form.email_field :email %>
|
6
|
+
</div>
|
7
|
+
<div class="row column">
|
8
|
+
<%= form.text_field :phone %>
|
9
|
+
</div>
|
10
|
+
<div class="row column">
|
11
|
+
<%= form.select :decidim_action_delegator_ponderation_id, ponderations_for_select(current_setting), include_blank: true %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
9
15
|
</div>
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
5
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.participants.index"), decidim_admin_action_delegator.setting_participants_path(current_setting) %> >
|
6
|
-
<%= t ".title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<%= button_tag t("decidim.action_delegator.admin.participants.edit.save"), class: "main-tabs-menu__cta-button", form: "participant-form-edit" %>
|
3
|
+
<% end %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
<div class="item__edit item__edit-1col">
|
6
|
+
<div class="item__edit-form">
|
7
|
+
<%= decidim_form_for @form, url: { action: "update" }, html: { id: "participant-form-edit", class: "form-defaults form edit_ponderation" } do |form| %>
|
8
|
+
<%= render partial: "form", object: form %>
|
13
9
|
|
14
|
-
<div class="
|
15
|
-
|
10
|
+
<div class="item__edit-sticky">
|
11
|
+
<div class="item__edit-sticky-container">
|
12
|
+
<%= form.submit t(".save"), class: "button button__sm button__secondary" %>
|
13
|
+
</div>
|
16
14
|
</div>
|
17
15
|
<% end %>
|
18
16
|
</div>
|
@@ -1,29 +1,24 @@
|
|
1
|
-
|
2
|
-
<div
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
decidim_admin_action_delegator.new_setting_manage_participant_path(setting_id: current_setting.id),
|
12
|
-
class: "button tiny button--title" %>
|
13
|
-
<%= link_to t(".actions.remove_census"), decidim_admin_action_delegator.destroy_all_setting_manage_participants_path(current_setting),
|
14
|
-
method: :delete,
|
15
|
-
data: { confirm: t("participants.remove_census.confirm", scope: "decidim.action_delegator.admin") },
|
16
|
-
class: "button tiny alert button--title" %>
|
17
|
-
</div>
|
18
|
-
</h2>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<div>
|
3
|
+
<%= link_to t("decidim.action_delegator.admin.participants.index.actions.new_participant"), decidim_admin_action_delegator.new_setting_participant_path(current_setting), class: "main-tabs-menu__cta-button" %>
|
4
|
+
<%= link_to t("decidim.action_delegator.admin.participants.index.actions.csv_import"),
|
5
|
+
decidim_admin_action_delegator.new_setting_manage_participant_path(current_setting),
|
6
|
+
class: "main-tabs-menu__cta-button" %>
|
7
|
+
<%= link_to t("decidim.action_delegator.admin.participants.index.actions.remove_census"), decidim_admin_action_delegator.destroy_all_setting_manage_participants_path(current_setting),
|
8
|
+
method: :delete,
|
9
|
+
data: { confirm: t("participants.remove_census.confirm", scope: "decidim.action_delegator.admin") },
|
10
|
+
class: "main-tabs-menu__cta-button" %>
|
19
11
|
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="card" id='user-groups'>
|
20
15
|
<div class="card-section">
|
21
|
-
<%= render "decidim/action_delegator/admin/settings/participants_email_check", setting: current_setting if
|
16
|
+
<%= render "decidim/action_delegator/admin/settings/participants_email_check", setting: current_setting if current_setting.authorization_method == "phone" %>
|
22
17
|
<%= render "decidim/action_delegator/admin/settings/participants_sync_check", setting: current_setting %>
|
23
18
|
<% if Decidim::ActionDelegator.allow_to_invite_users %>
|
24
|
-
<%= render "decidim/action_delegator/admin/participants/missing_registered_check", setting: current_setting unless
|
19
|
+
<%= render "decidim/action_delegator/admin/participants/missing_registered_check", setting: current_setting unless current_setting.authorization_method == "phone" %>
|
25
20
|
<% end %>
|
26
|
-
<div class="table-
|
21
|
+
<div class="table-stacked">
|
27
22
|
<table class="table-list">
|
28
23
|
<thead>
|
29
24
|
<tr>
|
@@ -50,17 +45,17 @@
|
|
50
45
|
|
51
46
|
<td class="table-list__actions">
|
52
47
|
<% if Decidim::ActionDelegator.allow_to_invite_users %>
|
53
|
-
<%= icon_link_to "
|
48
|
+
<%= icon_link_to "arrow-go-forward-line",
|
54
49
|
decidim_admin_action_delegator.resend_invitation_setting_invite_participant_path(participant.setting, participant),
|
55
50
|
t("actions.resend", scope: "decidim.admin"),
|
56
51
|
method: :post if participant.last_login.nil? && participant.user.present? && !(current_setting.authorization_method == "phone") %>
|
57
|
-
<%= icon_link_to "
|
52
|
+
<%= icon_link_to "mail-line",
|
58
53
|
decidim_admin_action_delegator.invite_user_setting_invite_participant_path(participant.setting, participant),
|
59
54
|
t("actions.invite", scope: "decidim.admin"),
|
60
55
|
method: :post if !participant.user && participant.email.present? && !(current_setting.authorization_method == "phone") %>
|
61
56
|
<% end %>
|
62
|
-
<%= icon_link_to "pencil", decidim_admin_action_delegator.edit_setting_participant_path(participant.setting, participant), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
63
|
-
<%= icon_link_to "
|
57
|
+
<%= icon_link_to "pencil-line", decidim_admin_action_delegator.edit_setting_participant_path(participant.setting, participant), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
58
|
+
<%= icon_link_to "delete-bin-line", decidim_admin_action_delegator.setting_participant_path(participant.setting, participant), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } unless participant.voted? %>
|
64
59
|
</td>
|
65
60
|
</tr>
|
66
61
|
<% end %>
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
5
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.participants.index"), decidim_admin_action_delegator.setting_participants_path(current_setting) %> >
|
6
|
-
<%= t ".title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<%= button_tag t("decidim.action_delegator.admin.settings.new.save"), class: "main-tabs-menu__cta-button", form: "participant-form-edit" %>
|
3
|
+
<% end %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
<div class="item__edit item__edit-1col">
|
6
|
+
<div class="item__edit-form">
|
7
|
+
<%= decidim_form_for(@form, url: { action: "create" }, html: { id: "participant-form-edit", class: "form-defaults form new_participant" }) do |form| %>
|
8
|
+
<%= render partial: "form", object: form %>
|
13
9
|
|
14
|
-
<div class="
|
15
|
-
|
10
|
+
<div class="item__edit-sticky">
|
11
|
+
<div class="item__edit-sticky-container">
|
12
|
+
<%= form.submit t(".save"), class: "button button__sm button__secondary" %>
|
13
|
+
</div>
|
16
14
|
</div>
|
17
15
|
<% end %>
|
18
16
|
</div>
|
@@ -1,8 +1,14 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card pt-4">
|
3
|
+
<div class="card-section">
|
4
|
+
<div class="row column">
|
5
|
+
<%= form.text_field :name, placeholder: t(".name_placeholder") %>
|
6
|
+
<p class="help-text"><%== t(".name_help") %></p>
|
7
|
+
</div>
|
8
|
+
<div class="row column">
|
9
|
+
<%= form.number_field :weight, step: 0.01 %>
|
10
|
+
<p class="help-text"><%== t(".weight_help") %></p>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
8
14
|
</div>
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
5
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.ponderations.index"), decidim_admin_action_delegator.setting_ponderations_path(current_setting) %> >
|
6
|
-
<%= t ".title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<%= button_tag t("decidim.action_delegator.admin.settings.edit.save"), class: "main-tabs-menu__cta-button", form: "ponderations-form-edit" %>
|
3
|
+
<% end %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
<div class="item__edit item__edit-1col">
|
6
|
+
<div class="item__edit-form">
|
7
|
+
<%= decidim_form_for @form, url: { action: "update" }, html: { id: "ponderations-form-edit", class: "form-defaults form edit_ponderation" } do |form| %>
|
8
|
+
<%= render partial: "form", object: form %>
|
13
9
|
|
14
|
-
<div class="
|
15
|
-
|
10
|
+
<div class="item__edit-sticky">
|
11
|
+
<div class="item__edit-sticky-container">
|
12
|
+
<%= form.submit t(".save"), class: "button button__sm button__secondary" %>
|
13
|
+
</div>
|
16
14
|
</div>
|
17
15
|
<% end %>
|
18
16
|
</div>
|
@@ -1,13 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<%= link_to t(".actions.new_ponderation"), decidim_admin_action_delegator.new_setting_ponderation_path(current_setting), class: "button tiny button--title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<%= link_to t("decidim.action_delegator.admin.ponderations.new.title"), decidim_admin_action_delegator.new_setting_ponderation_path, class: "main-tabs-menu__cta-button" %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<div class="card" id='user-groups'>
|
9
6
|
<div class="card-section">
|
10
|
-
<div class="table-
|
7
|
+
<div class="table-stacked">
|
11
8
|
<table class="table-list">
|
12
9
|
<thead>
|
13
10
|
<tr>
|
@@ -27,8 +24,8 @@
|
|
27
24
|
<td><%= l ponderation.created_at, format: :short %></td>
|
28
25
|
|
29
26
|
<td class="table-list__actions">
|
30
|
-
<%= icon_link_to "pencil", decidim_admin_action_delegator.edit_setting_ponderation_path(ponderation.setting, ponderation), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
31
|
-
<%= icon_link_to "
|
27
|
+
<%= icon_link_to "pencil-line", decidim_admin_action_delegator.edit_setting_ponderation_path(ponderation.setting, ponderation), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
28
|
+
<%= icon_link_to "delete-bin-line", decidim_admin_action_delegator.setting_ponderation_path(ponderation.setting, ponderation), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } if ponderation.destroyable? %>
|
32
29
|
</td>
|
33
30
|
</tr>
|
34
31
|
<% end %>
|
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= link_to translated_attribute(current_setting.title), decidim_admin_action_delegator.settings_path %> >
|
5
|
-
<%= link_to t("title", scope: "decidim.action_delegator.admin.ponderations.index"), decidim_admin_action_delegator.setting_ponderations_path(current_setting) %> >
|
6
|
-
<%= t ".title" %>
|
7
|
-
</h2>
|
8
|
-
</div>
|
1
|
+
<%= render "decidim/action_delegator/admin/shared/tabs_menu" do %>
|
2
|
+
<%= button_tag t("decidim.action_delegator.admin.settings.new.save"), class: "main-tabs-menu__cta-button", form: "ponderation-form-edit" %>
|
3
|
+
<% end %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
<div class="item__edit item__edit-1col">
|
6
|
+
<div class="item__edit-form">
|
7
|
+
<%= decidim_form_for @form, url: { action: "create" }, html: { id: "ponderation-form-edit", class: "form-defaults form new_ponderation" } do |form| %>
|
8
|
+
<%= render partial: "form", object: form %>
|
13
9
|
|
14
|
-
<div class="
|
15
|
-
|
10
|
+
<div class="item__edit-sticky">
|
11
|
+
<div class="item__edit-sticky-container">
|
12
|
+
<%= form.submit t(".save"), class: "button button__sm button__secondary" %>
|
13
|
+
</div>
|
16
14
|
</div>
|
17
15
|
<% end %>
|
18
16
|
</div>
|
@@ -1,16 +1,30 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card pt-4">
|
3
|
+
<div class="card-section">
|
4
|
+
<div class="row column">
|
5
|
+
<%= form.translated :text_field, :title, aria: { label: :title } %>
|
6
|
+
</div>
|
4
7
|
|
5
|
-
<div class="row column">
|
6
|
-
|
7
|
-
</div>
|
8
|
+
<div class="row column">
|
9
|
+
<%= form.check_box :active %>
|
10
|
+
</div>
|
8
11
|
|
9
|
-
<div class="row column">
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
<div class="row column">
|
13
|
+
<%= form.translated :editor, :description, aria: { label: :description } %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="row column">
|
17
|
+
<%= form.number_field :max_grants, min: 1, autofocus: true %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="row column">
|
21
|
+
<%= form.select(:authorization_method, [:both, :phone, :email].map { |op| [t(op, scope: "decidim.action_delegator.admin.settings.authorization_method"), op] }) %>
|
22
|
+
<span class="help-text mt-4"><%= t("authorization_method_help_html", scope: "decidim.action_delegator.admin.settings") %></span>
|
23
|
+
</div>
|
13
24
|
|
14
|
-
<div class="row column">
|
15
|
-
|
25
|
+
<div class="row column">
|
26
|
+
<%= form.collection_select :copy_from_setting_id, settings_select_options, :first, :last, { include_blank: true, label: t("copy_setting", scope: "decidim.action_delegator.admin.settings").html_safe } %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
16
30
|
</div>
|