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,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
module Admin
|
6
|
+
module ParagraphBulkActionsHelper
|
7
|
+
# Public: Generates a select field with the valuators of the given participatory space.
|
8
|
+
#
|
9
|
+
# participatory_space - A participatory space instance.
|
10
|
+
# prompt - An i18n string to show as prompt
|
11
|
+
#
|
12
|
+
# Returns a String.
|
13
|
+
def bulk_valuators_select(participatory_space, prompt)
|
14
|
+
options_for_select = find_valuators_for_select(participatory_space)
|
15
|
+
select(:valuator_role, :id, options_for_select, prompt: prompt)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Internal: A method to cache to queries to find the valuators for the
|
19
|
+
# current space.
|
20
|
+
def find_valuators_for_select(participatory_space)
|
21
|
+
return @valuators_for_select if @valuators_for_select
|
22
|
+
|
23
|
+
valuator_roles = participatory_space.user_roles(:valuator)
|
24
|
+
valuators = Decidim::User.where(id: valuator_roles.pluck(:decidim_user_id)).to_a
|
25
|
+
|
26
|
+
@valuators_for_select = valuator_roles.map do |role|
|
27
|
+
valuator = valuators.find { |user| user.id == role.decidim_user_id }
|
28
|
+
|
29
|
+
[valuator.name, role.id]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
module Admin
|
6
|
+
# This class contains helpers needed to get rankings for a given paragraph
|
7
|
+
# ordered by some given criteria.
|
8
|
+
#
|
9
|
+
module ParagraphRankingsHelper
|
10
|
+
# Public: Gets the ranking for a given paragraph, ordered by some given
|
11
|
+
# criteria. Paragraph is sorted amongst its own siblings.
|
12
|
+
#
|
13
|
+
# Returns a Hash with two keys:
|
14
|
+
# :ranking - an Integer representing the ranking for the given paragraph.
|
15
|
+
# Ranking starts with 1.
|
16
|
+
# :total - an Integer representing the total number of ranked paragraphs.
|
17
|
+
#
|
18
|
+
# Examples:
|
19
|
+
# ranking_for(paragraph, paragraph_votes_count: :desc)
|
20
|
+
# ranking_for(paragraph, endorsements_count: :desc)
|
21
|
+
def ranking_for(paragraph, order = {})
|
22
|
+
siblings = Decidim::EnhancedTextwork::Paragraph.where(component: paragraph.component)
|
23
|
+
ranked = siblings.order([order, { id: :asc }])
|
24
|
+
ranked_ids = ranked.pluck(:id)
|
25
|
+
|
26
|
+
{ ranking: ranked_ids.index(paragraph.id) + 1, total: ranked_ids.count }
|
27
|
+
end
|
28
|
+
|
29
|
+
# Public: Gets the ranking for a given paragraph, ordered by endorsements.
|
30
|
+
def endorsements_ranking_for(paragraph)
|
31
|
+
ranking_for(paragraph, endorsements_count: :desc)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Public: Gets the ranking for a given paragraph, ordered by votes.
|
35
|
+
def votes_ranking_for(paragraph)
|
36
|
+
ranking_for(paragraph, paragraph_votes_count: :desc)
|
37
|
+
end
|
38
|
+
|
39
|
+
def i18n_endorsements_ranking_for(paragraph)
|
40
|
+
rankings = endorsements_ranking_for(paragraph)
|
41
|
+
|
42
|
+
I18n.t(
|
43
|
+
"ranking",
|
44
|
+
scope: "decidim.enhanced_textwork.admin.paragraphs.show",
|
45
|
+
ranking: rankings[:ranking],
|
46
|
+
total: rankings[:total]
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
def i18n_votes_ranking_for(paragraph)
|
51
|
+
rankings = votes_ranking_for(paragraph)
|
52
|
+
|
53
|
+
I18n.t(
|
54
|
+
"ranking",
|
55
|
+
scope: "decidim.enhanced_textwork.admin.paragraphs.show",
|
56
|
+
ranking: rankings[:ranking],
|
57
|
+
total: rankings[:total]
|
58
|
+
)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
module Admin
|
6
|
+
# This class contains helpers needed to format Meetings
|
7
|
+
# in order to use them in select forms for Paragraphs.
|
8
|
+
#
|
9
|
+
module ParagraphsHelper
|
10
|
+
include Decidim::Admin::ResourceScopeHelper
|
11
|
+
|
12
|
+
# Public: A formatted collection of Meetings to be used
|
13
|
+
# in forms.
|
14
|
+
def meetings_as_authors_selected
|
15
|
+
return unless @paragraph.present? && @paragraph.official_meeting?
|
16
|
+
|
17
|
+
@meetings_as_authors_selected ||= @paragraph.authors.pluck(:id)
|
18
|
+
end
|
19
|
+
|
20
|
+
def coauthor_presenters_for(paragraph)
|
21
|
+
paragraph.authors.map do |identity|
|
22
|
+
if identity.is_a?(Decidim::Organization)
|
23
|
+
Decidim::EnhancedTextwork::OfficialAuthorPresenter.new
|
24
|
+
else
|
25
|
+
present(identity)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def endorsers_presenters_for(paragraph)
|
31
|
+
paragraph.endorsements.for_listing.map { |identity| present(identity.normalized_author) }
|
32
|
+
end
|
33
|
+
|
34
|
+
def paragraph_complete_state(paragraph)
|
35
|
+
return humanize_paragraph_state(paragraph.internal_state).html_safe if paragraph.answered? && !paragraph.published_state?
|
36
|
+
|
37
|
+
humanize_paragraph_state(paragraph.state).html_safe
|
38
|
+
end
|
39
|
+
|
40
|
+
def paragraphs_admin_filter_tree
|
41
|
+
{
|
42
|
+
t("paragraphs.filters.type", scope: "decidim.enhanced_textwork") => {
|
43
|
+
link_to(t("paragraphs", scope: "decidim.enhanced_textwork.application_helper.filter_type_values"), q: ransak_params_for_query(is_emendation_true: "0"),
|
44
|
+
per_page: per_page) => nil,
|
45
|
+
link_to(t("amendments", scope: "decidim.enhanced_textwork.application_helper.filter_type_values"), q: ransak_params_for_query(is_emendation_true: "1"),
|
46
|
+
per_page: per_page) => nil
|
47
|
+
},
|
48
|
+
t("models.paragraph.fields.state", scope: "decidim.enhanced_textwork") =>
|
49
|
+
Decidim::EnhancedTextwork::Paragraph::POSSIBLE_STATES.each_with_object({}) do |state, hash|
|
50
|
+
if state == "not_answered"
|
51
|
+
hash[link_to((humanize_paragraph_state state), q: ransak_params_for_query(state_null: 1), per_page: per_page)] = nil
|
52
|
+
else
|
53
|
+
hash[link_to((humanize_paragraph_state state), q: ransak_params_for_query(state_eq: state), per_page: per_page)] = nil
|
54
|
+
end
|
55
|
+
end,
|
56
|
+
t("models.paragraph.fields.category", scope: "decidim.enhanced_textwork") => admin_filter_categories_tree(categories.first_class),
|
57
|
+
t("paragraphs.filters.scope", scope: "decidim.enhanced_textwork") => admin_filter_scopes_tree(current_component.organization.id)
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def paragraphs_admin_search_hidden_params
|
62
|
+
return unless params[:q]
|
63
|
+
|
64
|
+
tags = ""
|
65
|
+
tags += hidden_field_tag "per_page", params[:per_page] if params[:per_page]
|
66
|
+
tags += hidden_field_tag "q[is_emendation_true]", params[:q][:is_emendation_true] if params[:q][:is_emendation_true]
|
67
|
+
tags += hidden_field_tag "q[state_eq]", params[:q][:state_eq] if params[:q][:state_eq]
|
68
|
+
tags += hidden_field_tag "q[category_id_eq]", params[:q][:category_id_eq] if params[:q][:category_id_eq]
|
69
|
+
tags += hidden_field_tag "q[scope_id_eq]", params[:q][:scope_id_eq] if params[:q][:scope_id_eq]
|
70
|
+
tags.html_safe
|
71
|
+
end
|
72
|
+
|
73
|
+
def paragraphs_admin_filter_applied_filters
|
74
|
+
html = []
|
75
|
+
if params[:q][:is_emendation_true].present?
|
76
|
+
html << tag.span(class: "label secondary") do
|
77
|
+
tag = "#{t("filters.type", scope: "decidim.enhanced_textwork.paragraphs")}: "
|
78
|
+
tag += if params[:q][:is_emendation_true].to_s == "1"
|
79
|
+
t("amendments", scope: "decidim.enhanced_textwork.application_helper.filter_type_values")
|
80
|
+
else
|
81
|
+
t("paragraphs", scope: "decidim.enhanced_textwork.application_helper.filter_type_values")
|
82
|
+
end
|
83
|
+
tag += icon_link_to("circle-x", url_for(q: ransak_params_for_query_without(:is_emendation_true), per_page: per_page), t("decidim.admin.actions.cancel"),
|
84
|
+
class: "action-icon--remove")
|
85
|
+
tag.html_safe
|
86
|
+
end
|
87
|
+
end
|
88
|
+
if params[:q][:state_null]
|
89
|
+
html << tag.span(class: "label secondary") do
|
90
|
+
tag = "#{t("models.paragraph.fields.state", scope: "decidim.enhanced_textwork")}: "
|
91
|
+
tag += humanize_paragraph_state "not_answered"
|
92
|
+
tag += icon_link_to("circle-x", url_for(q: ransak_params_for_query_without(:state_null), per_page: per_page), t("decidim.admin.actions.cancel"),
|
93
|
+
class: "action-icon--remove")
|
94
|
+
tag.html_safe
|
95
|
+
end
|
96
|
+
end
|
97
|
+
if params[:q][:state_eq]
|
98
|
+
html << tag.span(class: "label secondary") do
|
99
|
+
tag = "#{t("models.paragraph.fields.state", scope: "decidim.enhanced_textwork")}: "
|
100
|
+
tag += humanize_paragraph_state params[:q][:state_eq]
|
101
|
+
tag += icon_link_to("circle-x", url_for(q: ransak_params_for_query_without(:state_eq), per_page: per_page), t("decidim.admin.actions.cancel"),
|
102
|
+
class: "action-icon--remove")
|
103
|
+
tag.html_safe
|
104
|
+
end
|
105
|
+
end
|
106
|
+
if params[:q][:category_id_eq]
|
107
|
+
html << tag.span(class: "label secondary") do
|
108
|
+
tag = "#{t("models.paragraph.fields.category", scope: "decidim.enhanced_textwork")}: "
|
109
|
+
tag += translated_attribute categories.find(params[:q][:category_id_eq]).name
|
110
|
+
tag += icon_link_to("circle-x", url_for(q: ransak_params_for_query_without(:category_id_eq), per_page: per_page), t("decidim.admin.actions.cancel"),
|
111
|
+
class: "action-icon--remove")
|
112
|
+
tag.html_safe
|
113
|
+
end
|
114
|
+
end
|
115
|
+
if params[:q][:scope_id_eq]
|
116
|
+
html << tag.span(class: "label secondary") do
|
117
|
+
tag = "#{t("models.paragraph.fields.scope", scope: "decidim.enhanced_textwork")}: "
|
118
|
+
tag += translated_attribute Decidim::Scope.where(decidim_organization_id: current_component.organization.id).find(params[:q][:scope_id_eq]).name
|
119
|
+
tag += icon_link_to("circle-x", url_for(q: ransak_params_for_query_without(:scope_id_eq), per_page: per_page), t("decidim.admin.actions.cancel"),
|
120
|
+
class: "action-icon--remove")
|
121
|
+
tag.html_safe
|
122
|
+
end
|
123
|
+
end
|
124
|
+
html.join(" ").html_safe
|
125
|
+
end
|
126
|
+
|
127
|
+
def icon_with_link_to_paragraph(paragraph)
|
128
|
+
icon, tooltip = if allowed_to?(:create, :paragraph_answer, paragraph: paragraph) && !paragraph.emendation?
|
129
|
+
[
|
130
|
+
"comment-square",
|
131
|
+
t(:answer_paragraph, scope: "decidim.enhanced_textwork.actions")
|
132
|
+
]
|
133
|
+
else
|
134
|
+
[
|
135
|
+
"info",
|
136
|
+
t(:show, scope: "decidim.enhanced_textwork.actions")
|
137
|
+
]
|
138
|
+
end
|
139
|
+
icon_link_to(icon, paragraph_path(paragraph), tooltip, class: "icon--small action-icon--show-paragraph")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
module Admin
|
6
|
+
# This class contains helpers needed to show the Paragraphs picker.
|
7
|
+
#
|
8
|
+
module EnhancedTextworkPickerHelper
|
9
|
+
def paragraphs_picker(form, field, url)
|
10
|
+
picker_options = {
|
11
|
+
id: sanitize_to_id(field),
|
12
|
+
class: "picker-multiple",
|
13
|
+
name: "#{form.object_name}[#{field.to_s.sub(/s$/, "_ids")}]",
|
14
|
+
multiple: true,
|
15
|
+
autosort: true
|
16
|
+
}
|
17
|
+
|
18
|
+
prompt_params = {
|
19
|
+
url: url,
|
20
|
+
text: t("paragraphs_picker.choose_paragraphs", scope: "decidim.enhanced_textwork")
|
21
|
+
}
|
22
|
+
|
23
|
+
form.data_picker(field, picker_options, prompt_params) do |item|
|
24
|
+
{ url: url, text: present(item).id_and_title }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,191 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
# Custom helpers, scoped to the paragraphs engine.
|
6
|
+
#
|
7
|
+
module ApplicationHelper
|
8
|
+
include Decidim::Comments::CommentsHelper
|
9
|
+
include PaginateHelper
|
10
|
+
include ParagraphVotesHelper
|
11
|
+
include ::Decidim::EndorsableHelper
|
12
|
+
include ::Decidim::FollowableHelper
|
13
|
+
include Decidim::MapHelper
|
14
|
+
include Decidim::EnhancedTextwork::MapHelper
|
15
|
+
include CollaborativeDraftHelper
|
16
|
+
include ControlVersionHelper
|
17
|
+
include Decidim::RichTextEditorHelper
|
18
|
+
include Decidim::CheckBoxesTreeHelper
|
19
|
+
|
20
|
+
delegate :minimum_votes_per_user, to: :component_settings
|
21
|
+
|
22
|
+
# Public: The state of a paragraph in a way a human can understand.
|
23
|
+
#
|
24
|
+
# state - The String state of the paragraph.
|
25
|
+
#
|
26
|
+
# Returns a String.
|
27
|
+
def humanize_paragraph_state(state)
|
28
|
+
I18n.t(state, scope: "decidim.enhanced_textwork.answers", default: :not_answered)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Public: The css class applied based on the paragraph state.
|
32
|
+
#
|
33
|
+
# paragraph - The paragraph to evaluate.
|
34
|
+
#
|
35
|
+
# Returns a String.
|
36
|
+
def paragraph_state_css_class(paragraph)
|
37
|
+
state = paragraph.state
|
38
|
+
state = paragraph.internal_state if paragraph.answered? && !paragraph.published_state?
|
39
|
+
|
40
|
+
case state
|
41
|
+
when "accepted"
|
42
|
+
"text-success"
|
43
|
+
when "rejected"
|
44
|
+
"text-alert"
|
45
|
+
when "evaluating"
|
46
|
+
"text-warning"
|
47
|
+
when "withdrawn"
|
48
|
+
"text-alert"
|
49
|
+
else
|
50
|
+
"text-info"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Public: The state of a paragraph in a way a human can understand.
|
55
|
+
#
|
56
|
+
# state - The String state of the paragraph.
|
57
|
+
#
|
58
|
+
# Returns a String.
|
59
|
+
def humanize_collaborative_draft_state(state)
|
60
|
+
I18n.t("decidim.enhanced_textwork.collaborative_drafts.states.#{state}", default: :open)
|
61
|
+
end
|
62
|
+
|
63
|
+
# Public: The css class applied based on the collaborative draft state.
|
64
|
+
#
|
65
|
+
# state - The String state of the collaborative draft.
|
66
|
+
#
|
67
|
+
# Returns a String.
|
68
|
+
def collaborative_draft_state_badge_css_class(state)
|
69
|
+
case state
|
70
|
+
when "open"
|
71
|
+
"success"
|
72
|
+
when "withdrawn"
|
73
|
+
"alert"
|
74
|
+
when "published"
|
75
|
+
"secondary"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def paragraph_limit_enabled?
|
80
|
+
paragraph_limit.present?
|
81
|
+
end
|
82
|
+
|
83
|
+
def minimum_votes_per_user_enabled?
|
84
|
+
minimum_votes_per_user.positive?
|
85
|
+
end
|
86
|
+
|
87
|
+
def not_from_collaborative_draft(paragraph)
|
88
|
+
paragraph.linked_resources(:paragraphs, "created_from_collaborative_draft").empty?
|
89
|
+
end
|
90
|
+
|
91
|
+
def not_from_participatory_text(paragraph)
|
92
|
+
paragraph.participatory_text_level.nil?
|
93
|
+
end
|
94
|
+
|
95
|
+
# If the paragraph is official or the rich text editor is enabled on the
|
96
|
+
# frontend, the paragraph body is considered as safe content; that's unless
|
97
|
+
# the paragraph comes from a collaborative_draft or a participatory_text.
|
98
|
+
def safe_content?
|
99
|
+
rich_text_editor_in_public_views? && not_from_collaborative_draft(@paragraph) ||
|
100
|
+
(@paragraph.official? || @paragraph.official_meeting?) && not_from_participatory_text(@paragraph)
|
101
|
+
end
|
102
|
+
|
103
|
+
# If the content is safe, HTML tags are sanitized, otherwise, they are stripped.
|
104
|
+
def render_paragraph_body(paragraph)
|
105
|
+
body = present(paragraph).body(links: true, strip_tags: !safe_content?)
|
106
|
+
body = simple_format(body, {}, sanitize: false)
|
107
|
+
|
108
|
+
return body unless safe_content?
|
109
|
+
|
110
|
+
decidim_sanitize(body)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Returns :text_area or :editor based on the organization' settings.
|
114
|
+
def text_editor_for_paragraph_body(form)
|
115
|
+
options = {
|
116
|
+
class: "js-hashtags",
|
117
|
+
hashtaggable: true,
|
118
|
+
value: form_presenter.body(extras: false).strip
|
119
|
+
}
|
120
|
+
|
121
|
+
text_editor_for(form, :body, options)
|
122
|
+
end
|
123
|
+
|
124
|
+
def paragraph_limit
|
125
|
+
return if component_settings.paragraph_limit.zero?
|
126
|
+
|
127
|
+
component_settings.paragraph_limit
|
128
|
+
end
|
129
|
+
|
130
|
+
def votes_given
|
131
|
+
@votes_given ||= ParagraphVote.where(
|
132
|
+
paragraph: Paragraph.where(component: current_component),
|
133
|
+
author: current_user
|
134
|
+
).count
|
135
|
+
end
|
136
|
+
|
137
|
+
def votes_count_for(model, from_paragraphs_list)
|
138
|
+
render partial: "decidim/enhanced_textwork/paragraphs/participatory_texts/paragraph_votes_count.html", locals: { paragraph: model, from_paragraphs_list: from_paragraphs_list }
|
139
|
+
end
|
140
|
+
|
141
|
+
def vote_button_for(model, from_paragraphs_list)
|
142
|
+
render partial: "decidim/enhanced_textwork/paragraphs/participatory_texts/paragraph_vote_button.html", locals: { paragraph: model, from_paragraphs_list: from_paragraphs_list }
|
143
|
+
end
|
144
|
+
|
145
|
+
def form_has_address?
|
146
|
+
@form.address.present? || @form.has_address
|
147
|
+
end
|
148
|
+
|
149
|
+
def show_voting_rules?
|
150
|
+
return false unless votes_enabled?
|
151
|
+
|
152
|
+
return true if vote_limit_enabled?
|
153
|
+
return true if threshold_per_paragraph_enabled?
|
154
|
+
return true if paragraph_limit_enabled?
|
155
|
+
return true if can_accumulate_supports_beyond_threshold?
|
156
|
+
return true if minimum_votes_per_user_enabled?
|
157
|
+
end
|
158
|
+
|
159
|
+
def filter_type_values
|
160
|
+
[
|
161
|
+
["all", t("decidim.enhanced_textwork.application_helper.filter_type_values.all")],
|
162
|
+
["paragraphs", t("decidim.enhanced_textwork.application_helper.filter_type_values.paragraphs")],
|
163
|
+
["amendments", t("decidim.enhanced_textwork.application_helper.filter_type_values.amendments")]
|
164
|
+
]
|
165
|
+
end
|
166
|
+
|
167
|
+
# Options to filter Paragraphs by activity.
|
168
|
+
def activity_filter_values
|
169
|
+
base = [
|
170
|
+
["all", t(".all")],
|
171
|
+
["my_paragraphs", t(".my_paragraphs")]
|
172
|
+
]
|
173
|
+
base += [["voted", t(".voted")]] if current_settings.votes_enabled?
|
174
|
+
base
|
175
|
+
end
|
176
|
+
|
177
|
+
def filter_origin_values
|
178
|
+
origin_values = []
|
179
|
+
origin_values << TreePoint.new("official", t("decidim.enhanced_textwork.application_helper.filter_origin_values.official")) if component_settings.official_paragraphs_enabled
|
180
|
+
origin_values << TreePoint.new("citizens", t("decidim.enhanced_textwork.application_helper.filter_origin_values.citizens"))
|
181
|
+
origin_values << TreePoint.new("user_group", t("decidim.enhanced_textwork.application_helper.filter_origin_values.user_groups")) if current_organization.user_groups_enabled?
|
182
|
+
origin_values << TreePoint.new("meeting", t("decidim.enhanced_textwork.application_helper.filter_origin_values.meetings"))
|
183
|
+
|
184
|
+
TreeNode.new(
|
185
|
+
TreePoint.new("", t("decidim.enhanced_textwork.application_helper.filter_origin_values.all")),
|
186
|
+
origin_values
|
187
|
+
)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
# Custom helpers, scoped to the paragraphs engine.
|
6
|
+
#
|
7
|
+
module CollaborativeDraftCellsHelper
|
8
|
+
include Decidim::EnhancedTextwork::ApplicationHelper
|
9
|
+
include Decidim::EnhancedTextwork::Engine.routes.url_helpers
|
10
|
+
include Decidim::LayoutHelper
|
11
|
+
include Decidim::ApplicationHelper
|
12
|
+
include Decidim::TranslationsHelper
|
13
|
+
include Decidim::ResourceReferenceHelper
|
14
|
+
include Decidim::TranslatableAttributes
|
15
|
+
include Decidim::CardHelper
|
16
|
+
|
17
|
+
delegate :title, :state, to: :model
|
18
|
+
|
19
|
+
def has_actions?
|
20
|
+
false
|
21
|
+
end
|
22
|
+
|
23
|
+
def current_settings
|
24
|
+
model.component.current_settings
|
25
|
+
end
|
26
|
+
|
27
|
+
def component_settings
|
28
|
+
model.component.settings
|
29
|
+
end
|
30
|
+
|
31
|
+
def current_component
|
32
|
+
model.component
|
33
|
+
end
|
34
|
+
|
35
|
+
def from_context
|
36
|
+
@options[:from]
|
37
|
+
end
|
38
|
+
|
39
|
+
def badge_name
|
40
|
+
humanize_collaborative_draft_state state
|
41
|
+
end
|
42
|
+
|
43
|
+
def state_classes
|
44
|
+
[collaborative_draft_state_badge_css_class(state).to_s]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
# Custom helpers, scoped to the collaborative_draft resource.
|
6
|
+
#
|
7
|
+
module CollaborativeDraftHelper
|
8
|
+
def filter_collaborative_drafts_state_values
|
9
|
+
scope = "decidim.enhanced_textwork.collaborative_drafts.filters"
|
10
|
+
Decidim::CheckBoxesTreeHelper::TreeNode.new(
|
11
|
+
Decidim::CheckBoxesTreeHelper::TreePoint.new("", t("all", scope: scope)),
|
12
|
+
[
|
13
|
+
Decidim::CheckBoxesTreeHelper::TreePoint.new("open", t("open", scope: scope)),
|
14
|
+
Decidim::CheckBoxesTreeHelper::TreePoint.new("withdrawn", t("withdrawn", scope: scope)),
|
15
|
+
Decidim::CheckBoxesTreeHelper::TreePoint.new("published", t("published", scope: scope))
|
16
|
+
]
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
def accept_request_button_label
|
21
|
+
t("accept_request", scope: "decidim.enhanced_textwork.collaborative_drafts.requests.collaboration_requests")
|
22
|
+
end
|
23
|
+
|
24
|
+
def reject_request_button_label
|
25
|
+
t("reject_request", scope: "decidim.enhanced_textwork.collaborative_drafts.requests.collaboration_requests")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
# Custom helpers, scoped to the paragraphs engine.
|
6
|
+
module ControlVersionHelper
|
7
|
+
def item_name
|
8
|
+
versioned_resource.model_name.singular_route_key.to_sym
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
# This helper include some methods for rendering paragraphs dynamic maps.
|
6
|
+
module MapHelper
|
7
|
+
include Decidim::ApplicationHelper
|
8
|
+
# Serialize a collection of geocoded paragraphs to be used by the dynamic map component
|
9
|
+
#
|
10
|
+
# geocoded_paragraphs - A collection of geocoded paragraphs
|
11
|
+
def paragraphs_data_for_map(geocoded_paragraphs)
|
12
|
+
geocoded_paragraphs.map do |paragraph|
|
13
|
+
paragraph_data_for_map(paragraph)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def paragraph_data_for_map(paragraph)
|
18
|
+
paragraph
|
19
|
+
.slice(:latitude, :longitude, :address)
|
20
|
+
.merge(
|
21
|
+
title: decidim_html_escape(present(paragraph).title),
|
22
|
+
body: html_truncate(decidim_sanitize(present(paragraph).body), length: 100),
|
23
|
+
icon: icon("paragraphs", width: 40, height: 70, remove_icon_class: true),
|
24
|
+
link: paragraph_path(paragraph)
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
def paragraph_preview_data_for_map(paragraph)
|
29
|
+
{
|
30
|
+
type: "drag-marker",
|
31
|
+
marker: paragraph.slice(
|
32
|
+
:latitude,
|
33
|
+
:longitude,
|
34
|
+
:address
|
35
|
+
).merge(
|
36
|
+
icon: icon("paragraphs", width: 40, height: 70, remove_icon_class: true)
|
37
|
+
)
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
def has_position?(paragraph)
|
42
|
+
return if paragraph.address.blank?
|
43
|
+
|
44
|
+
paragraph.latitude.present? && paragraph.longitude.present?
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module EnhancedTextwork
|
5
|
+
# Custom helpers, scoped to the paragraphs engine.
|
6
|
+
#
|
7
|
+
module ParagraphCellsHelper
|
8
|
+
include Decidim::EnhancedTextwork::ApplicationHelper
|
9
|
+
include Decidim::EnhancedTextwork::Engine.routes.url_helpers
|
10
|
+
include Decidim::LayoutHelper
|
11
|
+
include Decidim::ApplicationHelper
|
12
|
+
include Decidim::TranslationsHelper
|
13
|
+
include Decidim::ResourceReferenceHelper
|
14
|
+
include Decidim::TranslatableAttributes
|
15
|
+
include Decidim::CardHelper
|
16
|
+
|
17
|
+
delegate :title, :state, :published_state?, :withdrawn?, :amendable?, :emendation?, to: :model
|
18
|
+
|
19
|
+
def has_actions?
|
20
|
+
return context[:has_actions] if context[:has_actions].present?
|
21
|
+
|
22
|
+
paragraphs_controller? && index_action? && current_settings.votes_enabled? && !model.draft?
|
23
|
+
end
|
24
|
+
|
25
|
+
def has_footer?
|
26
|
+
return context[:has_footer] if context[:has_footer].present?
|
27
|
+
|
28
|
+
paragraphs_controller? && index_action? && current_settings.votes_enabled? && !model.draft?
|
29
|
+
end
|
30
|
+
|
31
|
+
def paragraphs_controller?
|
32
|
+
context[:controller].class.to_s == "Decidim::EnhancedTextwork::ParagraphsController"
|
33
|
+
end
|
34
|
+
|
35
|
+
def index_action?
|
36
|
+
context[:controller].action_name == "index"
|
37
|
+
end
|
38
|
+
|
39
|
+
def current_settings
|
40
|
+
model.component.current_settings
|
41
|
+
end
|
42
|
+
|
43
|
+
def component_settings
|
44
|
+
model.component.settings
|
45
|
+
end
|
46
|
+
|
47
|
+
def current_component
|
48
|
+
model.component
|
49
|
+
end
|
50
|
+
|
51
|
+
def from_context
|
52
|
+
@options[:from]
|
53
|
+
end
|
54
|
+
|
55
|
+
def badge_name
|
56
|
+
humanize_paragraph_state state
|
57
|
+
end
|
58
|
+
|
59
|
+
def state_classes
|
60
|
+
case state
|
61
|
+
when "accepted"
|
62
|
+
["success"]
|
63
|
+
when "rejected"
|
64
|
+
["alert"]
|
65
|
+
when "evaluating"
|
66
|
+
["warning"]
|
67
|
+
when "withdrawn"
|
68
|
+
["alert"]
|
69
|
+
else
|
70
|
+
["muted"]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|