decidim-enhanced_textwork 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +64 -0
- data/Rakefile +3 -0
- data/app/cells/decidim/enhanced_textwork/amendment/show.erb +14 -0
- data/app/cells/decidim/enhanced_textwork/amendment_cell.rb +39 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_draft_cell.rb +49 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_draft_link_to_paragraph/show.erb +13 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_draft_link_to_paragraph_cell.rb +57 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_draft_m/footer.erb +6 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_draft_m/tags.erb +1 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_draft_m_cell.rb +44 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_drafts/reported_content/show.erb +3 -0
- data/app/cells/decidim/enhanced_textwork/collaborative_drafts/reported_content_cell.rb +15 -0
- data/app/cells/decidim/enhanced_textwork/comments/show.erb +33 -0
- data/app/cells/decidim/enhanced_textwork/comments_cell.rb +8 -0
- data/app/cells/decidim/enhanced_textwork/content_blocks/highlighted_paragraphs/elements.erb +5 -0
- data/app/cells/decidim/enhanced_textwork/content_blocks/highlighted_paragraphs/heading.erb +1 -0
- data/app/cells/decidim/enhanced_textwork/content_blocks/highlighted_paragraphs_cell.rb +19 -0
- data/app/cells/decidim/enhanced_textwork/cost_report/show.erb +35 -0
- data/app/cells/decidim/enhanced_textwork/cost_report_cell.rb +42 -0
- data/app/cells/decidim/enhanced_textwork/highlighted_paragraphs/show.erb +3 -0
- data/app/cells/decidim/enhanced_textwork/highlighted_paragraphs_cell.rb +25 -0
- data/app/cells/decidim/enhanced_textwork/highlighted_paragraphs_for_component/show.erb +19 -0
- data/app/cells/decidim/enhanced_textwork/highlighted_paragraphs_for_component_cell.rb +41 -0
- data/app/cells/decidim/enhanced_textwork/irreversible_action_modal/show.erb +27 -0
- data/app/cells/decidim/enhanced_textwork/irreversible_action_modal_cell.rb +80 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_activity_cell.rb +35 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_cell.rb +53 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_link_to_collaborative_draft_cell.rb +26 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_link_to_rejected_emendation/show.erb +9 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_link_to_rejected_emendation_cell.rb +34 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_linked_resources/show.erb +9 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_linked_resources_cell.rb +14 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_m/footer.erb +26 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_m/tags.erb +1 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_m_cell.rb +152 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_tags/show.erb +33 -0
- data/app/cells/decidim/enhanced_textwork/paragraph_tags_cell.rb +35 -0
- data/app/cells/decidim/enhanced_textwork/paragraphs_picker/paragraphs.erb +12 -0
- data/app/cells/decidim/enhanced_textwork/paragraphs_picker/show.erb +14 -0
- data/app/cells/decidim/enhanced_textwork/paragraphs_picker_cell.rb +72 -0
- data/app/cells/decidim/enhanced_textwork/participatory_text_paragraph/buttons.erb +33 -0
- data/app/cells/decidim/enhanced_textwork/participatory_text_paragraph/show.erb +38 -0
- data/app/cells/decidim/enhanced_textwork/participatory_text_paragraph_cell.rb +104 -0
- data/app/cells/decidim/enhanced_textwork/reported_content/show.erb +4 -0
- data/app/cells/decidim/enhanced_textwork/reported_content_cell.rb +13 -0
- data/app/commands/decidim/enhanced_textwork/accept_access_to_collaborative_draft.rb +70 -0
- data/app/commands/decidim/enhanced_textwork/admin/answer_paragraph.rb +74 -0
- data/app/commands/decidim/enhanced_textwork/admin/assign_paragraphs_to_valuator.rb +61 -0
- data/app/commands/decidim/enhanced_textwork/admin/create_paragraph.rb +97 -0
- data/app/commands/decidim/enhanced_textwork/admin/create_paragraph_note.rb +67 -0
- data/app/commands/decidim/enhanced_textwork/admin/destroy_paragraph.rb +32 -0
- data/app/commands/decidim/enhanced_textwork/admin/discard_participatory_text.rb +40 -0
- data/app/commands/decidim/enhanced_textwork/admin/import_from_editor_participatory_text.rb +53 -0
- data/app/commands/decidim/enhanced_textwork/admin/import_paragraphs.rb +101 -0
- data/app/commands/decidim/enhanced_textwork/admin/import_participatory_text.rb +55 -0
- data/app/commands/decidim/enhanced_textwork/admin/merge_paragraphs.rb +69 -0
- data/app/commands/decidim/enhanced_textwork/admin/notify_paragraph_answer.rb +85 -0
- data/app/commands/decidim/enhanced_textwork/admin/publish_answers.rb +67 -0
- data/app/commands/decidim/enhanced_textwork/admin/publish_participatory_text.rb +81 -0
- data/app/commands/decidim/enhanced_textwork/admin/split_paragraphs.rb +67 -0
- data/app/commands/decidim/enhanced_textwork/admin/unassign_paragraphs_from_valuator.rb +62 -0
- data/app/commands/decidim/enhanced_textwork/admin/update_paragraph.rb +86 -0
- data/app/commands/decidim/enhanced_textwork/admin/update_paragraph_category.rb +68 -0
- data/app/commands/decidim/enhanced_textwork/admin/update_paragraph_scope.rb +75 -0
- data/app/commands/decidim/enhanced_textwork/admin/update_participatory_text.rb +68 -0
- data/app/commands/decidim/enhanced_textwork/create_collaborative_draft.rb +81 -0
- data/app/commands/decidim/enhanced_textwork/create_paragraph.rb +106 -0
- data/app/commands/decidim/enhanced_textwork/destroy_paragraph.rb +33 -0
- data/app/commands/decidim/enhanced_textwork/gallery_methods.rb +18 -0
- data/app/commands/decidim/enhanced_textwork/hashtags_methods.rb +36 -0
- data/app/commands/decidim/enhanced_textwork/publish_collaborative_draft.rb +93 -0
- data/app/commands/decidim/enhanced_textwork/publish_paragraph.rb +105 -0
- data/app/commands/decidim/enhanced_textwork/reject_access_to_collaborative_draft.rb +62 -0
- data/app/commands/decidim/enhanced_textwork/request_access_to_collaborative_draft.rb +49 -0
- data/app/commands/decidim/enhanced_textwork/unvote_paragraph.rb +65 -0
- data/app/commands/decidim/enhanced_textwork/update_collaborative_draft.rb +63 -0
- data/app/commands/decidim/enhanced_textwork/update_paragraph.rb +135 -0
- data/app/commands/decidim/enhanced_textwork/vote_paragraph.rb +77 -0
- data/app/commands/decidim/enhanced_textwork/withdraw_collaborative_draft.rb +65 -0
- data/app/commands/decidim/enhanced_textwork/withdraw_paragraph.rb +50 -0
- data/app/controllers/concerns/decidim/enhanced_textwork/admin/filterable.rb +82 -0
- data/app/controllers/concerns/decidim/enhanced_textwork/admin/picker.rb +21 -0
- data/app/controllers/concerns/decidim/enhanced_textwork/collaborative_orderable.rb +42 -0
- data/app/controllers/concerns/decidim/enhanced_textwork/orderable.rb +78 -0
- data/app/controllers/decidim/enhanced_textwork/admin/application_controller.rb +16 -0
- data/app/controllers/decidim/enhanced_textwork/admin/paragraph_answers_controller.rb +50 -0
- data/app/controllers/decidim/enhanced_textwork/admin/paragraph_notes_controller.rb +39 -0
- data/app/controllers/decidim/enhanced_textwork/admin/paragraphs_controller.rb +237 -0
- data/app/controllers/decidim/enhanced_textwork/admin/paragraphs_imports_controller.rb +33 -0
- data/app/controllers/decidim/enhanced_textwork/admin/paragraphs_merges_controller.rb +30 -0
- data/app/controllers/decidim/enhanced_textwork/admin/paragraphs_splits_controller.rb +30 -0
- data/app/controllers/decidim/enhanced_textwork/admin/participatory_texts_controller.rb +128 -0
- data/app/controllers/decidim/enhanced_textwork/admin/valuation_assignments_controller.rb +58 -0
- data/app/controllers/decidim/enhanced_textwork/application_controller.rb +31 -0
- data/app/controllers/decidim/enhanced_textwork/collaborative_draft_collaborator_requests_controller.rb +53 -0
- data/app/controllers/decidim/enhanced_textwork/collaborative_drafts_controller.rb +161 -0
- data/app/controllers/decidim/enhanced_textwork/paragraph_votes_controller.rb +65 -0
- data/app/controllers/decidim/enhanced_textwork/paragraphs_controller.rb +316 -0
- data/app/controllers/decidim/enhanced_textwork/versions_controller.rb +21 -0
- data/app/controllers/decidim/enhanced_textwork/widgets_controller.rb +19 -0
- data/app/events/decidim/enhanced_textwork/accepted_paragraph_event.rb +17 -0
- data/app/events/decidim/enhanced_textwork/admin/paragraph_note_created_event.rb +27 -0
- data/app/events/decidim/enhanced_textwork/admin/update_paragraph_category_event.rb +11 -0
- data/app/events/decidim/enhanced_textwork/admin/update_paragraph_scope_event.rb +11 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_access_accepted_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_access_rejected_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_access_request_event.rb +27 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_access_requested_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_access_requester_accepted_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_access_requester_rejected_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/collaborative_draft_withdrawn_event.rb +29 -0
- data/app/events/decidim/enhanced_textwork/creation_enabled_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/endorsing_enabled_event.rb +8 -0
- data/app/events/decidim/enhanced_textwork/evaluating_paragraph_event.rb +11 -0
- data/app/events/decidim/enhanced_textwork/paragraph_endorsed_event.rb +33 -0
- data/app/events/decidim/enhanced_textwork/paragraph_mentioned_event.rb +21 -0
- data/app/events/decidim/enhanced_textwork/publish_paragraph_event.rb +25 -0
- data/app/events/decidim/enhanced_textwork/rejected_paragraph_event.rb +17 -0
- data/app/events/decidim/enhanced_textwork/voting_enabled_event.rb +8 -0
- data/app/forms/decidim/enhanced_textwork/accept_access_to_collaborative_draft_form.rb +10 -0
- data/app/forms/decidim/enhanced_textwork/access_to_collaborative_draft_form.rb +33 -0
- data/app/forms/decidim/enhanced_textwork/admin/import_editor_participatory_text_form.rb +35 -0
- data/app/forms/decidim/enhanced_textwork/admin/import_participatory_text_form.rb +68 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraph_answer_form.rb +44 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraph_base_form.rb +137 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraph_form.rb +32 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraph_note_form.rb +16 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraphs_fork_form.rb +63 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraphs_import_form.rb +67 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraphs_merge_form.rb +13 -0
- data/app/forms/decidim/enhanced_textwork/admin/paragraphs_split_form.rb +12 -0
- data/app/forms/decidim/enhanced_textwork/admin/participatory_text_paragraph_form.rb +20 -0
- data/app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb +21 -0
- data/app/forms/decidim/enhanced_textwork/admin/valuation_assignment_form.rb +37 -0
- data/app/forms/decidim/enhanced_textwork/collaborative_draft_form.rb +20 -0
- data/app/forms/decidim/enhanced_textwork/paragraph_form.rb +126 -0
- data/app/forms/decidim/enhanced_textwork/paragraph_wizard_create_step_form.rb +41 -0
- data/app/forms/decidim/enhanced_textwork/reject_access_to_collaborative_draft_form.rb +9 -0
- data/app/forms/decidim/enhanced_textwork/request_access_to_collaborative_draft_form.rb +20 -0
- data/app/helpers/decidim/enhanced_textwork/admin/filterable_helper.rb +17 -0
- data/app/helpers/decidim/enhanced_textwork/admin/paragraph_bulk_actions_helper.rb +35 -0
- data/app/helpers/decidim/enhanced_textwork/admin/paragraph_rankings_helper.rb +63 -0
- data/app/helpers/decidim/enhanced_textwork/admin/paragraphs_helper.rb +144 -0
- data/app/helpers/decidim/enhanced_textwork/admin/paragraphs_picker_helper.rb +30 -0
- data/app/helpers/decidim/enhanced_textwork/application_helper.rb +191 -0
- data/app/helpers/decidim/enhanced_textwork/collaborative_draft_cells_helper.rb +48 -0
- data/app/helpers/decidim/enhanced_textwork/collaborative_draft_helper.rb +29 -0
- data/app/helpers/decidim/enhanced_textwork/control_version_helper.rb +12 -0
- data/app/helpers/decidim/enhanced_textwork/map_helper.rb +48 -0
- data/app/helpers/decidim/enhanced_textwork/paragraph_cells_helper.rb +75 -0
- data/app/helpers/decidim/enhanced_textwork/paragraph_votes_helper.rb +103 -0
- data/app/helpers/decidim/enhanced_textwork/paragraph_wizard_helper.rb +140 -0
- data/app/helpers/decidim/enhanced_textwork/paragraphs_helper.rb +63 -0
- data/app/helpers/decidim/enhanced_textwork/participatory_texts_helper.rb +49 -0
- data/app/jobs/decidim/enhanced_textwork/notify_paragraphs_mentioned_job.rb +27 -0
- data/app/jobs/decidim/enhanced_textwork/settings_change_job.rb +50 -0
- data/app/models/decidim/enhanced_textwork/application_record.rb +10 -0
- data/app/models/decidim/enhanced_textwork/collaborative_draft.rb +73 -0
- data/app/models/decidim/enhanced_textwork/collaborative_draft_collaborator_request.rb +13 -0
- data/app/models/decidim/enhanced_textwork/paragraph.rb +411 -0
- data/app/models/decidim/enhanced_textwork/paragraph_note.rb +20 -0
- data/app/models/decidim/enhanced_textwork/paragraph_vote.rb +50 -0
- data/app/models/decidim/enhanced_textwork/participatory_text.rb +16 -0
- data/app/models/decidim/enhanced_textwork/valuation_assignment.rb +24 -0
- data/app/packs/documents/decidim/enhanced_textwork/participatory_texts/participatory_text.md +52 -0
- data/app/packs/documents/decidim/enhanced_textwork/participatory_texts/participatory_text.odt +0 -0
- data/app/packs/entrypoints/decidim_enhanced_textwork.js +17 -0
- data/app/packs/entrypoints/decidim_enhanced_textwork_admin.js +3 -0
- data/app/packs/images/decidim/enhanced_textwork/decidim_paragraphs.svg +1 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_accepted_paragraphs.svg +1 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_paragraph_votes.svg +1 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_paragraphs.svg +1 -0
- data/app/packs/src/decidim/enhanced_textwork/add_paragraph.js +49 -0
- data/app/packs/src/decidim/enhanced_textwork/admin/paragraphs.js +143 -0
- data/app/packs/src/decidim/enhanced_textwork/admin/paragraphs_form.js +29 -0
- data/app/packs/src/decidim/enhanced_textwork/admin/paragraphs_picker.js +35 -0
- data/app/packs/src/decidim/enhanced_textwork/toggle_element.js +21 -0
- data/app/packs/src/decidim/enhanced_textwork/utils.js +11 -0
- data/app/packs/stylesheets/decidim/enhanced_textwork/_paragraphs.scss +208 -0
- data/app/packs/stylesheets/decidim/enhanced_textwork/paragraphs/_preview.scss +3 -0
- data/app/permissions/decidim/enhanced_textwork/admin/permissions.rb +147 -0
- data/app/permissions/decidim/enhanced_textwork/permissions.rb +163 -0
- data/app/presenters/decidim/enhanced_textwork/admin_log/paragraph_note_presenter.rb +39 -0
- data/app/presenters/decidim/enhanced_textwork/admin_log/paragraph_presenter.rb +51 -0
- data/app/presenters/decidim/enhanced_textwork/admin_log/valuation_assignment_presenter.rb +51 -0
- data/app/presenters/decidim/enhanced_textwork/admin_log/value_types/paragraph_state_presenter.rb +17 -0
- data/app/presenters/decidim/enhanced_textwork/admin_log/value_types/paragraph_title_body_presenter.rb +23 -0
- data/app/presenters/decidim/enhanced_textwork/admin_log/value_types/valuator_role_user_presenter.rb +19 -0
- data/app/presenters/decidim/enhanced_textwork/collaborative_draft_presenter.rb +25 -0
- data/app/presenters/decidim/enhanced_textwork/log/resource_presenter.rb +22 -0
- data/app/presenters/decidim/enhanced_textwork/log/valuation_assignment_presenter.rb +22 -0
- data/app/presenters/decidim/enhanced_textwork/official_author_presenter.rb +14 -0
- data/app/presenters/decidim/enhanced_textwork/paragraph_presenter.rb +146 -0
- data/app/queries/decidim/enhanced_textwork/filtered_paragraphs.rb +37 -0
- data/app/queries/decidim/enhanced_textwork/metrics/accepted_paragraphs_metric_manage.rb +32 -0
- data/app/queries/decidim/enhanced_textwork/metrics/endorsements_metric_manage.rb +58 -0
- data/app/queries/decidim/enhanced_textwork/metrics/paragraph_followers_metric_measure.rb +58 -0
- data/app/queries/decidim/enhanced_textwork/metrics/paragraph_participants_metric_measure.rb +74 -0
- data/app/queries/decidim/enhanced_textwork/metrics/paragraphs_metric_manage.rb +48 -0
- data/app/queries/decidim/enhanced_textwork/metrics/votes_metric_manage.rb +52 -0
- data/app/queries/decidim/enhanced_textwork/similar_paragraphs.rb +67 -0
- data/app/services/decidim/enhanced_textwork/collaborative_draft_search.rb +59 -0
- data/app/services/decidim/enhanced_textwork/diff_renderer.rb +74 -0
- data/app/services/decidim/enhanced_textwork/paragraph_builder.rb +132 -0
- data/app/services/decidim/enhanced_textwork/paragraph_search.rb +85 -0
- data/app/validators/paragraph_length_validator.rb +40 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraph_answers/_form.html.erb +35 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraph_notes/_form.html.erb +8 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraph_notes/_paragraph_notes.html.erb +45 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/_bulk-actions.html.erb +33 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/_form.html.erb +101 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/_js-callout.html.erb +6 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/_paragraph-tr.html.erb +76 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_assign_to_valuator.html.erb +15 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_dropdown.html.erb +56 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_merge.html.erb +15 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_publish_answers.html.erb +14 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_recategorize.html.erb +15 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_scope-change.html.erb +25 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_split.html.erb +15 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/bulk_actions/_unassign_from_valuator.html.erb +15 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/edit.html.erb +7 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/index.html.erb +84 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/new.html.erb +7 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/publish_answers.js.erb +12 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/show.html.erb +186 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/update_category.js.erb +26 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs/update_scope.js.erb +27 -0
- data/app/views/decidim/enhanced_textwork/admin/paragraphs_imports/new.html.erb +37 -0
- data/app/views/decidim/enhanced_textwork/admin/participatory_texts/_article-preview.html.erb +16 -0
- data/app/views/decidim/enhanced_textwork/admin/participatory_texts/_bulk-actions.html.erb +3 -0
- data/app/views/decidim/enhanced_textwork/admin/participatory_texts/index.html.erb +55 -0
- data/app/views/decidim/enhanced_textwork/admin/participatory_texts/new_editor.html.erb +39 -0
- data/app/views/decidim/enhanced_textwork/admin/participatory_texts/new_import.html.erb +39 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_accept_request_access_form.html.erb +8 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_collaborative_drafts.html.erb +16 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_collaborator_requests.html.erb +20 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_count.html.erb +1 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_edit_form_fields.html.erb +83 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_filters.html.erb +32 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_filters_small_view.html.erb +18 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_new_collaborative_draft_button.html.erb +11 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_reject_request_access_form.html.erb +10 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_request_access_form.html.erb +7 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_wizard_aside.html.erb +13 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/_wizard_header.html.erb +14 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/edit.html.erb +31 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/index.html.erb +23 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/index.js.erb +10 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/new.html.erb +24 -0
- data/app/views/decidim/enhanced_textwork/collaborative_drafts/show.html.erb +128 -0
- data/app/views/decidim/enhanced_textwork/paragraph_votes/update_buttons_and_counters.js.erb +41 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_count.html.erb +1 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_dynamic_map_instructions.html.erb +4 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_edit_form_fields.html.erb +115 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_endorsements_card_row.html.erb +0 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_filters.html.erb +48 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_filters_small_view.html.erb +18 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_linked_paragraphs.html.erb +34 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_paragraph.html.erb +1 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_paragraph_badge.html.erb +3 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_paragraph_similar.html.erb +22 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_paragraphs.html.erb +46 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_remaining_votes_count.html.erb +3 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_vote_button.html.erb +61 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_votes_count.html.erb +18 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_voting_rules.html.erb +50 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_wizard_aside.html.erb +20 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/_wizard_header.html.erb +42 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/compare.html.erb +23 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/complete.html.erb +24 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/edit.html.erb +31 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/edit_draft.html.erb +26 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/index.html.erb +56 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/index.js.erb +10 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/new.html.erb +38 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/_index.html.erb +20 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/_overview.html.erb +35 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/_paragraph_vote_button.html.erb +53 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/_paragraph_vote_button_chevron.html.erb +72 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/_paragraph_votes_count.html.erb +41 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/_view_index.html.erb +10 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/participatory_texts/participatory_text.html.erb +29 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/preview.html.erb +41 -0
- data/app/views/decidim/enhanced_textwork/paragraphs/show.html.erb +143 -0
- data/app/views/decidim/enhanced_textwork/versions/index.html.erb +16 -0
- data/app/views/decidim/enhanced_textwork/versions/show.html.erb +18 -0
- data/config/assets.rb +10 -0
- data/config/locales/de.yml +927 -0
- data/config/locales/en.yml +967 -0
- data/config/locales/todo/am-ET.yml +1 -0
- data/config/locales/todo/ar-SA.yml +801 -0
- data/config/locales/todo/ar.yml +791 -0
- data/config/locales/todo/bg-BG.yml +237 -0
- data/config/locales/todo/bg.yml +238 -0
- data/config/locales/todo/ca.yml +908 -0
- data/config/locales/todo/cs-CZ.yml +787 -0
- data/config/locales/todo/cs.yml +969 -0
- data/config/locales/todo/da-DK.yml +1 -0
- data/config/locales/todo/da.yml +1 -0
- data/config/locales/todo/el-GR.yml +1 -0
- data/config/locales/todo/el.yml +848 -0
- data/config/locales/todo/eo-UY.yml +1 -0
- data/config/locales/todo/eo.yml +1 -0
- data/config/locales/todo/es-MX.yml +908 -0
- data/config/locales/todo/es-PY.yml +908 -0
- data/config/locales/todo/es.yml +908 -0
- data/config/locales/todo/et-EE.yml +1 -0
- data/config/locales/todo/et.yml +1 -0
- data/config/locales/todo/eu.yml +717 -0
- data/config/locales/todo/fi-pl.yml +763 -0
- data/config/locales/todo/fi-plain.yml +920 -0
- data/config/locales/todo/fi.yml +920 -0
- data/config/locales/todo/fr-CA.yml +936 -0
- data/config/locales/todo/fr-LU.yml +903 -0
- data/config/locales/todo/fr.yml +936 -0
- data/config/locales/todo/ga-IE.yml +275 -0
- data/config/locales/todo/gl.yml +808 -0
- data/config/locales/todo/hr-HR.yml +1 -0
- data/config/locales/todo/hr.yml +1 -0
- data/config/locales/todo/hu.yml +847 -0
- data/config/locales/todo/id-ID.yml +704 -0
- data/config/locales/todo/is-IS.yml +269 -0
- data/config/locales/todo/is.yml +274 -0
- data/config/locales/todo/it.yml +908 -0
- data/config/locales/todo/ja.yml +922 -0
- data/config/locales/todo/ko-KR.yml +1 -0
- data/config/locales/todo/ko.yml +1 -0
- data/config/locales/todo/lb-LU.yml +1 -0
- data/config/locales/todo/lb.yml +40 -0
- data/config/locales/todo/lt-LT.yml +1 -0
- data/config/locales/todo/lt.yml +1 -0
- data/config/locales/todo/lv.yml +838 -0
- data/config/locales/todo/mt-MT.yml +1 -0
- data/config/locales/todo/mt.yml +1 -0
- data/config/locales/todo/nl.yml +882 -0
- data/config/locales/todo/no.yml +770 -0
- data/config/locales/todo/om-ET.yml +1 -0
- data/config/locales/todo/pl.yml +927 -0
- data/config/locales/todo/pt-BR.yml +908 -0
- data/config/locales/todo/pt.yml +945 -0
- data/config/locales/todo/ro-RO.yml +886 -0
- data/config/locales/todo/ru.yml +379 -0
- data/config/locales/todo/si-LK.yml +1 -0
- data/config/locales/todo/sk-SK.yml +896 -0
- data/config/locales/todo/sk.yml +851 -0
- data/config/locales/todo/sl.yml +26 -0
- data/config/locales/todo/so-SO.yml +1 -0
- data/config/locales/todo/sr-CS.yml +125 -0
- data/config/locales/todo/sv.yml +908 -0
- data/config/locales/todo/sw-KE.yml +1 -0
- data/config/locales/todo/ti-ER.yml +1 -0
- data/config/locales/todo/tr-TR.yml +890 -0
- data/config/locales/todo/uk.yml +379 -0
- data/config/locales/todo/vi-VN.yml +1 -0
- data/config/locales/todo/vi.yml +1 -0
- data/config/locales/todo/zh-CN.yml +857 -0
- data/config/locales/todo/zh-TW.yml +1 -0
- data/db/migrate/20161212110850_create_decidim_paragraphs.rb +16 -0
- data/db/migrate/20170112115253_create_paragraph_votes.rb +14 -0
- data/db/migrate/20170113114245_add_enhanced_textwork_text_search_indexes.rb +8 -0
- data/db/migrate/20170118120151_add_counter_cache_votes_to_paragraphs.rb +7 -0
- data/db/migrate/20170120151202_add_user_group_id_to_paragraphs.rb +7 -0
- data/db/migrate/20170131092413_add_answers_to_paragraphs.rb +9 -0
- data/db/migrate/20170205082832_add_index_to_decidim_enhanced_textwork_paragraphs_paragraph_votes_count.rb +9 -0
- data/db/migrate/20170215113152_create_paragraph_reports.rb +16 -0
- data/db/migrate/20170215131720_add_report_count_to_paragraphs.rb +7 -0
- data/db/migrate/20170215132030_add_reference_to_paragraphs.rb +13 -0
- data/db/migrate/20170220152416_add_hidden_at_to_paragraphs.rb +7 -0
- data/db/migrate/20170228105156_add_geolocalization_fields_to_paragraphs.rb +9 -0
- data/db/migrate/20170307085300_migrate_paragraph_reports_data_to_reports.rb +24 -0
- data/db/migrate/20170410073742_remove_not_null_reference_paragraphs.rb +7 -0
- data/db/migrate/20170612101809_migrate_paragraphs_category.rb +15 -0
- data/db/migrate/20171201115434_create_paragraph_endorsements.rb +16 -0
- data/db/migrate/20171201122623_add_counter_cache_endorsements_to_paragraphs.rb +8 -0
- data/db/migrate/20171212102250_enable_pg_trgm_extension_for_paragraphs.rb +18 -0
- data/db/migrate/20171220084719_add_published_at_to_paragraphs.rb +14 -0
- data/db/migrate/20180111110204_create_decidim_paragraph_notes.rb +15 -0
- data/db/migrate/20180115155220_add_index_created_at_paragraph_notes.rb +7 -0
- data/db/migrate/20180305133811_rename_features_to_components_at_paragraphs.rb +11 -0
- data/db/migrate/20180326091532_create_decidim_enhanced_textwork_collaborative_drafts.rb +29 -0
- data/db/migrate/20180413135249_fix_nil_threshold_per_paragraph.rb +18 -0
- data/db/migrate/20180529101323_add_counter_cache_coauthorships_to_paragraphs.rb +8 -0
- data/db/migrate/20180529110230_move_enhanced_textwork_authorships_to_coauthorships.rb +28 -0
- data/db/migrate/20180529110830_remove_authorships_from_paragraphs.rb +8 -0
- data/db/migrate/20180613151121_create_enhanced_textwork_collaborative_draft_collaborator_requests.rb +12 -0
- data/db/migrate/20180711074134_add_enhanced_textwork_counter_cache_coauthorships_to_collaborative_drafts.rb +7 -0
- data/db/migrate/20180711075004_remove_index_counter_cache_coauthorships_to_paragraphs.rb +7 -0
- data/db/migrate/20180927111721_create_enhanced_textwork_participatory_texts.rb +13 -0
- data/db/migrate/20180930125321_add_participatory_text_level_to_paragraphs.rb +7 -0
- data/db/migrate/20180930125321_add_position_to_paragraphs.rb +7 -0
- data/db/migrate/20181003074440_fix_user_groups_ids_in_paragraphs_endorsements.rb +20 -0
- data/db/migrate/20181010114622_add_enhanced_textwork_temporary_votes.rb +9 -0
- data/db/migrate/20181016132225_add_enhanced_textwork_organization_as_author.rb +13 -0
- data/db/migrate/20181017084221_make_author_polymorhpic_for_paragraph_endorsements.rb +31 -0
- data/db/migrate/20181026073215_add_enhanced_textwork_created_in_meeting.rb +7 -0
- data/db/migrate/20190215113158_use_enhanced_textwork_md5_indexes.rb +17 -0
- data/db/migrate/20191206154128_add_endorsements_counter_cache_to_paragraphs.rb +7 -0
- data/db/migrate/20200120215928_move_paragraph_endorsements_to_core_endorsements.rb +54 -0
- data/db/migrate/20200120230130_drop_paragraph_endorsements.rb +8 -0
- data/db/migrate/20200203111239_add_paragraph_valuation_assignments.rb +12 -0
- data/db/migrate/20200210135152_add_costs_to_paragraphs.rb +9 -0
- data/db/migrate/20200212120110_sync_paragraphs_state_with_amendments_state.rb +28 -0
- data/db/migrate/20200227175922_add_state_published_at_to_paragraphs.rb +7 -0
- data/db/migrate/20200306123652_publish_existing_paragraphs_state.rb +15 -0
- data/db/migrate/20200708091228_move_paragraphs_fields_to_i18n.rb +86 -0
- data/db/migrate/20200730131631_move_paragraph_endorsed_event_notifications_to_resource_endorsed_event.rb +20 -0
- data/db/migrate/20200827154156_add_commentable_counter_cache_to_paragraphs.rb +12 -0
- data/db/migrate/20201002085508_fix_paragraphs_data.rb +36 -0
- data/db/migrate/20210127115628_fix_answered_paragraphs_after_copy.rb +14 -0
- data/db/migrate/20210310102839_add_followable_counter_cache_to_paragraphs.rb +16 -0
- data/db/migrate/20210310120812_add_enhanced_textwork_followable_counter_cache_to_collaborative_drafts.rb +16 -0
- data/db/migrate/20210318082934_fix_counters_for_copied_paragraphs.rb +19 -0
- data/lib/decidim/api/paragraph_input_filter.rb +29 -0
- data/lib/decidim/api/paragraph_input_sort.rb +20 -0
- data/lib/decidim/api/paragraph_type.rb +56 -0
- data/lib/decidim/api/paragraphs_type.rb +43 -0
- data/lib/decidim/content_parsers/paragraph_parser.rb +101 -0
- data/lib/decidim/content_renderers/paragraph_renderer.rb +33 -0
- data/lib/decidim/enhanced_textwork/admin.rb +10 -0
- data/lib/decidim/enhanced_textwork/admin_engine.rb +52 -0
- data/lib/decidim/enhanced_textwork/api.rb +10 -0
- data/lib/decidim/enhanced_textwork/commentable_collaborative_draft.rb +38 -0
- data/lib/decidim/enhanced_textwork/commentable_paragraph.rb +36 -0
- data/lib/decidim/enhanced_textwork/component.rb +448 -0
- data/lib/decidim/enhanced_textwork/doc_to_markdown.rb +50 -0
- data/lib/decidim/enhanced_textwork/engine.rb +204 -0
- data/lib/decidim/enhanced_textwork/html_to_markdown.rb +22 -0
- data/lib/decidim/enhanced_textwork/markdown_to_paragraphs.rb +153 -0
- data/lib/decidim/enhanced_textwork/odt_to_markdown.rb +46 -0
- data/lib/decidim/enhanced_textwork/paragraph_creator.rb +98 -0
- data/lib/decidim/enhanced_textwork/paragraph_serializer.rb +95 -0
- data/lib/decidim/enhanced_textwork/participatory_text_section.rb +21 -0
- data/lib/decidim/enhanced_textwork/test/capybara_paragraphs_picker.rb +59 -0
- data/lib/decidim/enhanced_textwork/test/factories.rb +492 -0
- data/lib/decidim/enhanced_textwork/valuatable.rb +21 -0
- data/lib/decidim/enhanced_textwork/version.rb +14 -0
- data/lib/decidim/enhanced_textwork.rb +58 -0
- data/lib/decidim/exporters/word.rb +309 -0
- metadata +704 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
<%= form_required_explanation %>
|
2
|
+
|
3
|
+
<div class="field hashtags__container">
|
4
|
+
<%= form.text_field :title, class: "js-hashtags", value: form_presenter.title %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="field hashtags__container">
|
8
|
+
<%= form.text_area :body, rows: 10, class: "js-hashtags", value: form_presenter.body(extras: false).strip %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<% if @form.component_automatic_hashtags.any? %>
|
12
|
+
<div class="field">
|
13
|
+
<%= form.label :automatic_hashtags %>
|
14
|
+
<div class="checkboxes hashtags">
|
15
|
+
<% @form.component_automatic_hashtags.each do |hashtag| %>
|
16
|
+
<label>
|
17
|
+
<%= check_box_tag "", "", { checked: true }, { disabled: true } %>#<%= hashtag %>
|
18
|
+
</label>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if @form.component_suggested_hashtags.any? %>
|
25
|
+
<div class="field">
|
26
|
+
<%= form.label :suggested_hashtags, nil, for: nil %>
|
27
|
+
<div class="checkboxes hashtags">
|
28
|
+
<%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map {|hashtag| [hashtag.downcase, "##{hashtag}"]}, :first, :last do |option|
|
29
|
+
option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
|
30
|
+
end %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if @form.geocoding_enabled? %>
|
36
|
+
<div class="field">
|
37
|
+
<%= form.check_box :has_address, checked: form_has_address? %>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="field" id="address_input">
|
41
|
+
<%= form.geocoding_field :address %>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<% if @form.categories&.any? %>
|
46
|
+
<div class="field">
|
47
|
+
<%= form.categories_select :category_id, @form.categories, include_blank: t("decidim.enhanced_textwork.collaborative_drafts.edit.select_a_category") %>
|
48
|
+
</div>
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<% if current_component.has_subscopes? %>
|
52
|
+
<div class="field">
|
53
|
+
<%= scopes_picker_field form, :scope_id, root: current_component.scope %>
|
54
|
+
</div>
|
55
|
+
<% end %>
|
56
|
+
|
57
|
+
<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
58
|
+
<div class="field">
|
59
|
+
<%= user_group_select_field form, :user_group_id %>
|
60
|
+
</div>
|
61
|
+
<% end %>
|
62
|
+
|
63
|
+
<% if component_settings.attachments_allowed? %>
|
64
|
+
<fieldset>
|
65
|
+
<legend><%= t("attachment_legend", scope: "decidim.enhanced_textwork.collaborative_drafts.edit") %></legend>
|
66
|
+
<%= form.fields_for :attachment, @form.attachment do |nested_form| %>
|
67
|
+
<div class="field">
|
68
|
+
<%= nested_form.text_field :title %>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="field">
|
72
|
+
<%= nested_form.upload :file, optional: false %>
|
73
|
+
<% if @form.errors[:attachment].present? %>
|
74
|
+
<% @form.errors[:attachment].each do |message| %>
|
75
|
+
<small class="form-error is-visible">
|
76
|
+
<%= message %>
|
77
|
+
</small>
|
78
|
+
<% end %>
|
79
|
+
<% end %>
|
80
|
+
</div>
|
81
|
+
<% end %>
|
82
|
+
</fieldset>
|
83
|
+
<% end %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= render partial: "decidim/shared/filter_form_help", locals: { skip_to_id: "collaborative_drafts" } %>
|
2
|
+
|
3
|
+
<%= filter_form_for filter do |form| %>
|
4
|
+
<div class="filters__section">
|
5
|
+
<div class="filters__search">
|
6
|
+
<div class="input-group">
|
7
|
+
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %>
|
8
|
+
<div class="input-group-button">
|
9
|
+
<button type="submit" class="button" aria-controls="collaborative_drafts">
|
10
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
11
|
+
</button>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<%= form.check_boxes_tree :state, filter_collaborative_drafts_state_values, legend_title: t(".state"), "aria-controls": "collaborative_drafts" %>
|
18
|
+
|
19
|
+
<% if linked_classes_for(Decidim::EnhancedTextwork::CollaborativeDraft).any? %>
|
20
|
+
<%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::EnhancedTextwork::CollaborativeDraft), :first, :last, { legend_title: t(".related_to") }, "aria-controls": "collaborative_drafts" %>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<% if current_component.has_subscopes? %>
|
24
|
+
<%= form.check_boxes_tree :scope_id, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "collaborative_drafts" %>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if current_component.categories.any? %>
|
28
|
+
<%= form.check_boxes_tree :category_id, filter_categories_values, legend_title: t(".category"), "aria-controls": "collaborative_drafts" %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
32
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="filters-controls hide-for-mediumlarge">
|
2
|
+
<button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
|
3
|
+
<%= t ".filter" %>
|
4
|
+
<%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
|
5
|
+
</button>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
|
9
|
+
<div class="reveal__header">
|
10
|
+
<h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
|
11
|
+
<button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
|
12
|
+
<span aria-hidden="true">×</span>
|
13
|
+
</button>
|
14
|
+
</div>
|
15
|
+
<div class="filters">
|
16
|
+
<%= render partial: "filters", locals: { type: :small } %>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if current_settings.creation_enabled %>
|
2
|
+
<%= action_authorized_link_to :create, new_collaborative_draft_path, class: "title-action__action button small", data: { "redirect_url" => new_collaborative_draft_path } do %>
|
3
|
+
<%= t(".new_collaborative_draft") %>
|
4
|
+
<%= icon "plus", role: "img", "aria-hidden": true %>
|
5
|
+
<% end %>
|
6
|
+
<% else %>
|
7
|
+
<span class="title-action__action button small disabled">
|
8
|
+
<%= t(".new_collaborative_draft") %>
|
9
|
+
<%= icon "plus", role: "img", "aria-hidden": true %>
|
10
|
+
</span>
|
11
|
+
<% end %>
|
data/app/views/decidim/enhanced_textwork/collaborative_drafts/_reject_request_access_form.html.erb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if allowed_to?(:react_to_request_access, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
2
|
+
<%= decidim_form_for(@reject_request_form, url: request_reject_collaborative_draft_path(@collaborative_draft)) do |form| %>
|
3
|
+
<%= form.hidden_field :id, value: @collaborative_draft.id %>
|
4
|
+
<%= form.hidden_field :state, value: @collaborative_draft.state %>
|
5
|
+
<%= form.hidden_field :requester_user_id, value: requester.id %>
|
6
|
+
<%= button_tag type: "submit", data: { disable: true }, title: reject_request_button_label do %>
|
7
|
+
<%= icon "x", class: "icon--small muted ml-xs", aria_label: reject_request_button_label, role: "img" %>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% if allowed_to?(:request_access, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
2
|
+
<%= decidim_form_for(@request_access_form, url: request_access_collaborative_draft_path(@collaborative_draft)) do |form| %>
|
3
|
+
<%= form.hidden_field :id, value: @collaborative_draft.id %>
|
4
|
+
<%= form.hidden_field :state, value: @collaborative_draft.state %>
|
5
|
+
<%= form.submit t(:request_access, scope: "decidim.enhanced_textwork.collaborative_drafts.show"), class: "button expanded button--sc mt-s", data: { disable: true } %>
|
6
|
+
<% end %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="columns large-3">
|
2
|
+
<div class="m-bottom">
|
3
|
+
<%= link_to :back do %>
|
4
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
5
|
+
<%= t("back_from_collaborative_draft", scope: "decidim.enhanced_textwork.collaborative_drafts.wizard_aside").html_safe %>
|
6
|
+
<% end %>
|
7
|
+
</div>
|
8
|
+
<div class="section">
|
9
|
+
<p>
|
10
|
+
<%= t("info", scope: "decidim.enhanced_textwork.collaborative_drafts.wizard_aside").html_safe %>
|
11
|
+
</p>
|
12
|
+
</div>
|
13
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% if translated_attribute(component_settings.new_paragraph_help_text).present? %>
|
2
|
+
<%= cell("decidim/announcement", component_settings.new_paragraph_help_text) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% if paragraph_wizard_step_help_text?(@step) %>
|
6
|
+
<div class="paragraph_wizard_help_text">
|
7
|
+
<% callout_step_help_text_class ||= nil %>
|
8
|
+
<%= cell("decidim/announcement", component_settings.try("paragraph_wizard_#{@step}_help_text"), callout_class: callout_step_help_text_class) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<h2 class="section-heading">
|
13
|
+
<%= t(".title") %>
|
14
|
+
</h2>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% add_decidim_page_title(paragraph_wizard_step_title(action_name)) %>
|
2
|
+
|
3
|
+
<div class="row columns">
|
4
|
+
<div class="m-bottom">
|
5
|
+
<%= link_to :back, class: "muted-link" do %>
|
6
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
7
|
+
<%= t(".back") %>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
<h2 class="section-heading"><%= t(".title") %></h2>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="row">
|
14
|
+
<div class="columns large-6 medium-centered">
|
15
|
+
<div class="card">
|
16
|
+
<%= cell("decidim/announcement", component_settings.new_paragraph_help_text) %>
|
17
|
+
|
18
|
+
<div class="card__content">
|
19
|
+
<%= decidim_form_for(@form) do |form| %>
|
20
|
+
<%= render partial: "edit_form_fields", locals: { form: form } %>
|
21
|
+
|
22
|
+
<div class="actions">
|
23
|
+
<%= form.submit t(".send"), class: "button expanded", data: { disable: true } %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<%= javascript_pack_tag "decidim_enhanced_textwork" %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% add_decidim_page_title(Decidim::EnhancedTextwork::CollaborativeDraft.model_name.human(count: 2)) %>
|
2
|
+
|
3
|
+
<%= render partial: "decidim/shared/component_announcement" %>
|
4
|
+
|
5
|
+
<div class="row columns">
|
6
|
+
<div class="title-action">
|
7
|
+
<h2 id="drafts-count" class="title-action__title section-heading">
|
8
|
+
<%= render partial: "count" %>
|
9
|
+
</h2>
|
10
|
+
<%= render "new_collaborative_draft_button" %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div class="row">
|
14
|
+
<div class="columns mediumlarge-4 large-3">
|
15
|
+
<%= render partial: "filters_small_view" %>
|
16
|
+
<div class="card card--secondary show-for-mediumlarge">
|
17
|
+
<%= render partial: "filters" %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<div id="collaborative_drafts" class="columns mediumlarge-8 large-9" aria-live="polite">
|
21
|
+
<%= render partial: "collaborative_drafts" %>
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
var $collaborative_drafts = $('#collaborative_drafts');
|
2
|
+
var $collaborativeDraftsCount = $('#drafts-count');
|
3
|
+
var $orderFilterInput = $('.order_filter');
|
4
|
+
|
5
|
+
$collaborative_drafts.html('<%= j(render partial: "collaborative_drafts").strip.html_safe %>');
|
6
|
+
$collaborativeDraftsCount.html('<%= j(render partial: "count").strip.html_safe %>');
|
7
|
+
$orderFilterInput.val('<%= order %>');
|
8
|
+
|
9
|
+
var $dropdownMenu = $('.dropdown.menu', $collaborative_drafts);
|
10
|
+
$dropdownMenu.foundation();
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% add_decidim_page_title(t("decidim.enhanced_textwork.collaborative_drafts.wizard_header.title")) %>
|
2
|
+
|
3
|
+
<div class="row">
|
4
|
+
<%= render partial: "wizard_aside" %>
|
5
|
+
|
6
|
+
<div class="columns large-6">
|
7
|
+
<%= render partial: "wizard_header" %>
|
8
|
+
|
9
|
+
<div class="card">
|
10
|
+
<div class="card__content">
|
11
|
+
<%= decidim_form_for(@form) do |form| %>
|
12
|
+
<%= render partial: "edit_form_fields", locals: { form: form } %>
|
13
|
+
|
14
|
+
<div class="actions">
|
15
|
+
<%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<div class="columns large-3"></div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<%= javascript_pack_tag "decidim_enhanced_textwork" %>
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<% add_decidim_page_title(Decidim::EnhancedTextwork::CollaborativeDraft.model_name.human(count: 2)) %>
|
2
|
+
<% add_decidim_meta_tags({
|
3
|
+
description: present(@collaborative_draft).body,
|
4
|
+
title: present(@collaborative_draft).title,
|
5
|
+
url: collaborative_draft_url(@collaborative_draft.id)
|
6
|
+
}) %>
|
7
|
+
|
8
|
+
<% if current_user.nil? || allowed_to?(:request_access, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
9
|
+
<div class="row">
|
10
|
+
<div class="columns">
|
11
|
+
<div class="callout secondary"><%= t(".info-message").html_safe %></div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<div class="row column view-header">
|
17
|
+
<div class="m-bottom">
|
18
|
+
<%= link_to collaborative_drafts_path do %>
|
19
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
20
|
+
<%= t(".back") %>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<h2 class="heading2">
|
25
|
+
<%= present(@collaborative_draft).title(links: true, html_escape: true) %>
|
26
|
+
</h2>
|
27
|
+
|
28
|
+
<%= cell("decidim/coauthorships", @collaborative_draft, has_actions: true, size: 3, context: { current_user: current_user }) %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="row">
|
32
|
+
<div class="columns mediumlarge-8 large-9">
|
33
|
+
<div class="section">
|
34
|
+
<%== cell("decidim/enhanced_textwork/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %>
|
35
|
+
|
36
|
+
<%= simple_format(present(@collaborative_draft).body(links: true, strip_tags: true), nil, sanitize: false) %>
|
37
|
+
|
38
|
+
<% if component_settings.geocoding_enabled? %>
|
39
|
+
<%= render partial: "decidim/shared/static_map", locals: { icon_name: "paragraphs", geolocalizable: @collaborative_draft } %>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<%= cell "decidim/tags", @collaborative_draft, context: { extra_classes: ["tags--collaborative-draft"] } %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="columns section view-side mediumlarge-4 large-3">
|
47
|
+
<% if allowed_to?(:publish, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
48
|
+
<div class="card text-center" id="collaborative_draft_publish">
|
49
|
+
<div class="card__content">
|
50
|
+
<%= cell "decidim/enhanced_textwork/irreversible_action_modal", @collaborative_draft, action: :publish %>
|
51
|
+
<div class="text-small">
|
52
|
+
<%= t("publish_info", scope:"decidim.enhanced_textwork.collaborative_drafts.show") %>
|
53
|
+
<%= cell "decidim/enhanced_textwork/irreversible_action_modal", @collaborative_draft, action: :withdraw %>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<div class="card text-center">
|
60
|
+
<div class="card__content">
|
61
|
+
<% if @collaborative_draft.published? %>
|
62
|
+
<%= cell "decidim/enhanced_textwork/collaborative_draft_link_to_paragraph", @collaborative_draft %>
|
63
|
+
<% else %>
|
64
|
+
<div>
|
65
|
+
<%= resource_version_number(@collaborative_draft.versions_count, "text-large") %>
|
66
|
+
<div class="text-medium">
|
67
|
+
<%= resource_version_of(@collaborative_draft.versions_count) %>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div>
|
72
|
+
<span class="text-medium">
|
73
|
+
<%= link_to_other_resource_versions(collaborative_draft_versions_path(@collaborative_draft)) %>
|
74
|
+
</span>
|
75
|
+
</div>
|
76
|
+
<% end %>
|
77
|
+
|
78
|
+
<% if allowed_to?(:edit, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
|
79
|
+
<%= link_to t("edit", scope:"decidim.enhanced_textwork.collaborative_drafts.show"), edit_collaborative_draft_path(@collaborative_draft), class: "button hollow expanded button--sc mt-s", id: "collaborative_draft_edit" %>
|
80
|
+
<% end %>
|
81
|
+
|
82
|
+
<%= render "request_access_form" %>
|
83
|
+
|
84
|
+
<% if @collaborative_draft.requesters.include? current_user %>
|
85
|
+
<button type="button" class="button expanded button--sc mt-s">
|
86
|
+
<%= t("requested_access", scope:"decidim.enhanced_textwork.collaborative_drafts.show") %>
|
87
|
+
</button>
|
88
|
+
<% end %>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div class="card__status">
|
92
|
+
<ul class="card-data">
|
93
|
+
<li class="card-data__item authors_status">
|
94
|
+
<%= with_tooltip t("decidim.enhanced_textwork.models.collaborative_draft.fields.authors") do %>
|
95
|
+
<%= icon("people", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.group_by(&:whodunnit).size}" %>
|
96
|
+
<% end %>
|
97
|
+
</li>
|
98
|
+
|
99
|
+
<li class="card-data__item versions_status">
|
100
|
+
<%= link_to collaborative_draft_versions_path(@collaborative_draft) do %>
|
101
|
+
<%= with_tooltip t("decidim.enhanced_textwork.models.collaborative_draft.fields.contributions") do %>
|
102
|
+
<%= icon("pencil", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.count}" %>
|
103
|
+
<% end %>
|
104
|
+
<% end %>
|
105
|
+
</li>
|
106
|
+
<li class="card-data__item">
|
107
|
+
<%= link_to "#comments" do %>
|
108
|
+
<%= with_tooltip t("decidim.enhanced_textwork.models.collaborative_draft.fields.comments") do %>
|
109
|
+
<%= icon("comment-square", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.comments_count}" %>
|
110
|
+
<% end %>
|
111
|
+
<% end %>
|
112
|
+
</li>
|
113
|
+
</ul>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<%= render partial: "collaborator_requests" %>
|
118
|
+
|
119
|
+
<%= resource_reference(@collaborative_draft) %>
|
120
|
+
|
121
|
+
<%= render partial: "decidim/shared/share_modal" %>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<%= attachments_for @collaborative_draft %>
|
126
|
+
<%= comments_for @collaborative_draft %>
|
127
|
+
|
128
|
+
<%= cell("decidim/flag_modal", @collaborative_draft) %>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<% @paragraphs.each do |paragraph| %>
|
2
|
+
(function() {
|
3
|
+
var $paragraphVotesCount = $('#paragraph-<%= paragraph.id %>-votes-count');
|
4
|
+
|
5
|
+
if($paragraphVotesCount[0]) {
|
6
|
+
morphdom($paragraphVotesCount[0], '<%= j(render partial: "decidim/enhanced_textwork/paragraphs/votes_count", locals: { paragraph: paragraph, from_paragraphs_list: @from_paragraphs_list }).strip.html_safe %>');
|
7
|
+
}
|
8
|
+
|
9
|
+
var $paragraphVoteButton = $('#paragraph-<%= paragraph.id %>-vote-button');
|
10
|
+
if($paragraphVoteButton[0]) {
|
11
|
+
morphdom($paragraphVoteButton[0], '<%= j(render partial: "decidim/enhanced_textwork/paragraphs/vote_button", locals: { paragraph: paragraph, from_paragraphs_list: @from_paragraphs_list, chevron_button: @chevron_button }).strip.html_safe %>');
|
12
|
+
}
|
13
|
+
})();
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<% if vote_limit_enabled? %>
|
17
|
+
(function() {
|
18
|
+
var $remainingVotesCount = $('#remaining-votes-count');
|
19
|
+
var $notVotedButtons = $('.card__button.button').not('.success');
|
20
|
+
|
21
|
+
if(!$remainingVotesCount[0]) { return; }
|
22
|
+
|
23
|
+
morphdom($remainingVotesCount[0], '<%= j(render partial: "decidim/enhanced_textwork/paragraphs/remaining_votes_count").strip.html_safe %>');
|
24
|
+
|
25
|
+
<% if remaining_votes_count_for(current_user) == 0 %>
|
26
|
+
$notVotedButtons.attr('disabled', true);
|
27
|
+
$notVotedButtons.val('<%= t("decidim.enhanced_textwork.paragraphs.vote_button.no_votes_remaining") %>');
|
28
|
+
<% else %>
|
29
|
+
$notVotedButtons.attr('disabled', false);
|
30
|
+
$notVotedButtons.val('<%= t("decidim.enhanced_textwork.paragraphs.vote_button.vote") %>');
|
31
|
+
<% end %>
|
32
|
+
}());
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if show_voting_rules? %>
|
36
|
+
(function() {
|
37
|
+
var $votingRules = $('.voting-rules');
|
38
|
+
if(!$votingRules[0]) { return; }
|
39
|
+
morphdom($votingRules[0], '<%= j(render partial: "decidim/enhanced_textwork/paragraphs/voting_rules").strip.html_safe %>');
|
40
|
+
}());
|
41
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= t(".paragraphs_count", count: @paragraphs.total_count) %>
|
@@ -0,0 +1,115 @@
|
|
1
|
+
<%= form_required_explanation %>
|
2
|
+
|
3
|
+
<div class="field hashtags__container">
|
4
|
+
<%= form.text_field :title, class: "js-hashtags", value: form_presenter.title %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="field hashtags__container">
|
8
|
+
<%= text_editor_for_paragraph_body(form) %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<% if @form.component_automatic_hashtags.any? %>
|
12
|
+
<div class="field">
|
13
|
+
<%= form.label :automatic_hashtags %>
|
14
|
+
<div class="checkboxes hashtags">
|
15
|
+
<% @form.component_automatic_hashtags.each do |hashtag| %>
|
16
|
+
<label>
|
17
|
+
<%= check_box_tag "", "", { checked: true }, { disabled: true } %>#<%= hashtag %>
|
18
|
+
</label>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if @form.component_suggested_hashtags.any? %>
|
25
|
+
<div class="field">
|
26
|
+
<%= form.label :suggested_hashtags, nil, for: nil %>
|
27
|
+
<div class="checkboxes hashtags">
|
28
|
+
<%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map { |hashtag| [hashtag.downcase, "##{hashtag}"] }, :first, :last do |option|
|
29
|
+
option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
|
30
|
+
end %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if @form.geocoding_enabled? %>
|
36
|
+
<div class="field">
|
37
|
+
<%= form.check_box :has_address, checked: form_has_address? %>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="field" id="address_input">
|
41
|
+
<%= form.geocoding_field :address, placeholder: t("decidim.enhanced_textwork.paragraphs.placeholder.address") %>
|
42
|
+
<div class="map" id="address_map">
|
43
|
+
<%= render partial: "dynamic_map_instructions" %>
|
44
|
+
<%= dynamic_map_for paragraph_preview_data_for_map(@paragraph) %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
|
49
|
+
<% if @form.categories&.any? %>
|
50
|
+
<div class="field">
|
51
|
+
<%= form.categories_select :category_id, @form.categories, include_blank: t("decidim.enhanced_textwork.paragraphs.edit.select_a_category") %>
|
52
|
+
</div>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
<% if current_component.has_subscopes? %>
|
56
|
+
<div class="field">
|
57
|
+
<%= scopes_picker_field form, :scope_id, root: current_component.scope %>
|
58
|
+
</div>
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
62
|
+
<div class="field">
|
63
|
+
<%= user_group_select_field form, :user_group_id %>
|
64
|
+
</div>
|
65
|
+
<% end %>
|
66
|
+
|
67
|
+
<% if component_settings.attachments_allowed? && @paragraph %>
|
68
|
+
<fieldset class="gallery__container">
|
69
|
+
<legend><%= t("gallery_legend", scope: "decidim.enhanced_textwork.paragraphs.edit") %></legend>
|
70
|
+
|
71
|
+
<% if @form.photos.any? %>
|
72
|
+
<% @form.photos.each do |photo| %>
|
73
|
+
<div class="callout gallery__item" id="attachment_<%= photo.id %>" data-closable>
|
74
|
+
<%= image_tag photo.thumbnail_url, class: "thumbnail", alt: photo.file.filename %>
|
75
|
+
<%= form.hidden_field :photos, multiple: true, value: photo.id, id: "photo-#{photo.id}" %>
|
76
|
+
<button class="close-button"
|
77
|
+
aria-label="<%= t("delete_image", scope: "decidim.enhanced_textwork.paragraphs.edit") %>"
|
78
|
+
title="<%= t("delete_image", scope: "decidim.enhanced_textwork.paragraphs.edit") %>"
|
79
|
+
type="button"
|
80
|
+
data-close>
|
81
|
+
<span aria-hidden="true">×</span>
|
82
|
+
</button>
|
83
|
+
</div>
|
84
|
+
<% end %>
|
85
|
+
<% end %>
|
86
|
+
|
87
|
+
<div class="row column">
|
88
|
+
<%= form.file_field :add_photos, multiple: false, label: t("add_images", scope: "decidim.enhanced_textwork.paragraphs.edit") %>
|
89
|
+
</div>
|
90
|
+
</fieldset>
|
91
|
+
|
92
|
+
<fieldset class="gallery__container">
|
93
|
+
<legend><%= t("attachment_legend", scope: "decidim.enhanced_textwork.paragraphs.edit") %></legend>
|
94
|
+
|
95
|
+
<% if @form.documents.any? %>
|
96
|
+
<% @form.documents.each do |document| %>
|
97
|
+
<div class="callout" id="attachment_<%= document.id %>" data-closable>
|
98
|
+
<%= link_to translated_attribute(document.title), document.url %>
|
99
|
+
<small><%= document.file_type %> <%= number_to_human_size(document.file_size) %></small>
|
100
|
+
<%= form.hidden_field :documents, multiple: true, value: document.id, id: "document-#{document.id}" %>
|
101
|
+
<button class="close-button"
|
102
|
+
aria-label="<%= t("delete_document", scope: "decidim.enhanced_textwork.paragraphs.edit") %>"
|
103
|
+
title="<%= t("delete_document", scope: "decidim.enhanced_textwork.paragraphs.edit") %>"
|
104
|
+
type="button" data-close>
|
105
|
+
<span aria-hidden="true">×</span>
|
106
|
+
</button>
|
107
|
+
</div>
|
108
|
+
<% end %>
|
109
|
+
<% end %>
|
110
|
+
|
111
|
+
<div class="row column">
|
112
|
+
<%= form.file_field :add_documents, multiple: true, label: t("add_documents", scope: "decidim.enhanced_textwork.paragraphs.edit") %>
|
113
|
+
</div>
|
114
|
+
</fieldset>
|
115
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<%= render partial: "decidim/shared/filter_form_help", locals: { skip_to_id: "paragraphs" } %>
|
2
|
+
|
3
|
+
<%= filter_form_for filter do |form| %>
|
4
|
+
<div class="filters__section">
|
5
|
+
<div class="filters__search">
|
6
|
+
<div class="input-group">
|
7
|
+
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %>
|
8
|
+
<div class="input-group-button">
|
9
|
+
<button type="submit" class="button" aria-controls="paragraphs">
|
10
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
11
|
+
</button>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<%= form.hidden_field "state_withdraw", value: params.dig("filter", "state_withdraw") %>
|
18
|
+
|
19
|
+
<% if component_settings.paragraph_answering_enabled && current_settings.paragraph_answering_enabled %>
|
20
|
+
<%= form.check_boxes_tree :state, filter_paragraphs_state_values, legend_title: t(".state"), "aria-controls": "paragraphs" %>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<% if current_component.has_subscopes? %>
|
24
|
+
<%= form.check_boxes_tree :scope_id, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "paragraphs" %>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if current_component.categories.any? %>
|
28
|
+
<%= form.check_boxes_tree :category_id, filter_categories_values, legend_title: t(".category"), "aria-controls": "paragraphs" %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<% if component_settings.official_paragraphs_enabled %>
|
32
|
+
<%= form.check_boxes_tree :origin, filter_origin_values, legend_title: t(".origin"), "aria-controls": "paragraphs" %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if current_user %>
|
36
|
+
<%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, { legend_title: t(".activity") }, "aria-controls": "paragraphs" %>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<% if @paragraphs.only_emendations.any? %>
|
40
|
+
<%= form.collection_radio_buttons :type, filter_type_values, :first, :last, { legend_title: t(".amendment_type") }, "aria-controls": "paragraphs" %>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<% if linked_classes_for(Decidim::EnhancedTextwork::Paragraph).any? %>
|
44
|
+
<%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::EnhancedTextwork::Paragraph), :first, :last, { legend_title: t(".related_to") }, "aria-controls": "paragraphs" %>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
48
|
+
<% end %>
|