decidim-proposals 0.27.4 → 0.28.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- 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/concerns/decidim/proposals/orderable.rb +2 -2
- 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 +79 -27
- 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 +19 -14
- data/app/models/decidim/proposals/proposal_vote.rb +3 -3
- 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/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 -1
- data/app/presenters/decidim/proposals/admin_log/proposal_note_presenter.rb +2 -2
- data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +2 -2
- data/app/presenters/decidim/proposals/admin_log/valuation_assignment_presenter.rb +2 -2
- 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 +30 -24
- 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 -157
- data/app/views/decidim/proposals/admin/proposals/update_attribute.js.erb +4 -4
- 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 -106
- data/app/views/decidim/proposals/versions/show.html.erb +13 -5
- data/config/assets.rb +0 -1
- data/config/brakeman.ignore +31 -56
- data/config/environment.rb +3 -0
- data/config/locales/ar.yml +17 -156
- data/config/locales/bg.yml +0 -18
- data/config/locales/ca.yml +62 -118
- data/config/locales/cs.yml +71 -129
- data/config/locales/de.yml +69 -125
- data/config/locales/el.yml +54 -121
- data/config/locales/en.yml +76 -132
- data/config/locales/es-MX.yml +70 -126
- data/config/locales/es-PY.yml +69 -125
- data/config/locales/es.yml +66 -122
- data/config/locales/eu.yml +194 -248
- data/config/locales/fi-plain.yml +63 -119
- data/config/locales/fi.yml +63 -119
- data/config/locales/fr-CA.yml +66 -121
- data/config/locales/fr.yml +84 -139
- data/config/locales/ga-IE.yml +0 -32
- data/config/locales/gl.yml +7 -129
- data/config/locales/hu.yml +38 -133
- data/config/locales/id-ID.yml +5 -109
- data/config/locales/is-IS.yml +0 -56
- data/config/locales/it.yml +7 -139
- data/config/locales/ja.yml +61 -122
- data/config/locales/lb.yml +0 -5
- data/config/locales/lt.yml +84 -124
- data/config/locales/lv.yml +9 -139
- data/config/locales/nl.yml +8 -142
- data/config/locales/no.yml +7 -132
- data/config/locales/pl.yml +11 -144
- data/config/locales/pt-BR.yml +9 -136
- data/config/locales/pt.yml +7 -138
- data/config/locales/ro-RO.yml +9 -145
- data/config/locales/ru.yml +1 -64
- data/config/locales/sk.yml +11 -136
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sr-CS.yml +0 -23
- data/config/locales/sv.yml +20 -138
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +8 -138
- data/config/locales/uk.yml +1 -64
- data/config/locales/zh-CN.yml +5 -130
- data/config/locales/zh-TW.yml +31 -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 -4
- data/lib/decidim/proposals/seeds.rb +278 -0
- data/lib/decidim/proposals/test/factories.rb +62 -22
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +55 -62
- 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 -19
- 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/lib/decidim/proposals/test/capybara_proposals_picker.rb +0 -59
@@ -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
|
@@ -62,7 +62,7 @@ module Decidim
|
|
62
62
|
def remaining_votes
|
63
63
|
return 1 unless vote_limit_enabled?
|
64
64
|
|
65
|
-
proposals = Proposal.where(component:
|
65
|
+
proposals = Proposal.where(component:)
|
66
66
|
votes_count = ProposalVote.where(author: user, proposal: proposals).size
|
67
67
|
component_settings.vote_limit - votes_count
|
68
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
|
@@ -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
|
@@ -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>
|
@@ -1,12 +1,17 @@
|
|
1
|
-
<%= decidim_form_for(@answer_form, url: proposal_proposal_answer_path(proposal, @answer_form), html: { class: "form edit_proposal_answer" }) do |f| %>
|
2
|
-
<div class="
|
3
|
-
<div class="card-
|
4
|
-
<
|
5
|
-
|
1
|
+
<%= decidim_form_for(@answer_form, url: proposal_proposal_answer_path(proposal, @answer_form), html: { class: "form form-defaults edit_proposal_answer" }) do |f| %>
|
2
|
+
<div class="form__wrapper">
|
3
|
+
<div class="card" id="proposal-answer">
|
4
|
+
<div class="card-divider">
|
5
|
+
<h2 class="card-title"><%= t ".title", title: present(proposal).title %></h2>
|
6
|
+
</div>
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
<% if defined?(Decidim::Templates) %>
|
9
|
+
<%= render "decidim/templates/admin/proposal_answer_templates/template_chooser", form: f %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="row column flex items-center gap-x-4 my-2">
|
13
|
+
<%= f.collection_radio_buttons :internal_state, [["not_answered", t(".not_answered")], ["accepted", t(".accepted")], ["rejected", t(".rejected")], ["evaluating", t(".evaluating")]], :first, :last, prompt: true do |builder|
|
14
|
+
builder.label { builder.radio_button + builder.text } end %>
|
10
15
|
</div>
|
11
16
|
|
12
17
|
<div class="row column">
|
@@ -28,8 +33,9 @@
|
|
28
33
|
<% end %>
|
29
34
|
</div>
|
30
35
|
</div>
|
31
|
-
|
32
|
-
|
33
|
-
|
36
|
+
<div class="item__edit-sticky">
|
37
|
+
<div class="item__edit-sticky-container">
|
38
|
+
<%= f.submit t(".answer_proposal"), class: "button button__sm button__secondary" %>
|
39
|
+
</div>
|
34
40
|
</div>
|
35
41
|
<% end %>
|
@@ -1,8 +1,7 @@
|
|
1
|
-
<%= decidim_form_for(@notes_form, url: proposal_proposal_notes_path(proposal, @notes_form), html: { class: "form new_proposal_note" }) do |f| %>
|
2
|
-
<div class="
|
3
|
-
<%= f.text_area :body, rows:
|
4
|
-
</div>
|
5
|
-
<div class="button--double form-general-submit">
|
6
|
-
<%= f.submit t(".submit") %>
|
1
|
+
<%= decidim_form_for(@notes_form, url: proposal_proposal_notes_path(proposal, @notes_form), html: { class: "form form-defaults new_proposal_note" }) do |f| %>
|
2
|
+
<div class="form__wrapper">
|
3
|
+
<%= f.text_area :body, rows: 4, label: t(".note"), class: "rounded border border-text-gray-2 mt-2" %>
|
7
4
|
</div>
|
5
|
+
|
6
|
+
<%= f.submit t(".submit"), class: "button button__sm button__secondary" %>
|
8
7
|
<% end %>
|
@@ -1,45 +1,37 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<span><%= l note.created_at, format: :decidim_short %></span>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<div class="comment__content">
|
24
|
-
<%= simple_format note.body %>
|
1
|
+
<div class="component__show_notes" data-component="accordion" id="accordion-notes">
|
2
|
+
<button class="card-divider-button" data-controls="panel-notes" type="button">
|
3
|
+
<%= icon "arrow-right-s-line" %>
|
4
|
+
<h2 class="card-title">
|
5
|
+
<%= t("title", scope: "decidim.proposals.admin.proposal_notes") %>
|
6
|
+
</h2>
|
7
|
+
</button>
|
8
|
+
<div id="panel-notes">
|
9
|
+
<div class="component__show_notes-grid">
|
10
|
+
<% proposal.notes.each do |note| %>
|
11
|
+
<div class="comment">
|
12
|
+
<div class="comment__header">
|
13
|
+
<div class="author-data">
|
14
|
+
<div class="author-data__main">
|
15
|
+
<div class="author author--inline">
|
16
|
+
<strong><span class="author__name"><%= note.author.name %></span></strong>
|
17
|
+
<span><%= l note.created_at, format: :decidim_short %></span>
|
25
18
|
</div>
|
26
19
|
</div>
|
27
20
|
</div>
|
28
21
|
</div>
|
29
|
-
|
30
|
-
|
31
|
-
</div>
|
32
|
-
<div class="card-section">
|
33
|
-
<div class="add-comment">
|
34
|
-
<div class="card">
|
35
|
-
<div class="card-divider">
|
36
|
-
<h2 class="card-title"><%= t("leave_your_note", scope: "decidim.proposals.admin.proposal_notes") %></h2>
|
37
|
-
</div>
|
38
|
-
<div class="card-section">
|
39
|
-
<%= render "decidim/proposals/admin/proposal_notes/form" %>
|
22
|
+
<div class="comment__content">
|
23
|
+
<%= simple_format note.body %>
|
40
24
|
</div>
|
41
25
|
</div>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
<div class="card add-comment">
|
29
|
+
<div class="card-divider">
|
30
|
+
<h2 class="card-title"><%= t("leave_your_note", scope: "decidim.proposals.admin.proposal_notes") %></h2>
|
31
|
+
</div>
|
32
|
+
<div class="card-section">
|
33
|
+
<%= render "decidim/proposals/admin/proposal_notes/form" %>
|
42
34
|
</div>
|
43
35
|
</div>
|
44
36
|
</div>
|
45
|
-
</
|
37
|
+
</div>
|
@@ -1,38 +1,35 @@
|
|
1
|
-
<div class="flex
|
1
|
+
<div class="flex align-middle gap-x-4 ml-auto" id="js-other-actions-wrapper">
|
2
2
|
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/dropdown" %>
|
3
|
+
<% if component_settings.participatory_texts_enabled? %>
|
4
|
+
<%= link_to t("actions.participatory_texts", scope: "decidim.proposals"), participatory_texts_path, id: "participatory_texts", class: "button button__sm button__secondary" %>
|
5
|
+
<% end %>
|
3
6
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<% end %>
|
8
|
-
|
9
|
-
<% if allowed_to? :export, :proposals %>
|
10
|
-
<%= export_dropdown %>
|
11
|
-
<% end %>
|
7
|
+
<% if allowed_to? :export, :proposals %>
|
8
|
+
<%= export_dropdowns(query) %>
|
9
|
+
<% end %>
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
<% if allowed_to? :import, :proposals %>
|
12
|
+
<%= import_dropdown do %>
|
13
|
+
<li class="imports--component imports--proposals">
|
14
|
+
<%= link_to t("actions.import", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposals_import_path %>
|
15
|
+
</li>
|
16
|
+
<% current_component.manifest.import_manifests.each do |import_manifest| %>
|
17
|
+
<li class="imports--file imports--<%= import_manifest.name %>">
|
18
|
+
<%= link_to import_manifest.message(:label, self), admin_imports_path(current_component, name: import_manifest.name) %>
|
17
19
|
</li>
|
18
|
-
<% current_component.manifest.import_manifests.each do |import_manifest| %>
|
19
|
-
<li class="imports--file imports--<%= import_manifest.name %>">
|
20
|
-
<%= link_to import_manifest.message(:label, self), admin_imports_path(current_component, name: import_manifest.name) %>
|
21
|
-
</li>
|
22
|
-
<% end %>
|
23
20
|
<% end %>
|
24
21
|
<% end %>
|
22
|
+
<% end %>
|
25
23
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/recategorize" %>
|
32
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/scope-change" %>
|
33
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/merge" %>
|
34
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/split" %>
|
35
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/assign_to_valuator" %>
|
36
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/unassign_from_valuator" %>
|
37
|
-
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/publish_answers" %>
|
24
|
+
<% if allowed_to? :create, :proposal %>
|
25
|
+
<%= link_to t("actions.new", scope: "decidim.proposals"), new_proposal_path, class: "button button__sm button__secondary" %>
|
26
|
+
<% end %>
|
38
27
|
</div>
|
28
|
+
|
29
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/recategorize" %>
|
30
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/scope-change" %>
|
31
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/merge" %>
|
32
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/split" %>
|
33
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/assign_to_valuator" %>
|
34
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/unassign_from_valuator" %>
|
35
|
+
<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/publish_answers" %>
|