decidim-proposals 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/proposals/collaborative_draft_cell.rb +1 -1
- data/app/cells/decidim/proposals/collaborative_draft_l_cell.rb +16 -0
- data/app/cells/decidim/proposals/collaborative_draft_link_to_proposal/show.erb +4 -12
- data/app/cells/decidim/proposals/collaborative_draft_link_to_proposal_cell.rb +0 -29
- data/app/cells/decidim/proposals/collaborative_draft_metadata_cell.rb +30 -0
- data/app/cells/decidim/proposals/content_blocks/highlighted_proposals_cell.rb +2 -8
- data/app/cells/decidim/proposals/cost_report/show.erb +5 -34
- data/app/cells/decidim/proposals/cost_report_cell.rb +0 -13
- data/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +29 -17
- data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +34 -8
- data/app/cells/decidim/proposals/irreversible_action_modal/show.erb +9 -17
- data/app/cells/decidim/proposals/irreversible_action_modal_cell.rb +7 -9
- data/app/cells/decidim/proposals/participatory_text_proposal/buttons.erb +21 -31
- data/app/cells/decidim/proposals/participatory_text_proposal/show.erb +5 -9
- data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +0 -9
- data/app/cells/decidim/proposals/proposal_activity_cell.rb +1 -12
- data/app/cells/decidim/proposals/proposal_cell.rb +6 -1
- data/app/cells/decidim/proposals/proposal_l_cell.rb +47 -0
- data/app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb +6 -4
- data/app/cells/decidim/proposals/proposal_link_to_rejected_emendation_cell.rb +9 -7
- data/app/cells/decidim/proposals/proposal_linked_resources/show.erb +3 -8
- data/app/cells/decidim/proposals/proposal_metadata_cell.rb +61 -0
- data/app/cells/decidim/proposals/proposal_s_cell.rb +21 -0
- data/app/cells/decidim/proposals/proposals_picker/show.erb +13 -13
- data/app/cells/decidim/proposals/proposals_picker_cell.rb +15 -38
- data/app/commands/decidim/proposals/accept_access_to_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/admin/answer_proposal.rb +1 -1
- data/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb +3 -3
- data/app/commands/decidim/proposals/admin/create_proposal.rb +2 -2
- data/app/commands/decidim/proposals/admin/create_proposal_note.rb +4 -4
- data/app/commands/decidim/proposals/admin/discard_participatory_text.rb +1 -1
- data/app/commands/decidim/proposals/admin/import_participatory_text.rb +1 -1
- data/app/commands/decidim/proposals/admin/import_proposals.rb +2 -13
- data/app/commands/decidim/proposals/admin/merge_proposals.rb +1 -1
- data/app/commands/decidim/proposals/admin/notify_proposal_answer.rb +3 -3
- data/app/commands/decidim/proposals/admin/publish_answers.rb +1 -1
- data/app/commands/decidim/proposals/admin/publish_participatory_text.rb +2 -2
- data/app/commands/decidim/proposals/admin/split_proposals.rb +1 -1
- data/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb +2 -2
- data/app/commands/decidim/proposals/admin/update_participatory_text.rb +1 -1
- data/app/commands/decidim/proposals/admin/update_proposal.rb +5 -1
- data/app/commands/decidim/proposals/admin/update_proposal_scope.rb +1 -1
- data/app/commands/decidim/proposals/create_collaborative_draft.rb +13 -3
- data/app/commands/decidim/proposals/create_proposal.rb +14 -5
- data/app/commands/decidim/proposals/hashtags_methods.rb +1 -1
- data/app/commands/decidim/proposals/publish_proposal.rb +1 -1
- data/app/commands/decidim/proposals/reject_access_to_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/request_access_to_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/unvote_proposal.rb +2 -2
- data/app/commands/decidim/proposals/update_collaborative_draft.rb +12 -2
- data/app/commands/decidim/proposals/update_proposal.rb +16 -14
- data/app/commands/decidim/proposals/vote_proposal.rb +2 -2
- data/app/controllers/concerns/decidim/proposals/admin/filterable.rb +4 -13
- data/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +2 -2
- data/app/controllers/decidim/proposals/admin/proposal_notes_controller.rb +1 -1
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +2 -2
- data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +3 -9
- data/app/controllers/decidim/proposals/proposal_votes_controller.rb +3 -3
- data/app/controllers/decidim/proposals/proposals_controller.rb +42 -12
- data/app/events/decidim/proposals/accepted_proposal_event.rb +1 -1
- data/app/events/decidim/proposals/admin/proposal_note_created_event.rb +1 -1
- data/app/events/decidim/proposals/admin/update_proposal_category_event.rb +1 -1
- data/app/events/decidim/proposals/admin/update_proposal_scope_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_access_accepted_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_access_rejected_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_access_request_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_access_requested_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_access_requester_accepted_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_access_requester_rejected_event.rb +1 -1
- data/app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb +1 -1
- data/app/events/decidim/proposals/evaluating_proposal_event.rb +1 -1
- data/app/events/decidim/proposals/proposal_endorsed_event.rb +1 -1
- data/app/events/decidim/proposals/proposal_mentioned_event.rb +1 -1
- data/app/events/decidim/proposals/publish_proposal_event.rb +1 -1
- data/app/events/decidim/proposals/rejected_proposal_event.rb +1 -1
- data/app/forms/decidim/proposals/admin/import_participatory_text_form.rb +1 -1
- data/app/forms/decidim/proposals/admin/proposal_base_form.rb +2 -2
- data/app/forms/decidim/proposals/admin/proposal_form.rb +1 -1
- data/app/forms/decidim/proposals/admin/proposals_fork_form.rb +1 -1
- data/app/forms/decidim/proposals/admin/valuation_assignment_form.rb +1 -1
- data/app/forms/decidim/proposals/proposal_form.rb +9 -27
- data/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb +1 -1
- data/app/helpers/decidim/proposals/admin/proposals_helper.rb +13 -13
- data/app/helpers/decidim/proposals/application_helper.rb +80 -28
- data/app/helpers/decidim/proposals/collaborative_draft_helper.rb +44 -4
- data/app/helpers/decidim/proposals/map_helper.rb +3 -4
- data/app/helpers/decidim/proposals/participatory_texts_helper.rb +1 -9
- data/app/helpers/decidim/proposals/proposal_cells_helper.rb +1 -1
- data/app/helpers/decidim/proposals/proposal_votes_helper.rb +2 -24
- data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +14 -81
- data/app/helpers/decidim/proposals/proposals_helper.rb +0 -12
- data/app/jobs/decidim/proposals/hide_all_created_by_author_job.rb +20 -0
- data/app/jobs/decidim/proposals/notify_proposals_mentioned_job.rb +1 -1
- data/app/jobs/decidim/proposals/settings_change_job.rb +2 -2
- data/app/models/decidim/proposals/collaborative_draft.rb +4 -16
- data/app/models/decidim/proposals/proposal.rb +33 -16
- data/app/models/decidim/proposals/proposal_vote.rb +3 -3
- data/app/models/decidim/proposals/valuation_assignment.rb +1 -2
- data/app/packs/documents/decidim/proposals/participatory_texts/participatory_text.md +9 -4
- data/app/packs/entrypoints/decidim_proposals.js +4 -0
- data/app/packs/entrypoints/decidim_proposals_admin.js +0 -1
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_accepted_proposals.svg +68 -1
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_proposal_votes.svg +34 -1
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_proposals.svg +64 -1
- data/app/packs/src/decidim/proposals/add_proposal.js +25 -39
- data/app/packs/src/decidim/proposals/admin/proposals.js +0 -7
- data/app/packs/src/decidim/proposals/choose_proposals.js +20 -0
- data/app/packs/stylesheets/decidim/proposals/proposals.scss +97 -0
- data/app/permissions/decidim/proposals/admin/permissions.rb +3 -3
- data/app/permissions/decidim/proposals/permissions.rb +1 -10
- data/app/presenters/decidim/proposals/admin_log/proposal_note_presenter.rb +2 -2
- data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +7 -3
- data/app/presenters/decidim/proposals/admin_log/valuation_assignment_presenter.rb +2 -2
- data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb +3 -1
- data/app/presenters/decidim/proposals/log/resource_presenter.rb +22 -0
- data/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb +1 -1
- data/app/presenters/decidim/proposals/proposal_presenter.rb +6 -2
- data/app/services/decidim/proposals/diff_renderer.rb +3 -3
- data/app/services/decidim/proposals/proposal_builder.rb +6 -6
- data/app/views/decidim/proposals/admin/participatory_texts/_article-preview.html.erb +2 -4
- data/app/views/decidim/proposals/admin/participatory_texts/_bulk-actions.html.erb +2 -2
- data/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +58 -46
- data/app/views/decidim/proposals/admin/participatory_texts/new_import.html.erb +31 -33
- data/app/views/decidim/proposals/admin/proposal_answers/_form.html.erb +17 -11
- data/app/views/decidim/proposals/admin/proposal_notes/_form.html.erb +5 -6
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_notes.html.erb +28 -36
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +27 -30
- data/app/views/decidim/proposals/admin/proposals/_documents.html.erb +13 -0
- data/app/views/decidim/proposals/admin/proposals/_endorsers.html.erb +25 -0
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +70 -90
- data/app/views/decidim/proposals/admin/proposals/_meetings.html.erb +13 -0
- data/app/views/decidim/proposals/admin/proposals/_photos.html.erb +13 -0
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +31 -25
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb +3 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_merge.html.erb +4 -4
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_publish_answers.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_recategorize.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_scope-change.html.erb +4 -8
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_split.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/edit.html.erb +17 -7
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +50 -63
- data/app/views/decidim/proposals/admin/proposals/new.html.erb +16 -6
- data/app/views/decidim/proposals/admin/proposals/publish_answers.js.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/show.html.erb +204 -162
- data/app/views/decidim/proposals/admin/proposals/update_attribute.js.erb +5 -6
- data/app/views/decidim/proposals/admin/proposals_imports/new.html.erb +48 -34
- data/app/views/decidim/proposals/collaborative_drafts/_accept_request_access_form.html.erb +1 -1
- data/app/views/decidim/proposals/collaborative_drafts/_actions.html.erb +7 -0
- data/app/views/decidim/proposals/collaborative_drafts/_collaborative_draft_aside.html.erb +53 -0
- data/app/views/decidim/proposals/collaborative_drafts/_collaborative_drafts.html.erb +12 -13
- data/app/views/decidim/proposals/collaborative_drafts/_collaborator_requests.html.erb +8 -12
- data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +26 -54
- data/app/views/decidim/proposals/collaborative_drafts/_reject_request_access_form.html.erb +1 -3
- data/app/views/decidim/proposals/collaborative_drafts/_request_access_form.html.erb +1 -1
- data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +23 -25
- data/app/views/decidim/proposals/collaborative_drafts/index.html.erb +30 -22
- data/app/views/decidim/proposals/collaborative_drafts/index.js.erb +0 -5
- data/app/views/decidim/proposals/collaborative_drafts/new.html.erb +22 -18
- data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +39 -109
- data/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb +2 -2
- data/app/views/decidim/proposals/proposals/_actions.html.erb +13 -0
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +31 -70
- data/app/views/decidim/proposals/proposals/_linked_proposals.html.erb +3 -35
- data/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +40 -0
- data/app/views/decidim/proposals/proposals/_proposals.html.erb +18 -39
- data/app/views/decidim/proposals/proposals/_proposals_picker.html.erb +5 -0
- data/app/views/decidim/proposals/proposals/_remaining_votes_count.html.erb +3 -3
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +16 -17
- data/app/views/decidim/proposals/proposals/_votes_count.html.erb +3 -6
- data/app/views/decidim/proposals/proposals/_voting_rules.html.erb +28 -41
- data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +19 -25
- data/app/views/decidim/proposals/proposals/compare.html.erb +17 -16
- data/app/views/decidim/proposals/proposals/complete.html.erb +26 -21
- data/app/views/decidim/proposals/proposals/edit.html.erb +32 -27
- data/app/views/decidim/proposals/proposals/edit_draft.html.erb +21 -19
- data/app/views/decidim/proposals/proposals/index.html.erb +56 -47
- data/app/views/decidim/proposals/proposals/index.js.erb +0 -5
- data/app/views/decidim/proposals/proposals/new.html.erb +30 -35
- data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +5 -5
- data/app/views/decidim/proposals/proposals/participatory_texts/_view_index.html.erb +15 -8
- data/app/views/decidim/proposals/proposals/participatory_texts/participatory_text.html.erb +32 -15
- data/app/views/decidim/proposals/proposals/preview.html.erb +37 -34
- data/app/views/decidim/proposals/proposals/show.html.erb +90 -108
- data/app/views/decidim/proposals/versions/show.html.erb +14 -6
- data/config/assets.rb +0 -1
- data/config/brakeman.ignore +31 -56
- data/config/locales/ar.yml +23 -158
- data/config/locales/bg.yml +1 -776
- data/config/locales/ca.yml +92 -150
- data/config/locales/cs.yml +75 -135
- data/config/locales/de.yml +83 -141
- data/config/locales/el.yml +58 -121
- data/config/locales/en.yml +76 -134
- data/config/locales/es-MX.yml +77 -135
- data/config/locales/es-PY.yml +76 -134
- data/config/locales/es.yml +84 -142
- data/config/locales/eu.yml +77 -135
- data/config/locales/fi-plain.yml +68 -126
- data/config/locales/fi.yml +76 -134
- data/config/locales/fr-CA.yml +73 -132
- data/config/locales/fr.yml +77 -136
- data/config/locales/ga-IE.yml +0 -45
- data/config/locales/gl.yml +12 -131
- data/config/locales/hu.yml +45 -149
- data/config/locales/id-ID.yml +9 -114
- data/config/locales/is-IS.yml +5 -60
- data/config/locales/it.yml +14 -146
- data/config/locales/ja.yml +78 -141
- data/config/locales/lb.yml +0 -5
- data/config/locales/lt.yml +65 -126
- data/config/locales/lv.yml +13 -144
- data/config/locales/nl.yml +16 -148
- data/config/locales/no.yml +11 -134
- data/config/locales/pl.yml +16 -239
- data/config/locales/pt-BR.yml +14 -199
- data/config/locales/pt.yml +11 -142
- data/config/locales/ro-RO.yml +12 -146
- data/config/locales/ru.yml +5 -70
- data/config/locales/sk.yml +19 -145
- data/config/locales/sr-CS.yml +0 -23
- data/config/locales/sv.yml +60 -195
- data/config/locales/tr-TR.yml +16 -150
- data/config/locales/uk.yml +5 -70
- data/config/locales/zh-CN.yml +9 -135
- data/config/locales/zh-TW.yml +35 -107
- data/db/migrate/20170307085300_migrate_proposal_reports_data_to_reports.rb +1 -1
- data/db/migrate/20230427105700_change_states_on_collaborative_drafts.rb +34 -0
- data/db/migrate/20230427105700_change_states_on_proposals.rb +34 -0
- data/lib/decidim/api/proposals_type.rb +2 -2
- data/lib/decidim/proposals/component.rb +11 -289
- data/lib/decidim/proposals/doc_to_markdown.rb +0 -4
- data/lib/decidim/proposals/engine.rb +43 -7
- data/lib/decidim/proposals/import/proposal_answer_creator.rb +1 -1
- data/lib/decidim/proposals/import/proposal_creator.rb +10 -10
- data/lib/decidim/proposals/markdown_to_proposals.rb +8 -2
- data/lib/decidim/proposals/proposal_serializer.rb +4 -56
- data/lib/decidim/proposals/seeds.rb +278 -0
- data/lib/decidim/proposals/test/factories.rb +106 -85
- data/lib/decidim/proposals/valuatable.rb +1 -2
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +55 -66
- data/app/cells/decidim/proposals/collaborative_draft_m/footer.erb +0 -6
- data/app/cells/decidim/proposals/collaborative_draft_m/tags.erb +0 -1
- data/app/cells/decidim/proposals/collaborative_draft_m_cell.rb +0 -44
- data/app/cells/decidim/proposals/content_blocks/highlighted_proposals/elements.erb +0 -5
- data/app/cells/decidim/proposals/content_blocks/highlighted_proposals/heading.erb +0 -1
- data/app/cells/decidim/proposals/proposal_link_to_rejected_emendation/show.erb +0 -9
- data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -26
- data/app/cells/decidim/proposals/proposal_m/tags.erb +0 -1
- data/app/cells/decidim/proposals/proposal_m_cell.rb +0 -151
- data/app/cells/decidim/proposals/proposal_tags/show.erb +0 -33
- data/app/cells/decidim/proposals/proposal_tags_cell.rb +0 -35
- data/app/cells/decidim/proposals/proposals_picker/proposals.erb +0 -12
- data/app/controllers/concerns/decidim/proposals/admin/picker.rb +0 -21
- data/app/controllers/decidim/proposals/widgets_controller.rb +0 -29
- data/app/helpers/decidim/proposals/admin/filterable_helper.rb +0 -17
- data/app/helpers/decidim/proposals/admin/proposals_picker_helper.rb +0 -30
- data/app/packs/src/decidim/proposals/admin/proposals_picker.js +0 -50
- data/app/packs/stylesheets/decidim/proposals/_proposals.scss +0 -1
- data/app/packs/stylesheets/decidim/proposals/proposals/_preview.scss +0 -3
- data/app/views/decidim/proposals/collaborative_drafts/_count.html.erb +0 -1
- data/app/views/decidim/proposals/collaborative_drafts/_filters.html.erb +0 -32
- data/app/views/decidim/proposals/collaborative_drafts/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/proposals/collaborative_drafts/_new_collaborative_draft_button.html.erb +0 -11
- data/app/views/decidim/proposals/collaborative_drafts/_wizard_aside.html.erb +0 -13
- data/app/views/decidim/proposals/collaborative_drafts/_wizard_header.html.erb +0 -14
- data/app/views/decidim/proposals/proposals/_count.html.erb +0 -1
- data/app/views/decidim/proposals/proposals/_dynamic_map_instructions.html.erb +0 -4
- data/app/views/decidim/proposals/proposals/_filters.html.erb +0 -48
- data/app/views/decidim/proposals/proposals/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +0 -22
- data/app/views/decidim/proposals/proposals/_wizard_aside.html.erb +0 -20
- data/app/views/decidim/proposals/proposals/participatory_texts/_index.html.erb +0 -19
- data/app/views/decidim/proposals/versions/index.html.erb +0 -16
- data/config/locales/he-IL.yml +0 -1
- data/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb +0 -16
- data/decidim-proposals.gemspec +0 -40
- data/lib/decidim/proposals/test/capybara_proposals_picker.rb +0 -59
@@ -2,53 +2,39 @@ import attachGeocoding from "src/decidim/geocoding/attach_input"
|
|
2
2
|
import getCoordinateInputName from "src/decidim/geocoding/coordinate_input";
|
3
3
|
|
4
4
|
$(() => {
|
5
|
-
const $checkbox = $("input:checkbox[name$='[has_address]']");
|
6
|
-
const $addressInput = $("#address_input");
|
7
|
-
const $addressInputField = $("input", $addressInput);
|
8
5
|
const $map = $("#address_map");
|
9
|
-
|
10
|
-
let longFieldName = "longitude";
|
6
|
+
const $addressInputField = $("[data-decidim-geocoding]");
|
11
7
|
|
12
|
-
if ($
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
if ($map.length) {
|
9
|
+
if (!$addressInputField.data("coordinates")) {
|
10
|
+
$map.hide();
|
11
|
+
}
|
12
|
+
$addressInputField.on("geocoder-suggest-coordinates.decidim", () => $map.show());
|
16
13
|
|
17
|
-
|
14
|
+
let latFieldName = "latitude";
|
15
|
+
let longFieldName = "longitude";
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
$addressInput.show();
|
23
|
-
$addressInputField.prop("disabled", false);
|
24
|
-
} else {
|
25
|
-
$addressInput.hide();
|
26
|
-
$addressInputField.prop("disabled", true);
|
27
|
-
}
|
17
|
+
if ($addressInputField.length > 0) {
|
18
|
+
latFieldName = getCoordinateInputName("latitude", $addressInputField, {})
|
19
|
+
longFieldName = getCoordinateInputName("longitude", $addressInputField, {})
|
28
20
|
}
|
29
|
-
toggleInput();
|
30
|
-
$checkbox.on("change", toggleInput);
|
31
|
-
}
|
32
21
|
|
33
|
-
|
34
|
-
|
35
|
-
$map.show();
|
36
|
-
}
|
22
|
+
$("[data-decidim-map]").on("ready.decidim", (event) => {
|
23
|
+
const ctrl = $(event.target).data("map-controller");
|
37
24
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
});
|
25
|
+
ctrl.setEventHandler("coordinates", (ev) => {
|
26
|
+
$(`input[name='${latFieldName}']`).val(ev.lat);
|
27
|
+
$(`input[name='${longFieldName}']`).val(ev.lng);
|
28
|
+
});
|
43
29
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
30
|
+
attachGeocoding($addressInputField, null, (coordinates) => {
|
31
|
+
// Remove previous marker when user updates address in address field
|
32
|
+
ctrl.removeMarker();
|
33
|
+
ctrl.addMarker({
|
34
|
+
latitude: coordinates[0],
|
35
|
+
longitude: coordinates[1],
|
36
|
+
address: $addressInputField.val()
|
37
|
+
});
|
52
38
|
});
|
53
39
|
});
|
54
40
|
}
|
@@ -47,12 +47,6 @@ $(() => {
|
|
47
47
|
}
|
48
48
|
}
|
49
49
|
|
50
|
-
const resetForms = function() {
|
51
|
-
$("#js-bulk-actions-dropdown button").each(function() {
|
52
|
-
$(`#js-form-${$(this).data("action")}`)[0].reset();
|
53
|
-
})
|
54
|
-
}
|
55
|
-
|
56
50
|
const showOtherActionsButtons = function() {
|
57
51
|
$("#js-other-actions-wrapper").removeClass("hide");
|
58
52
|
}
|
@@ -74,7 +68,6 @@ $(() => {
|
|
74
68
|
window.showOtherActionsButtons = showOtherActionsButtons;
|
75
69
|
window.hideOtherActionsButtons = hideOtherActionsButtons;
|
76
70
|
window.hideBulkActionForms = hideBulkActionForms;
|
77
|
-
window.resetForms = resetForms;
|
78
71
|
|
79
72
|
if ($(".js-bulk-action-form").length) {
|
80
73
|
hideBulkActionForms();
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import TomSelect from "tom-select/dist/cjs/tom-select.popular";
|
2
|
+
|
3
|
+
document.addEventListener("DOMContentLoaded", () => {
|
4
|
+
const tagContainers = document.querySelectorAll("#proposals_list");
|
5
|
+
tagContainers.forEach((container) => {
|
6
|
+
const { tmName, tmItems, tmNoResults } = container.dataset
|
7
|
+
const config = {
|
8
|
+
plugins: ["remove_button", "dropdown_input"],
|
9
|
+
allowEmptyOption: true,
|
10
|
+
items: JSON.parse(tmItems),
|
11
|
+
render: {
|
12
|
+
item: (data, escape) => `<div>${escape(data.text)}<input type="hidden" name="${tmName}[]" value="${data.value}" /></div>`,
|
13
|
+
// eslint-disable-next-line camelcase
|
14
|
+
...(tmNoResults && { no_results: () => `<div class="no-results">${tmNoResults}</div>` })
|
15
|
+
}
|
16
|
+
};
|
17
|
+
|
18
|
+
return new TomSelect(container, config)
|
19
|
+
})
|
20
|
+
});
|
@@ -0,0 +1,97 @@
|
|
1
|
+
@import "tom-select/dist/scss/tom-select";
|
2
|
+
|
3
|
+
.proposal-list {
|
4
|
+
&__aside {
|
5
|
+
&__button-container {
|
6
|
+
@apply flex flex-col gap-4 md:gap-10 w-full;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
&__map {
|
11
|
+
/* negative main padding values */
|
12
|
+
@apply md:-ml-16 -mt-6 md:-mt-12 aspect-square md:aspect-[21/9] [&>*]:h-full [&+*]:mt-6 md:[&+*]:mt-12;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.proposal {
|
17
|
+
&__cost {
|
18
|
+
@apply space-y-3 bg-background rounded p-4 text-black;
|
19
|
+
|
20
|
+
&-period {
|
21
|
+
@apply text-gray-2 uppercase text-sm;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
&__aside {
|
26
|
+
&-vote {
|
27
|
+
@apply flex flex-row-reverse md:flex-col gap-4 items-center md:items-stretch justify-between first:[&>*]:grow last:[&>*]:w-1/4 md:last:[&>*]:w-auto;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
&__container {
|
32
|
+
[data-decidim-map] {
|
33
|
+
@apply aspect-[5/1];
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.proposal-participatory {
|
39
|
+
&__heading {
|
40
|
+
@apply pb-6 border-b-4 border-background font-sans font-semibold text-xl md:text-3xl;
|
41
|
+
}
|
42
|
+
|
43
|
+
&__section {
|
44
|
+
@apply p-4 rounded hover:bg-background-4 space-y-4 transition;
|
45
|
+
}
|
46
|
+
|
47
|
+
&__section + &__section {
|
48
|
+
@apply mt-2;
|
49
|
+
}
|
50
|
+
|
51
|
+
&__title {
|
52
|
+
@apply block font-semibold text-xl text-secondary;
|
53
|
+
}
|
54
|
+
|
55
|
+
&__text {
|
56
|
+
@apply text-md text-gray-2;
|
57
|
+
}
|
58
|
+
|
59
|
+
&__button {
|
60
|
+
@apply inline-flex items-center gap-1 px-0 md:px-6 border-gray-3 border-0 md:border-r first:pl-0 last:pr-0 last:border-r-0 text-sm text-secondary;
|
61
|
+
|
62
|
+
& > span {
|
63
|
+
@apply underline;
|
64
|
+
}
|
65
|
+
|
66
|
+
& > svg {
|
67
|
+
@apply w-3.5 h-3.5 fill-current text-gray;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
&__section:hover &__title {
|
72
|
+
@apply underline;
|
73
|
+
}
|
74
|
+
|
75
|
+
&__section:hover .label {
|
76
|
+
@apply text-white bg-secondary;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
/* overwrite tom-select defaults */
|
81
|
+
.ts {
|
82
|
+
&-control {
|
83
|
+
@apply border-gray text-md min-h-[40px];
|
84
|
+
|
85
|
+
input {
|
86
|
+
@apply font-normal text-black text-md;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
&-dropdown {
|
91
|
+
@apply text-md text-gray-2 font-normal;
|
92
|
+
|
93
|
+
.active {
|
94
|
+
@apply text-white bg-secondary;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
@@ -72,7 +72,7 @@ module Decidim
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def user_valuator_role
|
75
|
-
@user_valuator_role ||= space.user_roles(:valuator).find_by(user:
|
75
|
+
@user_valuator_role ||= space.user_roles(:valuator).find_by(user:)
|
76
76
|
end
|
77
77
|
|
78
78
|
def user_is_valuator?
|
@@ -84,7 +84,7 @@ module Decidim
|
|
84
84
|
def valuator_assigned_to_proposal?
|
85
85
|
@valuator_assigned_to_proposal ||=
|
86
86
|
Decidim::Proposals::ValuationAssignment
|
87
|
-
.where(proposal
|
87
|
+
.where(proposal:, valuator_role: user_valuator_role)
|
88
88
|
.any?
|
89
89
|
end
|
90
90
|
|
@@ -112,7 +112,7 @@ module Decidim
|
|
112
112
|
component_settings.participatory_texts_enabled?
|
113
113
|
end
|
114
114
|
|
115
|
-
# There
|
115
|
+
# There is no special condition to create proposal notes, only
|
116
116
|
# users with access to the admin section can do it.
|
117
117
|
def can_create_proposal_note?
|
118
118
|
allow! if permission_action.subject == :proposal_note
|
@@ -4,7 +4,6 @@ module Decidim
|
|
4
4
|
module Proposals
|
5
5
|
class Permissions < Decidim::DefaultPermissions
|
6
6
|
def permissions
|
7
|
-
allow_embed_proposal?
|
8
7
|
return permission_action unless user
|
9
8
|
|
10
9
|
# Delegate the admin permission checks to the admin permissions class
|
@@ -48,14 +47,6 @@ module Decidim
|
|
48
47
|
@proposal ||= context.fetch(:proposal, nil) || context.fetch(:resource, nil)
|
49
48
|
end
|
50
49
|
|
51
|
-
# As this is a public action, we need to run this before other checks
|
52
|
-
def allow_embed_proposal?
|
53
|
-
return unless permission_action.action == :embed && permission_action.subject == :proposal && proposal
|
54
|
-
return disallow! if proposal.withdrawn?
|
55
|
-
|
56
|
-
allow!
|
57
|
-
end
|
58
|
-
|
59
50
|
def voting_enabled?
|
60
51
|
return unless current_settings
|
61
52
|
|
@@ -71,7 +62,7 @@ module Decidim
|
|
71
62
|
def remaining_votes
|
72
63
|
return 1 unless vote_limit_enabled?
|
73
64
|
|
74
|
-
proposals = Proposal.where(component:
|
65
|
+
proposals = Proposal.where(component:)
|
75
66
|
votes_count = ProposalVote.where(author: user, proposal: proposals).size
|
76
67
|
component_settings.vote_limit - votes_count
|
77
68
|
end
|
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::Proposals::ProposalNote`
|
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
|
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::Proposals::Proposal`
|
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
|
@@ -15,9 +15,13 @@ module Decidim
|
|
15
15
|
class ProposalPresenter < Decidim::Log::BasePresenter
|
16
16
|
private
|
17
17
|
|
18
|
+
def resource_presenter
|
19
|
+
@resource_presenter ||= Decidim::Proposals::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"])
|
20
|
+
end
|
21
|
+
|
18
22
|
def diff_fields_mapping
|
19
23
|
{
|
20
|
-
title:
|
24
|
+
title: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter",
|
21
25
|
body: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter",
|
22
26
|
state: "Decidim::Proposals::AdminLog::ValueTypes::ProposalStatePresenter",
|
23
27
|
answered_at: :date,
|
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::Proposals::ValuationAssignment`
|
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
|
data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb
CHANGED
@@ -5,10 +5,12 @@ module Decidim
|
|
5
5
|
module AdminLog
|
6
6
|
module ValueTypes
|
7
7
|
class ProposalTitleBodyPresenter < Decidim::Log::ValueTypes::DefaultPresenter
|
8
|
+
include Decidim::TranslatableAttributes
|
9
|
+
|
8
10
|
def present
|
9
11
|
return unless value
|
10
12
|
|
11
|
-
translated_value =
|
13
|
+
translated_value = translated_attribute(value)
|
12
14
|
return if translated_value.blank?
|
13
15
|
|
14
16
|
renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_value)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Proposals
|
5
|
+
module Log
|
6
|
+
class ResourcePresenter < Decidim::Log::ResourcePresenter
|
7
|
+
private
|
8
|
+
|
9
|
+
# Private: Presents resource name.
|
10
|
+
#
|
11
|
+
# Returns an HTML-safe String.
|
12
|
+
def present_resource_name
|
13
|
+
if resource.present?
|
14
|
+
Decidim::Proposals::ProposalPresenter.new(resource).title
|
15
|
+
else
|
16
|
+
super
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -40,11 +40,11 @@ module Decidim
|
|
40
40
|
def title(links: false, extras: true, html_escape: false, all_locales: false)
|
41
41
|
return unless proposal
|
42
42
|
|
43
|
-
super proposal.title, links, html_escape, all_locales, extras:
|
43
|
+
super proposal.title, links, html_escape, all_locales, extras:
|
44
44
|
end
|
45
45
|
|
46
46
|
def id_and_title(links: false, extras: true, html_escape: false)
|
47
|
-
"##{proposal.id} - #{title(links
|
47
|
+
"##{proposal.id} - #{title(links:, extras:, html_escape:)}"
|
48
48
|
end
|
49
49
|
|
50
50
|
def body(links: false, extras: true, strip_tags: false, all_locales: false)
|
@@ -53,6 +53,10 @@ module Decidim
|
|
53
53
|
content_handle_locale(proposal.body, all_locales, extras, links, strip_tags)
|
54
54
|
end
|
55
55
|
|
56
|
+
def editor_body(all_locales: false, extras: true)
|
57
|
+
editor_locales(proposal.body, all_locales, extras:)
|
58
|
+
end
|
59
|
+
|
56
60
|
# Returns the proposal versions, hiding not published answers
|
57
61
|
#
|
58
62
|
# Returns an Array.
|
@@ -82,15 +82,15 @@ module Decidim
|
|
82
82
|
proposal = if author.nil?
|
83
83
|
create_with_authors(
|
84
84
|
attributes: origin_attributes,
|
85
|
-
original_proposal
|
86
|
-
action_user:
|
85
|
+
original_proposal:,
|
86
|
+
action_user:
|
87
87
|
)
|
88
88
|
else
|
89
89
|
create(
|
90
90
|
attributes: origin_attributes,
|
91
|
-
author
|
92
|
-
user_group_author
|
93
|
-
action_user:
|
91
|
+
author:,
|
92
|
+
user_group_author:,
|
93
|
+
action_user:
|
94
94
|
)
|
95
95
|
end
|
96
96
|
|
@@ -122,7 +122,7 @@ module Decidim
|
|
122
122
|
|
123
123
|
new_attachment.save!
|
124
124
|
rescue Errno::ENOENT, OpenURI::HTTPError => e
|
125
|
-
Rails.logger.warn("[ERROR]
|
125
|
+
Rails.logger.warn("[ERROR] Could not copy attachment from proposal #{original_proposal.id} when copying to component due to #{e.message}")
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
@@ -3,11 +3,9 @@
|
|
3
3
|
<%= form.hidden_field :position, class: "position" %>
|
4
4
|
<%= form.text_field :title, required: true %>
|
5
5
|
</div>
|
6
|
-
|
7
|
-
<% if proposal.article? %>
|
8
|
-
<div class="grid-x">
|
6
|
+
<% if proposal.article? %>
|
9
7
|
<div class="cell">
|
10
8
|
<%= form.text_area :body, required: true, rows: 5 %>
|
11
9
|
</div>
|
10
|
+
<% end %>
|
12
11
|
</div>
|
13
|
-
<% end %>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<%= link_to t(".discard_all"), discard_participatory_texts_path, method: "POST", id: "discard-all", class: "button
|
2
|
-
<%= link_to t(".import_doc"), new_import_participatory_texts_path, id: "import-doc", class: "button
|
1
|
+
<%= link_to t(".discard_all"), discard_participatory_texts_path, method: "POST", id: "discard-all", class: "button button__sm button__secondary alert", data: { confirm: t(".are_you_sure") } %>
|
2
|
+
<%= link_to t(".import_doc"), new_import_participatory_texts_path, id: "import-doc", class: "button button__sm button__secondary" %>
|
@@ -1,54 +1,66 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</div>
|
9
|
-
<div class="card-section">
|
10
|
-
<% if @drafts.any? %>
|
11
|
-
<p><%= t(".info_1") %></p>
|
12
|
-
<ul id="participatory-text" class="accordion js-sortable mb-m"
|
13
|
-
data-accordion
|
14
|
-
data-multi-expand="true"
|
15
|
-
data-allow-all-closed="true">
|
16
|
-
<%= form.fields_for(:proposals) do |prop_form| %>
|
17
|
-
<% proposal= @drafts[prop_form.index] %>
|
18
|
-
<li class="accordion-item <%= proposal.article? ? "is-active" : nil %>" data-accordion-item>
|
19
|
-
<a href="#" class="accordion-title flex--sbc"><%= preview_participatory_text_section_title(proposal) %><span class="mr-m"><%= icon "menu", class: "icon--small", role: "img", "aria-hidden": true %></span></a>
|
20
|
-
<div class="accordion-content" data-tab-content>
|
21
|
-
<%= render "article-preview", { form: prop_form, proposal: proposal } %>
|
22
|
-
</div>
|
23
|
-
</li>
|
24
|
-
<% end %>
|
25
|
-
</ul>
|
26
|
-
<% end -%>
|
27
|
-
</div>
|
1
|
+
<% add_decidim_page_title(t(".title")) %>
|
2
|
+
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h2 class="item_show__header-title">
|
5
|
+
<%= t(".title") %>
|
6
|
+
<%= render partial: "bulk-actions" %>
|
7
|
+
</h2>
|
28
8
|
</div>
|
29
9
|
<% if @drafts.any? %>
|
30
|
-
<div class="
|
31
|
-
|
32
|
-
|
10
|
+
<div class="item__edit item__edit-1col">
|
11
|
+
<div class="item__edit-form">
|
12
|
+
<%= decidim_form_for(@preview_form, url: participatory_texts_path, html: { class: "form-defaults form grid-container" }) do |form| %>
|
13
|
+
<div class="form__wrapper">
|
14
|
+
<div class="card">
|
15
|
+
<div class="row column">
|
16
|
+
<p class="mt-3"><%= t(".info_1") %></p>
|
17
|
+
<ul id="participatory-text" class="draggable-list js-connect js-list-actives accordion mb-m mt-2.5 ml-2.5 mr-2.5"
|
18
|
+
data-accordion
|
19
|
+
data-sort-url="#"
|
20
|
+
data-multi-expand="true"
|
21
|
+
data-allow-all-closed="true">
|
22
|
+
<%= form.fields_for(:proposals) do |prop_form| %>
|
23
|
+
<% proposal = @drafts[prop_form.index] %>
|
24
|
+
|
25
|
+
<li class="py-4 draggable-content <%= proposal.article? ? "is-active" : nil %>" data-accordion-item draggable="true">
|
26
|
+
<a href="#" class="accordion-title font-bold mt-5"><%= preview_participatory_text_section_title(proposal) %>
|
27
|
+
<span class="mr-m"><%= icon "menu-line", class: "fill-black" %></span>
|
28
|
+
</a>
|
29
|
+
<div class="accordion-content" data-tab-content>
|
30
|
+
<%= render "article-preview", { form: prop_form, proposal: } %>
|
31
|
+
</div>
|
32
|
+
</li>
|
33
|
+
<% end %>
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<div class="item__edit-sticky">
|
39
|
+
<div class="item__edit-sticky-container">
|
40
|
+
<%= form.submit t(".save_draft"), name: :save_draft, class: "button button__sm button__secondary" %>
|
41
|
+
<%= form.submit t(".publish_document"), class: "button button__sm button__secondary" %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<% end -%>
|
45
|
+
</div>
|
33
46
|
</div>
|
34
47
|
<% end %>
|
35
|
-
<% end -%>
|
36
48
|
<script>
|
37
|
-
$(window).on("load", function() {
|
38
|
-
|
39
|
-
|
40
|
-
|
49
|
+
$(window).on("load", function() {
|
50
|
+
// Not all browsers submit the buttons as form data.
|
51
|
+
$("button[name=\"save_draft\"]").on("click", function(ev) {
|
52
|
+
ev.preventDefault();
|
41
53
|
|
42
|
-
|
43
|
-
|
44
|
-
|
54
|
+
var $form = $(this).parents("form");
|
55
|
+
$form.append("<input type=\"hidden\" name=\"save_draft\" value=\"true\" />");
|
56
|
+
$form.submit();
|
57
|
+
});
|
58
|
+
$("#participatory-text").on("sortupdate",
|
59
|
+
function(event, ui) {
|
60
|
+
$("#participatory-text li").each(function(idx, li) {
|
61
|
+
input = $(li).find("input.position").val(idx + 1);
|
62
|
+
});
|
63
|
+
}
|
64
|
+
);
|
45
65
|
});
|
46
|
-
$( "#participatory-text" ).on( "sortupdate",
|
47
|
-
function( event, ui ) {
|
48
|
-
$('#participatory-text li').each(function(idx, li) {
|
49
|
-
input= $(li).find("input.position").val(idx+1)
|
50
|
-
})
|
51
|
-
}
|
52
|
-
)
|
53
|
-
})
|
54
66
|
</script>
|
@@ -1,39 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
<% add_decidim_page_title(t(".title")) %>
|
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(@import, url: import_participatory_texts_path, html: { class: "form form-defaults grid-container" }) do |form| %>
|
10
|
+
<div class="form__wrapper">
|
11
|
+
<div class="card pt-4">
|
12
|
+
<div class="card-section">
|
13
|
+
<div id="import-title" class="row column">
|
14
|
+
<%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div id="import-desc" class="row column">
|
18
|
+
<%= form.translated :text_area, :description, aria: { label: :description } %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="row column">
|
22
|
+
<%= form.upload :document, label: t(".document_legend", valid_mime_types: mime_types_with_document_examples).html_safe, button_class: "button button__sm button__transparent-secondary" %>
|
23
|
+
</div>
|
11
24
|
</div>
|
12
25
|
</div>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
26
|
+
<div class="item__edit-sticky">
|
27
|
+
<div class="item__edit-sticky-container">
|
28
|
+
<div class="flex-col-reverse md:flex-row justify-between text-white">
|
29
|
+
<%= t(".bottom_hint") %>
|
30
|
+
<%= form.submit t(".upload_document"), class: "button button__sm button__secondary" %>
|
31
|
+
</div>
|
18
32
|
</div>
|
19
33
|
</div>
|
20
34
|
</div>
|
21
|
-
|
22
|
-
<div class="cell">
|
23
|
-
<fieldset>
|
24
|
-
<legend> <%= t(".document_legend", valid_mime_types: mime_types_with_document_examples).html_safe %> </legend>
|
25
|
-
<div class="row column">
|
26
|
-
<%= form.upload :document, required: true %>
|
27
|
-
</div>
|
28
|
-
</fieldset>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
<div class="grid-x align-center mt-sm">
|
34
|
-
<%= form.submit t(".upload_document") %>
|
35
|
-
</div>
|
36
|
-
<div class="grid-x align-center">
|
37
|
-
<%= t(".bottom_hint") %>
|
35
|
+
<% end -%>
|
38
36
|
</div>
|
39
|
-
|
37
|
+
</div>
|