decidim-participatory_documents 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.erb-lint.yml +30 -0
- data/.eslintignore +3 -0
- data/.eslintrc.json +3 -0
- data/.github/workflows/lint.yml +43 -0
- data/.github/workflows/test.yml +60 -0
- data/.gitignore +27 -0
- data/.rspec +3 -0
- data/.rubocop-disabled.yml +11 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_rails.yml +91 -0
- data/.rubocop_ruby.yml +1768 -0
- data/.ruby-version +1 -0
- data/.simplecov +13 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +39 -0
- data/Gemfile.lock +817 -0
- data/LICENSE-AGPLv3.txt +661 -0
- data/README.md +166 -0
- data/Rakefile +44 -0
- data/app/cells/decidim/participatory_documents/edit_suggestion_note_modal/show.erb +20 -0
- data/app/cells/decidim/participatory_documents/edit_suggestion_note_modal_cell.rb +35 -0
- data/app/cells/decidim/participatory_documents/suggestion/admin_answer.erb +7 -0
- data/app/cells/decidim/participatory_documents/suggestion/show.erb +11 -0
- data/app/cells/decidim/participatory_documents/suggestion_author/avatar.erb +3 -0
- data/app/cells/decidim/participatory_documents/suggestion_author/date.erb +1 -0
- data/app/cells/decidim/participatory_documents/suggestion_author/name.erb +3 -0
- data/app/cells/decidim/participatory_documents/suggestion_author/show.erb +9 -0
- data/app/cells/decidim/participatory_documents/suggestion_author_cell.rb +50 -0
- data/app/cells/decidim/participatory_documents/suggestion_cell.rb +41 -0
- data/app/commands/decidim/participatory_documents/admin/answer_suggestion.rb +62 -0
- data/app/commands/decidim/participatory_documents/admin/assign_suggestions_to_valuator.rb +59 -0
- data/app/commands/decidim/participatory_documents/admin/create_document.rb +55 -0
- data/app/commands/decidim/participatory_documents/admin/create_suggestion_note.rb +49 -0
- data/app/commands/decidim/participatory_documents/admin/destroy_annotation.rb +67 -0
- data/app/commands/decidim/participatory_documents/admin/notify_suggestion_answer.rb +52 -0
- data/app/commands/decidim/participatory_documents/admin/publish_answers.rb +59 -0
- data/app/commands/decidim/participatory_documents/admin/publish_document.rb +26 -0
- data/app/commands/decidim/participatory_documents/admin/unassign_suggestions_from_valuator.rb +60 -0
- data/app/commands/decidim/participatory_documents/admin/update_document.rb +85 -0
- data/app/commands/decidim/participatory_documents/admin/update_or_create_annotation.rb +98 -0
- data/app/commands/decidim/participatory_documents/admin/update_section.rb +52 -0
- data/app/commands/decidim/participatory_documents/admin/update_suggestion_note.rb +36 -0
- data/app/commands/decidim/participatory_documents/create_suggestion.rb +65 -0
- data/app/controllers/concerns/decidim/participatory_documents/admin/needs_admin_snippets.rb +25 -0
- data/app/controllers/concerns/decidim/participatory_documents/needs_pdf_document.rb +105 -0
- data/app/controllers/decidim/participatory_documents/admin/annotations_controller.rb +51 -0
- data/app/controllers/decidim/participatory_documents/admin/application_controller.rb +18 -0
- data/app/controllers/decidim/participatory_documents/admin/documents_controller.rb +104 -0
- data/app/controllers/decidim/participatory_documents/admin/sections_controller.rb +39 -0
- data/app/controllers/decidim/participatory_documents/admin/suggestion_notes_controller.rb +59 -0
- data/app/controllers/decidim/participatory_documents/admin/suggestions_controller.rb +160 -0
- data/app/controllers/decidim/participatory_documents/admin/valuation_assignments_controller.rb +58 -0
- data/app/controllers/decidim/participatory_documents/application_controller.rb +14 -0
- data/app/controllers/decidim/participatory_documents/document_suggestions_controller.rb +40 -0
- data/app/controllers/decidim/participatory_documents/documents_controller.rb +18 -0
- data/app/controllers/decidim/participatory_documents/section_suggestions_controller.rb +40 -0
- data/app/events/decidim/participatory_documents/suggestion_answer_event.rb +43 -0
- data/app/forms/decidim/participatory_documents/admin/annotation_form.rb +26 -0
- data/app/forms/decidim/participatory_documents/admin/answer_suggestion_form.rb +21 -0
- data/app/forms/decidim/participatory_documents/admin/document_form.rb +29 -0
- data/app/forms/decidim/participatory_documents/admin/section_form.rb +17 -0
- data/app/forms/decidim/participatory_documents/admin/suggestion_note_form.rb +15 -0
- data/app/forms/decidim/participatory_documents/admin/valuation_assignment_form.rb +38 -0
- data/app/forms/decidim/participatory_documents/suggestion_form.rb +39 -0
- data/app/helpers/decidim/participatory_documents/admin/button_helper.rb +17 -0
- data/app/helpers/decidim/participatory_documents/admin/documents_helper.rb +71 -0
- data/app/helpers/decidim/participatory_documents/admin/suggestion_helper.rb +54 -0
- data/app/helpers/decidim/participatory_documents/documents_helper.rb +41 -0
- data/app/models/concerns/decidim/participatory_documents/participatory_space_user_role_override.rb +19 -0
- data/app/models/concerns/decidim/participatory_documents/valuator_override.rb +18 -0
- data/app/models/decidim/participatory_documents/annotation.rb +28 -0
- data/app/models/decidim/participatory_documents/application_record.rb +10 -0
- data/app/models/decidim/participatory_documents/document.rb +67 -0
- data/app/models/decidim/participatory_documents/section.rb +44 -0
- data/app/models/decidim/participatory_documents/suggestion.rb +167 -0
- data/app/models/decidim/participatory_documents/suggestion_note.rb +18 -0
- data/app/models/decidim/participatory_documents/valuation_assignment.rb +21 -0
- data/app/packs/entrypoints/decidim_participatory_documents.js +6 -0
- data/app/packs/entrypoints/decidim_participatory_documents.scss +18 -0
- data/app/packs/entrypoints/decidim_participatory_documents_admin.js +7 -0
- data/app/packs/entrypoints/decidim_participatory_documents_admin.scss +69 -0
- data/app/packs/entrypoints/decidim_participatory_documents_editor.js +12 -0
- data/app/packs/entrypoints/decidim_participatory_documents_editor.scss +33 -0
- data/app/packs/entrypoints/decidim_participatory_documents_viewer.js +6 -0
- data/app/packs/entrypoints/decidim_participatory_documents_viewer.scss +11 -0
- data/app/packs/images/.keep +0 -0
- data/app/packs/images/badge.svg +6 -0
- data/app/packs/images/fullscreen.svg +6 -0
- data/app/packs/images/fullscreen_exit.svg +14 -0
- data/app/packs/images/group.svg +1 -0
- data/app/packs/images/move.svg +49 -0
- data/app/packs/images/participatory_documents.svg +14 -0
- data/app/packs/src/decidim/participatory_documents/admin/manage_bulk_suggestions.js +133 -0
- data/app/packs/src/decidim/participatory_documents/admin/preview_box_color.js +14 -0
- data/app/packs/src/decidim/participatory_documents/global.js +22 -0
- data/app/packs/src/decidim/participatory_documents/pdf/box.js +234 -0
- data/app/packs/src/decidim/participatory_documents/pdf/box_control_group.js +80 -0
- data/app/packs/src/decidim/participatory_documents/pdf/box_control_move.js +55 -0
- data/app/packs/src/decidim/participatory_documents/pdf/box_controls.js +18 -0
- data/app/packs/src/decidim/participatory_documents/pdf/pdf_modal_manager.js +129 -0
- data/app/packs/src/decidim/participatory_documents/pdf/pdf_state_manager.js +141 -0
- data/app/packs/src/decidim/participatory_documents/pdf/polygon_editor.js +99 -0
- data/app/packs/src/decidim/participatory_documents/pdf/polygon_viewer.js +55 -0
- data/app/packs/src/decidim/participatory_documents/pdf/suggestion_form.js +142 -0
- data/app/packs/src/decidim/participatory_documents/pdf.js +37 -0
- data/app/packs/src/decidim/participatory_documents/pdf_admin.js +60 -0
- data/app/packs/src/decidim/participatory_documents/pdf_notifications.js +20 -0
- data/app/packs/src/decidim/participatory_documents/skip_cookie_warning.js +10 -0
- data/app/packs/stylesheets/decidim/participatory_documents/decidim_admin_classes.scss +13 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/admin_modals.scss +41 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/admin_polygons.scss +131 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/admin_tweaks.scss +44 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/defaults.scss +7 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/document.scss +7 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/modals.scss +152 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/notifications.scss +31 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/polygons.scss +80 -0
- data/app/packs/stylesheets/decidim/participatory_documents/pdf/tweaks.scss +147 -0
- data/app/permissions/decidim/participatory_documents/admin/permissions.rb +118 -0
- data/app/permissions/decidim/participatory_documents/permissions.rb +16 -0
- data/app/presenters/decidim/participatory_documents/admin_log/annotation_presenter.rb +25 -0
- data/app/presenters/decidim/participatory_documents/admin_log/document_presenter.rb +13 -0
- data/app/presenters/decidim/participatory_documents/admin_log/section_presenter.rb +25 -0
- data/app/presenters/decidim/participatory_documents/admin_log/suggestion_note_presenter.rb +49 -0
- data/app/serializers/decidim/participatory_documents/suggestion_serializer.rb +67 -0
- data/app/uploaders/decidim/participatory_documents/pdf_document_uploader.rb +11 -0
- data/app/views/decidim/admin/exports/_dropdown.html.erb +16 -0
- data/app/views/decidim/participatory_documents/admin/documents/_editor_modal.html.erb +3 -0
- data/app/views/decidim/participatory_documents/admin/documents/_form.html.erb +39 -0
- data/app/views/decidim/participatory_documents/admin/documents/_title.html.erb +7 -0
- data/app/views/decidim/participatory_documents/admin/documents/edit.html.erb +18 -0
- data/app/views/decidim/participatory_documents/admin/documents/edit_pdf.html.erb +15 -0
- data/app/views/decidim/participatory_documents/admin/documents/index.html.erb +11 -0
- data/app/views/decidim/participatory_documents/admin/documents/new.html.erb +17 -0
- data/app/views/decidim/participatory_documents/admin/documents/pdf_viewer.html.erb +105 -0
- data/app/views/decidim/participatory_documents/admin/sections/_form.html.erb +24 -0
- data/app/views/decidim/participatory_documents/admin/suggestion_notes/_editing_suggestion_note.html.erb +18 -0
- data/app/views/decidim/participatory_documents/admin/suggestion_notes/_form.html.erb +8 -0
- data/app/views/decidim/participatory_documents/admin/suggestion_notes/_suggestion_notes.html.erb +46 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/_add_valuators.html.erb +17 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/_bulk-actions.html.erb +7 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/_form.html.erb +30 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/_js-callout.html.erb +6 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/_suggestion.html.erb +33 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/_valuators.html.erb +43 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_assign_to_valuator.html.erb +15 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_dropdown.html.erb +36 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_publish_answers.html.erb +14 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_unassign_from_valuator.html.erb +15 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/index.html.erb +45 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/publish_answers.js.erb +17 -0
- data/app/views/decidim/participatory_documents/admin/suggestions/show.html.erb +55 -0
- data/app/views/decidim/participatory_documents/document_suggestions/_form.html.erb +29 -0
- data/app/views/decidim/participatory_documents/document_suggestions/index.html.erb +14 -0
- data/app/views/decidim/participatory_documents/documents/_pdfjs_base.html.erb +428 -0
- data/app/views/decidim/participatory_documents/documents/index.html.erb +27 -0
- data/app/views/decidim/participatory_documents/documents/pdf_viewer.html.erb +63 -0
- data/app/views/decidim/participatory_documents/section_suggestions/_form.html.erb +8 -0
- data/app/views/decidim/participatory_documents/section_suggestions/index.html.erb +14 -0
- data/babel.config.json +25 -0
- data/bin/bundle +62 -0
- data/bin/rails +6 -0
- data/bin/webpack-dev-server +6 -0
- data/codecov.yml +11 -0
- data/config/assets.rb +11 -0
- data/config/i18n-tasks.yml +12 -0
- data/config/locales/en.yml +266 -0
- data/crowdin.yml +45 -0
- data/db/migrate/20221018112720_create_decidim_participatory_documents_document.rb +17 -0
- data/db/migrate/20221115233021_create_decidim_participatory_documents_participation_sections.rb +12 -0
- data/db/migrate/20221115233022_create_decidim_participatory_documents_annotations.rb +13 -0
- data/db/migrate/20221115233023_create_decidim_participatory_documents_suggestions.rb +17 -0
- data/db/migrate/20221115233024_create_decidim_participatory_documents_suggestion_notes.rb +15 -0
- data/db/migrate/20221115233024_create_decidim_participatory_documents_valuation_assignments.rb +12 -0
- data/db/migrate/20230616100340_add_published_at_to_decidim_participatory_documents_documents.rb +8 -0
- data/db/migrate/20230622081831_add_decidim_participatory_documents_box_positions.rb +37 -0
- data/decidim-participatory_documents.gemspec +30 -0
- data/lib/decidim/participatory_documents/admin.rb +8 -0
- data/lib/decidim/participatory_documents/admin_engine.rb +45 -0
- data/lib/decidim/participatory_documents/component.rb +202 -0
- data/lib/decidim/participatory_documents/engine.rb +46 -0
- data/lib/decidim/participatory_documents/seeds/Exampledocument.pdf +0 -0
- data/lib/decidim/participatory_documents/test/factories.rb +144 -0
- data/lib/decidim/participatory_documents/version.rb +9 -0
- data/lib/decidim/participatory_documents.rb +29 -0
- data/lib/tasks/decidim_participatory_documents.rake +27 -0
- data/package-lock.json +12687 -0
- data/package.json +52 -0
- data/pdfjs/LICENSE +177 -0
- data/pdfjs/README.md +12 -0
- data/pdfjs/build/pdf.js +15629 -0
- data/pdfjs/build/pdf.js.map +1 -0
- data/pdfjs/build/pdf.sandbox.js +280 -0
- data/pdfjs/build/pdf.sandbox.js.map +1 -0
- data/pdfjs/build/pdf.worker.js +64496 -0
- data/pdfjs/build/pdf.worker.js.map +1 -0
- data/pdfjs/web/cmaps/78-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/78-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/78-H.bcmap +0 -0
- data/pdfjs/web/cmaps/78-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/78-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/78-V.bcmap +0 -0
- data/pdfjs/web/cmaps/78ms-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Add-H.bcmap +0 -0
- data/pdfjs/web/cmaps/Add-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/Add-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Add-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-0.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-1.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-3.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-4.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-5.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-0.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-1.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-3.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-4.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-5.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-6.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Korea1-0.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Korea1-1.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Korea1-2.bcmap +0 -0
- data/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- data/pdfjs/web/cmaps/B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/B5pc-H.bcmap +0 -0
- data/pdfjs/web/cmaps/B5pc-V.bcmap +0 -0
- data/pdfjs/web/cmaps/CNS-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/CNS-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/CNS1-H.bcmap +0 -0
- data/pdfjs/web/cmaps/CNS1-V.bcmap +0 -0
- data/pdfjs/web/cmaps/CNS2-H.bcmap +0 -0
- data/pdfjs/web/cmaps/CNS2-V.bcmap +3 -0
- data/pdfjs/web/cmaps/ETHK-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/ETHK-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/ETen-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/ETen-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/ETenms-B5-H.bcmap +3 -0
- data/pdfjs/web/cmaps/ETenms-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Ext-H.bcmap +0 -0
- data/pdfjs/web/cmaps/Ext-RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/Ext-RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Ext-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GB-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GB-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GB-H.bcmap +4 -0
- data/pdfjs/web/cmaps/GB-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBK-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBK-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBK2K-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBK2K-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBKp-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBKp-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBT-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBT-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBT-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBT-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBTpc-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBTpc-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/GBpc-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/GBpc-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKdla-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKdla-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/HKdlb-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKdlb-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/HKgccs-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKgccs-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/HKm314-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKm314-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/HKm471-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKm471-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/HKscs-B5-H.bcmap +0 -0
- data/pdfjs/web/cmaps/HKscs-B5-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Hankaku.bcmap +0 -0
- data/pdfjs/web/cmaps/Hiragana.bcmap +0 -0
- data/pdfjs/web/cmaps/KSC-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/KSC-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/KSC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/KSC-Johab-H.bcmap +0 -0
- data/pdfjs/web/cmaps/KSC-Johab-V.bcmap +0 -0
- data/pdfjs/web/cmaps/KSC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/KSCms-UHC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- data/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- data/pdfjs/web/cmaps/KSCms-UHC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/KSCpc-EUC-H.bcmap +0 -0
- data/pdfjs/web/cmaps/KSCpc-EUC-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Katakana.bcmap +0 -0
- data/pdfjs/web/cmaps/LICENSE +36 -0
- data/pdfjs/web/cmaps/NWP-H.bcmap +0 -0
- data/pdfjs/web/cmaps/NWP-V.bcmap +0 -0
- data/pdfjs/web/cmaps/RKSJ-H.bcmap +0 -0
- data/pdfjs/web/cmaps/RKSJ-V.bcmap +0 -0
- data/pdfjs/web/cmaps/Roman.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UCS2-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UTF16-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UTF16-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UTF8-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniGB-UTF8-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UCS2-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UCS2-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UTF16-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UTF16-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UTF32-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UTF32-V.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UTF8-H.bcmap +0 -0
- data/pdfjs/web/cmaps/UniKS-UTF8-V.bcmap +0 -0
- data/pdfjs/web/cmaps/V.bcmap +0 -0
- data/pdfjs/web/cmaps/WP-Symbol.bcmap +0 -0
- data/pdfjs/web/compressed.tracemonkey-pldi-09.pdf +0 -0
- data/pdfjs/web/debugger.css +113 -0
- data/pdfjs/web/debugger.js +612 -0
- data/pdfjs/web/images/annotation-check.svg +11 -0
- data/pdfjs/web/images/annotation-comment.svg +16 -0
- data/pdfjs/web/images/annotation-help.svg +26 -0
- data/pdfjs/web/images/annotation-insert.svg +10 -0
- data/pdfjs/web/images/annotation-key.svg +11 -0
- data/pdfjs/web/images/annotation-newparagraph.svg +11 -0
- data/pdfjs/web/images/annotation-noicon.svg +7 -0
- data/pdfjs/web/images/annotation-note.svg +42 -0
- data/pdfjs/web/images/annotation-paperclip.svg +6 -0
- data/pdfjs/web/images/annotation-paragraph.svg +16 -0
- data/pdfjs/web/images/annotation-pushpin.svg +7 -0
- data/pdfjs/web/images/cursor-editorFreeText.svg +3 -0
- data/pdfjs/web/images/cursor-editorInk.svg +4 -0
- data/pdfjs/web/images/findbarButton-next.svg +3 -0
- data/pdfjs/web/images/findbarButton-previous.svg +3 -0
- data/pdfjs/web/images/loading-dark.svg +24 -0
- data/pdfjs/web/images/loading-icon.gif +0 -0
- data/pdfjs/web/images/loading.svg +1 -0
- data/pdfjs/web/images/secondaryToolbarButton-documentProperties.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-firstPage.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-handTool.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-lastPage.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-rotateCw.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-scrollPage.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-selectTool.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-spreadEven.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-spreadNone.svg +3 -0
- data/pdfjs/web/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- data/pdfjs/web/images/shadow.png +0 -0
- data/pdfjs/web/images/toolbarButton-bookmark.svg +3 -0
- data/pdfjs/web/images/toolbarButton-currentOutlineItem.svg +3 -0
- data/pdfjs/web/images/toolbarButton-download.svg +4 -0
- data/pdfjs/web/images/toolbarButton-editorFreeText.svg +3 -0
- data/pdfjs/web/images/toolbarButton-editorInk.svg +4 -0
- data/pdfjs/web/images/toolbarButton-menuArrow.svg +3 -0
- data/pdfjs/web/images/toolbarButton-openFile.svg +3 -0
- data/pdfjs/web/images/toolbarButton-pageDown.svg +3 -0
- data/pdfjs/web/images/toolbarButton-pageUp.svg +3 -0
- data/pdfjs/web/images/toolbarButton-presentationMode.svg +3 -0
- data/pdfjs/web/images/toolbarButton-print.svg +3 -0
- data/pdfjs/web/images/toolbarButton-search.svg +3 -0
- data/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- data/pdfjs/web/images/toolbarButton-sidebarToggle.svg +3 -0
- data/pdfjs/web/images/toolbarButton-viewAttachments.svg +3 -0
- data/pdfjs/web/images/toolbarButton-viewLayers.svg +3 -0
- data/pdfjs/web/images/toolbarButton-viewOutline.svg +3 -0
- data/pdfjs/web/images/toolbarButton-viewThumbnail.svg +3 -0
- data/pdfjs/web/images/toolbarButton-zoomIn.svg +3 -0
- data/pdfjs/web/images/toolbarButton-zoomOut.svg +3 -0
- data/pdfjs/web/images/treeitem-collapsed.svg +1 -0
- data/pdfjs/web/images/treeitem-expanded.svg +1 -0
- data/pdfjs/web/locale/ach/viewer.properties +200 -0
- data/pdfjs/web/locale/af/viewer.properties +177 -0
- data/pdfjs/web/locale/an/viewer.properties +243 -0
- data/pdfjs/web/locale/ar/viewer.properties +247 -0
- data/pdfjs/web/locale/ast/viewer.properties +207 -0
- data/pdfjs/web/locale/az/viewer.properties +243 -0
- data/pdfjs/web/locale/be/viewer.properties +274 -0
- data/pdfjs/web/locale/bg/viewer.properties +235 -0
- data/pdfjs/web/locale/bn/viewer.properties +239 -0
- data/pdfjs/web/locale/bo/viewer.properties +238 -0
- data/pdfjs/web/locale/br/viewer.properties +247 -0
- data/pdfjs/web/locale/brx/viewer.properties +205 -0
- data/pdfjs/web/locale/bs/viewer.properties +194 -0
- data/pdfjs/web/locale/ca/viewer.properties +251 -0
- data/pdfjs/web/locale/cak/viewer.properties +249 -0
- data/pdfjs/web/locale/ckb/viewer.properties +234 -0
- data/pdfjs/web/locale/cs/viewer.properties +274 -0
- data/pdfjs/web/locale/cy/viewer.properties +274 -0
- data/pdfjs/web/locale/da/viewer.properties +274 -0
- data/pdfjs/web/locale/de/viewer.properties +274 -0
- data/pdfjs/web/locale/dsb/viewer.properties +274 -0
- data/pdfjs/web/locale/el/viewer.properties +274 -0
- data/pdfjs/web/locale/en-CA/viewer.properties +274 -0
- data/pdfjs/web/locale/en-GB/viewer.properties +274 -0
- data/pdfjs/web/locale/en-US/viewer.properties +253 -0
- data/pdfjs/web/locale/eo/viewer.properties +274 -0
- data/pdfjs/web/locale/es-AR/viewer.properties +274 -0
- data/pdfjs/web/locale/es-CL/viewer.properties +274 -0
- data/pdfjs/web/locale/es-ES/viewer.properties +274 -0
- data/pdfjs/web/locale/es-MX/viewer.properties +274 -0
- data/pdfjs/web/locale/et/viewer.properties +262 -0
- data/pdfjs/web/locale/eu/viewer.properties +272 -0
- data/pdfjs/web/locale/fa/viewer.properties +216 -0
- data/pdfjs/web/locale/ff/viewer.properties +235 -0
- data/pdfjs/web/locale/fi/viewer.properties +274 -0
- data/pdfjs/web/locale/fr/viewer.properties +274 -0
- data/pdfjs/web/locale/fy-NL/viewer.properties +274 -0
- data/pdfjs/web/locale/ga-IE/viewer.properties +202 -0
- data/pdfjs/web/locale/gd/viewer.properties +249 -0
- data/pdfjs/web/locale/gl/viewer.properties +249 -0
- data/pdfjs/web/locale/gn/viewer.properties +274 -0
- data/pdfjs/web/locale/gu-IN/viewer.properties +235 -0
- data/pdfjs/web/locale/he/viewer.properties +274 -0
- data/pdfjs/web/locale/hi-IN/viewer.properties +235 -0
- data/pdfjs/web/locale/hr/viewer.properties +249 -0
- data/pdfjs/web/locale/hsb/viewer.properties +274 -0
- data/pdfjs/web/locale/hu/viewer.properties +274 -0
- data/pdfjs/web/locale/hy-AM/viewer.properties +239 -0
- data/pdfjs/web/locale/hye/viewer.properties +252 -0
- data/pdfjs/web/locale/ia/viewer.properties +274 -0
- data/pdfjs/web/locale/id/viewer.properties +274 -0
- data/pdfjs/web/locale/is/viewer.properties +274 -0
- data/pdfjs/web/locale/it/viewer.properties +215 -0
- data/pdfjs/web/locale/ja/viewer.properties +274 -0
- data/pdfjs/web/locale/ka/viewer.properties +274 -0
- data/pdfjs/web/locale/kab/viewer.properties +274 -0
- data/pdfjs/web/locale/kk/viewer.properties +274 -0
- data/pdfjs/web/locale/km/viewer.properties +210 -0
- data/pdfjs/web/locale/kn/viewer.properties +187 -0
- data/pdfjs/web/locale/ko/viewer.properties +274 -0
- data/pdfjs/web/locale/lij/viewer.properties +235 -0
- data/pdfjs/web/locale/lo/viewer.properties +145 -0
- data/pdfjs/web/locale/locale.properties +327 -0
- data/pdfjs/web/locale/lt/viewer.properties +260 -0
- data/pdfjs/web/locale/ltg/viewer.properties +213 -0
- data/pdfjs/web/locale/lv/viewer.properties +235 -0
- data/pdfjs/web/locale/meh/viewer.properties +111 -0
- data/pdfjs/web/locale/mk/viewer.properties +139 -0
- data/pdfjs/web/locale/mr/viewer.properties +231 -0
- data/pdfjs/web/locale/ms/viewer.properties +235 -0
- data/pdfjs/web/locale/my/viewer.properties +191 -0
- data/pdfjs/web/locale/nb-NO/viewer.properties +274 -0
- data/pdfjs/web/locale/ne-NP/viewer.properties +218 -0
- data/pdfjs/web/locale/nl/viewer.properties +274 -0
- data/pdfjs/web/locale/nn-NO/viewer.properties +274 -0
- data/pdfjs/web/locale/oc/viewer.properties +274 -0
- data/pdfjs/web/locale/pa-IN/viewer.properties +285 -0
- data/pdfjs/web/locale/pl/viewer.properties +274 -0
- data/pdfjs/web/locale/pt-BR/viewer.properties +274 -0
- data/pdfjs/web/locale/pt-PT/viewer.properties +274 -0
- data/pdfjs/web/locale/rm/viewer.properties +274 -0
- data/pdfjs/web/locale/ro/viewer.properties +241 -0
- data/pdfjs/web/locale/ru/viewer.properties +274 -0
- data/pdfjs/web/locale/sat/viewer.properties +198 -0
- data/pdfjs/web/locale/sc/viewer.properties +240 -0
- data/pdfjs/web/locale/scn/viewer.properties +101 -0
- data/pdfjs/web/locale/sco/viewer.properties +249 -0
- data/pdfjs/web/locale/si/viewer.properties +237 -0
- data/pdfjs/web/locale/sk/viewer.properties +274 -0
- data/pdfjs/web/locale/sl/viewer.properties +274 -0
- data/pdfjs/web/locale/son/viewer.properties +173 -0
- data/pdfjs/web/locale/sq/viewer.properties +267 -0
- data/pdfjs/web/locale/sr/viewer.properties +253 -0
- data/pdfjs/web/locale/sv-SE/viewer.properties +274 -0
- data/pdfjs/web/locale/szl/viewer.properties +245 -0
- data/pdfjs/web/locale/ta/viewer.properties +194 -0
- data/pdfjs/web/locale/te/viewer.properties +237 -0
- data/pdfjs/web/locale/tg/viewer.properties +274 -0
- data/pdfjs/web/locale/th/viewer.properties +274 -0
- data/pdfjs/web/locale/tl/viewer.properties +243 -0
- data/pdfjs/web/locale/tr/viewer.properties +274 -0
- data/pdfjs/web/locale/trs/viewer.properties +206 -0
- data/pdfjs/web/locale/uk/viewer.properties +274 -0
- data/pdfjs/web/locale/ur/viewer.properties +239 -0
- data/pdfjs/web/locale/uz/viewer.properties +163 -0
- data/pdfjs/web/locale/vi/viewer.properties +274 -0
- data/pdfjs/web/locale/wo/viewer.properties +123 -0
- data/pdfjs/web/locale/xh/viewer.properties +177 -0
- data/pdfjs/web/locale/zh-CN/viewer.properties +274 -0
- data/pdfjs/web/locale/zh-TW/viewer.properties +274 -0
- data/pdfjs/web/standard_fonts/FoxitDingbats.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitFixed.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitFixedBold.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitFixedItalic.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSans.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSansBold.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSansBoldItalic.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSansItalic.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSerif.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSerifBold.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSerifItalic.pfb +0 -0
- data/pdfjs/web/standard_fonts/FoxitSymbol.pfb +0 -0
- data/pdfjs/web/standard_fonts/LICENSE_FOXIT +27 -0
- data/pdfjs/web/standard_fonts/LICENSE_LIBERATION +102 -0
- data/pdfjs/web/standard_fonts/LiberationSans-Bold.ttf +0 -0
- data/pdfjs/web/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- data/pdfjs/web/standard_fonts/LiberationSans-Italic.ttf +0 -0
- data/pdfjs/web/standard_fonts/LiberationSans-Regular.ttf +0 -0
- data/pdfjs/web/viewer.css +3029 -0
- data/pdfjs/web/viewer.html +433 -0
- data/pdfjs/web/viewer.js +13566 -0
- data/pdfjs/web/viewer.js.map +1 -0
- metadata +643 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
<% if document.present? && document.file.attached? %>
|
2
|
+
<div class="row">
|
3
|
+
<%= content_tag(:h3, translated_attribute(document.title), class: "title") if translated_attribute(document.title).present? %>
|
4
|
+
<%= content_tag(:p, translated_attribute(document.description).html_safe, class: "description") if translated_attribute(document.description).present? %>
|
5
|
+
<% if preview_mode? %>
|
6
|
+
<div class="callout announcement mb-sm warning cell-announcement">
|
7
|
+
<p class="heading5"><%= t("decidim.participatory_documents.documents.preview_title") %></p>
|
8
|
+
<p><%= t("decidim.participatory_documents.documents.publish_description") %></p>
|
9
|
+
<div class="flex--fsc">
|
10
|
+
<%= back_edit_pdf_btn %>
|
11
|
+
<%= finish_publish_btn %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
<div class="row pdf-viewer-container">
|
17
|
+
<pdf-iframe src="<%= pdf_viewer_documents_path(file: document.attached_uploader(:file).path) %>" width="100%" height="100%" id="pdf-iframe" frameborder="0" allowfullscreen_="" webkitallowfullscreen_="true" mozallowfullscreen_="true" oallowfullscreen_="true" msallowfullscreen_="true">
|
18
|
+
<noscript>
|
19
|
+
<h3 class="text-center"><%= t("decidim.participatory_documents.documents.not_supported") %></h3>
|
20
|
+
</noscript>
|
21
|
+
</pdf-iframe>
|
22
|
+
</div>
|
23
|
+
<% else %>
|
24
|
+
<div class="row">
|
25
|
+
<p><%= t("decidim.participatory_documents.documents.missing") %></p>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html dir="ltr" mozdisallowselectionprint>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
6
|
+
<meta name="google" content="notranslate">
|
7
|
+
<title>PDF.js viewer</title>
|
8
|
+
|
9
|
+
<link rel="stylesheet" href="/pdfjs/web/viewer.css">
|
10
|
+
|
11
|
+
<script src="/pdfjs/build/pdf.js"></script>
|
12
|
+
|
13
|
+
<!-- This snippet is used in production (included from viewer.html) -->
|
14
|
+
<link rel="resource" type="application/l10n" href="/pdfjs/web/locale/locale.properties">
|
15
|
+
<script src="/pdfjs/web/viewer.js"></script>
|
16
|
+
<%= javascript_pack_tag "decidim_participatory_documents_viewer" %>
|
17
|
+
<%= stylesheet_pack_tag "decidim_participatory_documents_viewer" %>
|
18
|
+
<%= organization_colors %>
|
19
|
+
<%= pdf_custom_style %>
|
20
|
+
<%= csrf_meta_tags %>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body tabindex="1">
|
24
|
+
<%= render "decidim/participatory_documents/documents/pdfjs_base", displaySave: false, globalSuggestions: true %>
|
25
|
+
|
26
|
+
<div id="notifications"></div>
|
27
|
+
|
28
|
+
<div id="participation-modal"></div>
|
29
|
+
|
30
|
+
<script>
|
31
|
+
|
32
|
+
var I18n = <%= I18n.t("decidim.participatory_documents.ui_messages").to_json.html_safe %>;
|
33
|
+
var DocumentPath = '<%= document_path(document).split("?")[0] %>';
|
34
|
+
var CurrentBoxes = <%= document.annotations.collect(&:serialize).to_json.html_safe %>;
|
35
|
+
var pages = {};
|
36
|
+
|
37
|
+
PDFViewerApplication.initializedPromise.then(function() {
|
38
|
+
var options = {
|
39
|
+
i18n: I18n,
|
40
|
+
documentPath: DocumentPath,
|
41
|
+
globalSuggestionsButton: document.getElementById("globalSuggestionTrigger"),
|
42
|
+
participationLayout: document.getElementById("participation-modal")
|
43
|
+
};
|
44
|
+
|
45
|
+
window.InitDocumentManagers(options);
|
46
|
+
|
47
|
+
window.showInfo(I18n.startSuggesting, {delay: 5000});
|
48
|
+
|
49
|
+
PDFViewerApplication.eventBus.on('annotationeditorlayerrendered', function (doc) {
|
50
|
+
var page = PDFViewerApplication.pdfViewer._pages[doc.pageNumber - 1];
|
51
|
+
var annotationsLayer = page.annotationEditorLayer && page.annotationEditorLayer.div;
|
52
|
+
var savedPage = pages[doc.pageNumber];
|
53
|
+
// Let's render the object only if not already existing.
|
54
|
+
// Note that the PDF library might redraw the annotation layer, if this happens we need to re-render the areas.
|
55
|
+
if(annotationsLayer && (!savedPage || savedPage.boxEditor.div !== annotationsLayer)) {
|
56
|
+
page.boxEditor = window.InitPolygonViewer(annotationsLayer, CurrentBoxes.filter(box => box.page_number === doc.pageNumber), options);
|
57
|
+
pages[doc.pageNumber] = page;
|
58
|
+
}
|
59
|
+
});
|
60
|
+
});
|
61
|
+
</script>
|
62
|
+
</body>
|
63
|
+
</html>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= decidim_form_for(@form, url: document_section_suggestions_path(document, section_id: section.id), html: { class: "form" }) do |form| %>
|
2
|
+
<div class="column">
|
3
|
+
<%= form.text_area :body %>
|
4
|
+
</div>
|
5
|
+
<div class="button--double form-general-submit">
|
6
|
+
<%= form.submit t("send_suggestion", scope: "decidim.participatory_documents.document"), id: "editor-modal-save", name: "editor-modal-save" %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="suggestions-list">
|
2
|
+
<h3 id="suggestions__title">
|
3
|
+
<%= translated_attribute section.title %>
|
4
|
+
<a href="#" class="close" id="close-suggestions" title="<%= t "close", scope: "decidim.participatory_documents.document" %>">×</a>
|
5
|
+
</h3>
|
6
|
+
<% suggestions.each do |suggestion| %>
|
7
|
+
<%= cell("decidim/participatory_documents/suggestion", suggestion) %>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div id="participation-modal-form">
|
12
|
+
<div class="form-error is-visible"><%= error_message if defined?(error_message) %></div>
|
13
|
+
<%= render "decidim/participatory_documents/section_suggestions/form" %>
|
14
|
+
</div>
|
data/babel.config.json
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"presets": [
|
3
|
+
[
|
4
|
+
"@babel/preset-env", {
|
5
|
+
"forceAllTransforms": true,
|
6
|
+
"useBuiltIns": "entry",
|
7
|
+
"corejs": 3,
|
8
|
+
"modules": false
|
9
|
+
}
|
10
|
+
],
|
11
|
+
["@babel/preset-react"]
|
12
|
+
],
|
13
|
+
"plugins": [
|
14
|
+
"@babel/plugin-transform-classes",
|
15
|
+
[
|
16
|
+
"@babel/plugin-transform-runtime",
|
17
|
+
{
|
18
|
+
"helpers": false,
|
19
|
+
"regenerator": true,
|
20
|
+
"corejs": false
|
21
|
+
}
|
22
|
+
],
|
23
|
+
["@babel/plugin-transform-regenerator", { "async": false }]
|
24
|
+
]
|
25
|
+
}
|
data/bin/bundle
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "rubygems"
|
5
|
+
|
6
|
+
m = Module.new do
|
7
|
+
extend self
|
8
|
+
|
9
|
+
def invoked_as_script?
|
10
|
+
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
11
|
+
end
|
12
|
+
|
13
|
+
def cli_arg_version
|
14
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
15
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
16
|
+
|
17
|
+
bundler_version = nil
|
18
|
+
update_index = nil
|
19
|
+
ARGV.each_with_index do |a, i|
|
20
|
+
bundler_version = a if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
21
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
22
|
+
|
23
|
+
bundler_version = Regexp.last_match(1) || ">= 0.a"
|
24
|
+
update_index = i
|
25
|
+
end
|
26
|
+
bundler_version
|
27
|
+
end
|
28
|
+
|
29
|
+
def gemfile
|
30
|
+
File.expand_path("../Gemfile", __dir__)
|
31
|
+
end
|
32
|
+
|
33
|
+
def lockfile
|
34
|
+
"#{gemfile}.lock"
|
35
|
+
end
|
36
|
+
|
37
|
+
def lockfile_version
|
38
|
+
return unless File.file?(lockfile)
|
39
|
+
|
40
|
+
lockfile_contents = File.read(lockfile)
|
41
|
+
|
42
|
+
regexp = /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
43
|
+
|
44
|
+
regexp.match(lockfile_contents)[1]
|
45
|
+
end
|
46
|
+
|
47
|
+
def bundler_version
|
48
|
+
@bundler_version ||= cli_arg_version || lockfile_version
|
49
|
+
end
|
50
|
+
|
51
|
+
def load_bundler!
|
52
|
+
activate_bundler(bundler_version)
|
53
|
+
end
|
54
|
+
|
55
|
+
def activate_bundler(bundler_version)
|
56
|
+
gem "bundler", bundler_version
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
m.load_bundler!
|
61
|
+
|
62
|
+
load Gem.bin_path("bundler", "bundle") if m.invoked_as_script?
|
data/bin/rails
ADDED
data/codecov.yml
ADDED
data/config/assets.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
base_path = File.expand_path("..", __dir__)
|
4
|
+
|
5
|
+
Decidim::Webpacker.register_path("#{base_path}/app/packs")
|
6
|
+
Decidim::Webpacker.register_entrypoints(
|
7
|
+
decidim_participatory_documents_admin: "#{base_path}/app/packs/entrypoints/decidim_participatory_documents_admin.js",
|
8
|
+
decidim_participatory_documents_viewer: "#{base_path}/app/packs/entrypoints/decidim_participatory_documents_viewer.js",
|
9
|
+
decidim_participatory_documents_editor: "#{base_path}/app/packs/entrypoints/decidim_participatory_documents_editor.js",
|
10
|
+
decidim_participatory_documents: "#{base_path}/app/packs/entrypoints/decidim_participatory_documents.js"
|
11
|
+
)
|
@@ -0,0 +1,266 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
activemodel:
|
4
|
+
attributes:
|
5
|
+
document:
|
6
|
+
box_color: Color of the boxes
|
7
|
+
box_opacity: Opacity applied at the color of the boxes (%)
|
8
|
+
description: Helper description
|
9
|
+
file: PDF Document
|
10
|
+
title: Helper title
|
11
|
+
errors:
|
12
|
+
models:
|
13
|
+
answer_suggestion:
|
14
|
+
attributes:
|
15
|
+
state:
|
16
|
+
inclusion: It's not possible to publish with status "not answered"
|
17
|
+
document:
|
18
|
+
has_suggestions: This document cannot be changed or removed because it has
|
19
|
+
suggestions
|
20
|
+
suggestion:
|
21
|
+
attributes:
|
22
|
+
not_blank: 'Validation failed: Please provide a message or upload a file'
|
23
|
+
too_long: is too long (over %{max_length} characters)
|
24
|
+
too_short: is too short (under %{min_length} characters)
|
25
|
+
decidim:
|
26
|
+
admin:
|
27
|
+
actions:
|
28
|
+
export: Export
|
29
|
+
exports:
|
30
|
+
export_as: "%{name} as %{export_format}"
|
31
|
+
filters:
|
32
|
+
search_placeholder:
|
33
|
+
body_cont: Body Contains
|
34
|
+
suggestions:
|
35
|
+
body_cont:
|
36
|
+
label: Body contains
|
37
|
+
dummy_author_ids_has:
|
38
|
+
label: Author
|
39
|
+
dummy_suggestable_id_has:
|
40
|
+
label: Section
|
41
|
+
state_eq:
|
42
|
+
label: State is
|
43
|
+
values:
|
44
|
+
accepted: Accepted
|
45
|
+
evaluating: Evaluating
|
46
|
+
not_answered: Not Answered
|
47
|
+
published: Published
|
48
|
+
rejected: Rejected
|
49
|
+
withdrawn: Withdrawn
|
50
|
+
valuator_role_ids_has:
|
51
|
+
label: Assigned to valuator
|
52
|
+
admin_log:
|
53
|
+
annotation:
|
54
|
+
create: "%{user_name} created a new participatory area for %{document_name}"
|
55
|
+
delete: "%{user_name} deleted a participatory area for %{document_name}"
|
56
|
+
update: "%{user_name} has updated a participatory area for %{document_name}"
|
57
|
+
document:
|
58
|
+
create: "%{user_name} created a document named %{resource_name} in %{space_name}"
|
59
|
+
delete: "%{user_name} deleted a document named %{resource_name} in %{space_name}"
|
60
|
+
update: "%{user_name} updated a document named %{resource_name} in %{space_name}"
|
61
|
+
section:
|
62
|
+
create: "%{user_name} has created a new Section named %{resource_name} for
|
63
|
+
%{document_name}"
|
64
|
+
delete: "%{user_name} has deleted a section"
|
65
|
+
update: "%{user_name} has updated a section in %{document_name}"
|
66
|
+
suggestion_note:
|
67
|
+
create: "%{user_name} created a new suggestion note %{suggestion}"
|
68
|
+
components:
|
69
|
+
participatory_documents:
|
70
|
+
name: Participatory Document
|
71
|
+
settings:
|
72
|
+
global:
|
73
|
+
max_suggestion_length: Maximum suggestion length (characters)
|
74
|
+
min_suggestion_length: Minimum suggestion length (characters)
|
75
|
+
suggestion_answering_enabled: Enable suggestion answering from admin
|
76
|
+
events:
|
77
|
+
participatory_documents:
|
78
|
+
suggestion_answered:
|
79
|
+
affected_user:
|
80
|
+
email_intro: 'A suggestion you submitted on "<a href="%{resource_path}">%{resource_title}</a>"
|
81
|
+
document has been answered by an administrator. You can read the answer
|
82
|
+
in this page:'
|
83
|
+
email_outro: You have received this notification because you have submitted
|
84
|
+
a suggestion for "<a href="%{resource_path}">%{resource_title}</a>"
|
85
|
+
document.
|
86
|
+
email_subject: A suggestion you have submitted has been answered by an
|
87
|
+
administrator
|
88
|
+
notification_title: A suggestion you submitted on "<a href="%{resource_path}">%{resource_title}</a>"
|
89
|
+
document has been answered by an administrator
|
90
|
+
forms:
|
91
|
+
file_help:
|
92
|
+
file:
|
93
|
+
pdf_message: Only PDF files are allowed
|
94
|
+
participatory_documents:
|
95
|
+
actions:
|
96
|
+
back: Back
|
97
|
+
back_edit: Go back to edit participatory sections
|
98
|
+
confirm: This action means that you will not be able to edit the document
|
99
|
+
or create new sections, are you sure?
|
100
|
+
edit_boxes: Edit participatory areas
|
101
|
+
edit_document: Edit/upload document
|
102
|
+
finish_publishing: Publish participatory sections
|
103
|
+
new: Upload PDF document
|
104
|
+
preview_publishing_sections: Preview and publish sections
|
105
|
+
title: Actions
|
106
|
+
admin:
|
107
|
+
documents:
|
108
|
+
create:
|
109
|
+
invalid: There was a problem creating Document
|
110
|
+
success: Document has been successfully created
|
111
|
+
edit:
|
112
|
+
title: Edit Participatory document
|
113
|
+
update: Update
|
114
|
+
final_publish:
|
115
|
+
error: There was an error publishing sections
|
116
|
+
success: Sections have been successfully published
|
117
|
+
form:
|
118
|
+
alert_suggestions_html: "<strong>IMPORTANT:</strong> This document cannot
|
119
|
+
be changed or removed because it already has suggestions attached"
|
120
|
+
box_style_preview: 'Box style preview:'
|
121
|
+
warning_sections_html: "<strong>Warning:</strong> If you upload a new
|
122
|
+
document, all the participatory areas will be deleted!"
|
123
|
+
index:
|
124
|
+
start: Please upload a PDF to start
|
125
|
+
new:
|
126
|
+
create: Create participatory document
|
127
|
+
title: New participatory document
|
128
|
+
sections:
|
129
|
+
empty: "(empty)"
|
130
|
+
update:
|
131
|
+
error: There was a problem updating Document
|
132
|
+
success: Document has been successfully updated
|
133
|
+
exports:
|
134
|
+
suggestions: Suggestions
|
135
|
+
suggestion_notes:
|
136
|
+
create:
|
137
|
+
error: There was a problem creating this suggestion note
|
138
|
+
success: Suggestion note successfully created
|
139
|
+
form:
|
140
|
+
note: Note
|
141
|
+
submit: Submit
|
142
|
+
leave_your_note: Leave your note
|
143
|
+
modal:
|
144
|
+
body: Body
|
145
|
+
title: Edit note
|
146
|
+
update: Update
|
147
|
+
title: Private notes
|
148
|
+
update:
|
149
|
+
edited: Edited
|
150
|
+
invalid: There was a problem updating this suggestion note
|
151
|
+
success: Suggestion note successfully updated
|
152
|
+
suggestions:
|
153
|
+
answer:
|
154
|
+
invalid: There was an error adding the answer
|
155
|
+
success: Successfully added the answer
|
156
|
+
form:
|
157
|
+
answer: Answer
|
158
|
+
answer_is_published: Published
|
159
|
+
title: Answer Suggestion
|
160
|
+
index:
|
161
|
+
actions:
|
162
|
+
answer: Answer
|
163
|
+
assign_to_valuator: Assign to valuator
|
164
|
+
assign_to_valuator_button: Assign
|
165
|
+
cancel: Cancel
|
166
|
+
download: download %{filename}
|
167
|
+
publish: Publish
|
168
|
+
publish_answers: Publish answers
|
169
|
+
title: Actions
|
170
|
+
unassign_from_valuator: Unassign from valuator
|
171
|
+
unassign_from_valuator_button: Unassign
|
172
|
+
author: Author
|
173
|
+
created_at: Submitted on
|
174
|
+
id: Id
|
175
|
+
no_text: "(no text)"
|
176
|
+
published_answer: Published Answer
|
177
|
+
section: Section
|
178
|
+
selected: selected
|
179
|
+
state: State
|
180
|
+
suggestion: Suggestion
|
181
|
+
title: List Suggestions
|
182
|
+
publish_answers:
|
183
|
+
number_of_suggestions: Answers for %{number} suggestions will be published.
|
184
|
+
select_a_suggestion: Please select a suggestion
|
185
|
+
success: Suggestion answers successfully published.
|
186
|
+
show:
|
187
|
+
authors: Authors
|
188
|
+
body: Body
|
189
|
+
created_at: Creation date
|
190
|
+
file: File
|
191
|
+
update: Update
|
192
|
+
suggestion:
|
193
|
+
global: Global
|
194
|
+
valuators:
|
195
|
+
assigned_valuators: Assigned valuators
|
196
|
+
remove_assignment: Remove assignment
|
197
|
+
remove_assignment_confirmation: Are you sure you want to remove the valuator
|
198
|
+
from this suggestion?
|
199
|
+
valuators: Valuators
|
200
|
+
valuation_assignments:
|
201
|
+
create:
|
202
|
+
invalid: There was an error assigning suggestions to a valuator
|
203
|
+
success: Suggestions assigned to a valuator successfully
|
204
|
+
delete:
|
205
|
+
invalid: There was an error unassigning suggestions from a valuator
|
206
|
+
success: Valuator unassigned from suggestions successfully
|
207
|
+
document:
|
208
|
+
close: Close
|
209
|
+
global_suggestions: Global suggestions
|
210
|
+
save_changes: Save changes!
|
211
|
+
send_suggestion: Send suggestion
|
212
|
+
suggestion_answer: Official answer
|
213
|
+
upload_file: Attach a document
|
214
|
+
documents:
|
215
|
+
missing: There is no document uploaded yet
|
216
|
+
not_supported: This page requires JavaScript to be enabled!
|
217
|
+
preview_title: Preview
|
218
|
+
publish_description: 'Admin options: you are previewing the participatory
|
219
|
+
sections of the document'
|
220
|
+
models:
|
221
|
+
document:
|
222
|
+
fields:
|
223
|
+
document_pages: Page numbers
|
224
|
+
id: Id
|
225
|
+
published: Published
|
226
|
+
state: State
|
227
|
+
title: Title
|
228
|
+
section:
|
229
|
+
fields:
|
230
|
+
artificial_tile: Section %{position}
|
231
|
+
suggestion:
|
232
|
+
fields:
|
233
|
+
valuators: Valuators
|
234
|
+
'no': 'No'
|
235
|
+
suggestions:
|
236
|
+
answers:
|
237
|
+
accepted: Accepted
|
238
|
+
evaluating: Evaluating
|
239
|
+
not_answered: Not Answered
|
240
|
+
published: Published
|
241
|
+
rejected: Rejected
|
242
|
+
withdrawn: Withdrawn
|
243
|
+
modal:
|
244
|
+
exit_full_screen: Exit fullscreen
|
245
|
+
full_screen: Fullscreen
|
246
|
+
ui_messages:
|
247
|
+
allSaved: All the areas have been saved successfully
|
248
|
+
confirmExit: Are you sure you want to exit?
|
249
|
+
created: The area has been created
|
250
|
+
errorsSaving: Some errors have occurred while saving the areas
|
251
|
+
group: Group
|
252
|
+
modalTitle: Section %{section}, area %{box}
|
253
|
+
move: Move
|
254
|
+
needsSaving: You have to save the areas before editing them
|
255
|
+
operationFailed: The operation has failed
|
256
|
+
removeBoxConfirm: Are you sure you want to delete this area? This cannot be
|
257
|
+
undone.
|
258
|
+
removed: The area has been removed
|
259
|
+
startEditing: Start creating areas for participation by clicking and dragging.
|
260
|
+
Once created, boxes can be resized, moved, or grouped.
|
261
|
+
startSuggesting: Click on a marked area to participate!
|
262
|
+
suggestion_form:
|
263
|
+
blank: There was an error creating the suggestion. Upload the valid file
|
264
|
+
or add a text message with the suggestion.
|
265
|
+
title: Write your suggestion or upload a file with your suggestions
|
266
|
+
'yes': 'Yes'
|
data/crowdin.yml
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
files:
|
2
|
+
- source: /**/locales/en.yml
|
3
|
+
translation: /**/locales/%locale%.yml
|
4
|
+
languages_mapping:
|
5
|
+
locale:
|
6
|
+
ar: ar
|
7
|
+
bg: bg
|
8
|
+
ca: ca
|
9
|
+
cs: cs
|
10
|
+
da: da
|
11
|
+
de: de
|
12
|
+
el: el
|
13
|
+
eo: eo
|
14
|
+
es-ES: es
|
15
|
+
es-MX: es-MX
|
16
|
+
es-PY: es-PY
|
17
|
+
et: et
|
18
|
+
eu: eu
|
19
|
+
fi: fi
|
20
|
+
fi-plain: fi-plain
|
21
|
+
fr: fr
|
22
|
+
fr-CA: fr-CA
|
23
|
+
ga: ga
|
24
|
+
gl: gl
|
25
|
+
hr: hr
|
26
|
+
hu: hu
|
27
|
+
id-ID: id
|
28
|
+
is-IS: is
|
29
|
+
it: it
|
30
|
+
ja: ja
|
31
|
+
lt: lt
|
32
|
+
lv: lv
|
33
|
+
mt: mt
|
34
|
+
nl: nl
|
35
|
+
'no': 'no'
|
36
|
+
pl: pl
|
37
|
+
pt-BR: pt-BR
|
38
|
+
ro-RO: ro
|
39
|
+
rumany: ru
|
40
|
+
sk: sk
|
41
|
+
sl: sl
|
42
|
+
sr: sr
|
43
|
+
sv-SE: sv
|
44
|
+
tr-TR: tr
|
45
|
+
ukmany: uk
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimParticipatoryDocumentsDocument < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
create_table :decidim_participatory_documents_documents do |t|
|
6
|
+
t.jsonb :title
|
7
|
+
t.jsonb :description
|
8
|
+
t.string :box_color
|
9
|
+
t.integer :box_opacity
|
10
|
+
|
11
|
+
t.references :decidim_component, null: false, index: { name: "decidim_pd_document_decidim_component" }
|
12
|
+
t.references :decidim_author, polymorphic: true, null: false, index: { name: "decidim_pd_document_author_id_and_type" }
|
13
|
+
t.references :decidim_user_group, null: true, index: { name: "decidim_pd_document_user_group" }
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/db/migrate/20221115233021_create_decidim_participatory_documents_participation_sections.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimParticipatoryDocumentsParticipationSections < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
create_table :decidim_participatory_documents_sections do |t|
|
6
|
+
t.references :document, null: false, index: { name: "decidim_pd_section_document" }
|
7
|
+
t.jsonb :title
|
8
|
+
t.string :state
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimParticipatoryDocumentsAnnotations < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
create_table :decidim_participatory_documents_annotations do |t|
|
6
|
+
t.references :section, null: false, index: { name: "decidim_pd_annotation_section" }
|
7
|
+
t.jsonb :rect, default: {}
|
8
|
+
t.integer :page_number, default: 1
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimParticipatoryDocumentsSuggestions < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
create_table :decidim_participatory_documents_suggestions do |t|
|
6
|
+
t.jsonb :body, null: false
|
7
|
+
t.references :suggestable, null: false, polymorphic: true, index: { name: "decidim_pd_seggestions_suggestable" }
|
8
|
+
t.references :decidim_author, polymorphic: true, null: false, index: { name: "decidim_pd_suggestion_author" }
|
9
|
+
t.references :decidim_user_group, null: true, index: { name: "decidim_pd_suggestion_user_group" }
|
10
|
+
t.string :state, default: :not_answered, index: { name: "decidim_pd_suggestion_state" }
|
11
|
+
t.datetime :answered_at, index: { name: "decidim_pd_suggestion_answered" }
|
12
|
+
t.boolean :answer_is_published, default: false
|
13
|
+
t.jsonb :answer
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimParticipatoryDocumentsSuggestionNotes < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
create_table :decidim_participatory_documents_suggestion_notes do |t|
|
6
|
+
t.references :suggestion, null: false, index: { name: "decidim_pd_suggestion_note_suggestion" }
|
7
|
+
t.references :decidim_author, null: false, index: { name: "decidim_pd_suggestion_note_author" }
|
8
|
+
t.jsonb :body, null: false
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_column :decidim_participatory_documents_suggestions, :suggestion_notes_count, :integer, null: false, default: 0
|
13
|
+
add_index :decidim_participatory_documents_suggestion_notes, :created_at, name: :index_decidim_pd_suggestion_notes_on_created_at
|
14
|
+
end
|
15
|
+
end
|
data/db/migrate/20221115233024_create_decidim_participatory_documents_valuation_assignments.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimParticipatoryDocumentsValuationAssignments < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
create_table :decidim_participatory_documents_valuation_assignments do |t|
|
6
|
+
t.references :decidim_participatory_documents_suggestion, null: false, index: { name: "decidim_pd_valuation_assignment_suggestion" }
|
7
|
+
t.references :valuator_role, polymorphic: true, null: false, index: { name: "decidim_pd_valuation_assignment_valuator_role" }
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/db/migrate/20230616100340_add_published_at_to_decidim_participatory_documents_documents.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddPublishedAtToDecidimParticipatoryDocumentsDocuments < ActiveRecord::Migration[6.0]
|
4
|
+
def change
|
5
|
+
add_column :decidim_participatory_documents_documents, :published_at, :datetime
|
6
|
+
add_index :decidim_participatory_documents_documents, :published_at
|
7
|
+
end
|
8
|
+
end
|