decidim-participatory_documents 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +2 -2
  3. data/.github/workflows/test.yml +15 -5
  4. data/.ruby-version +1 -1
  5. data/.simplecov +15 -9
  6. data/Gemfile.lock +196 -192
  7. data/README.md +42 -28
  8. data/app/cells/decidim/participatory_documents/suggestion/admin_answer.erb +1 -1
  9. data/app/commands/decidim/participatory_documents/admin/create_document.rb +6 -2
  10. data/app/commands/decidim/participatory_documents/create_suggestion.rb +3 -1
  11. data/app/controllers/concerns/decidim/participatory_documents/needs_pdf_document.rb +8 -1
  12. data/app/controllers/decidim/participatory_documents/admin/documents_controller.rb +6 -4
  13. data/app/controllers/decidim/participatory_documents/admin/suggestions_controller.rb +30 -2
  14. data/app/controllers/decidim/participatory_documents/admin/valuation_assignments_controller.rb +13 -3
  15. data/app/controllers/decidim/participatory_documents/document_suggestions_controller.rb +14 -0
  16. data/app/controllers/decidim/participatory_documents/section_suggestions_controller.rb +4 -0
  17. data/app/forms/decidim/participatory_documents/admin/document_form.rb +9 -1
  18. data/app/jobs/decidim/participatory_documents/export_my_suggestions_job.rb +16 -0
  19. data/app/models/decidim/participatory_documents/document.rb +11 -0
  20. data/app/models/decidim/participatory_documents/suggestion.rb +12 -0
  21. data/app/packs/entrypoints/decidim_participatory_documents.scss +8 -0
  22. data/app/packs/entrypoints/decidim_participatory_documents_editor.js +1 -3
  23. data/app/packs/entrypoints/decidim_participatory_documents_viewer_off.js +6 -0
  24. data/app/packs/images/export_suggestions.svg +1 -0
  25. data/app/packs/src/decidim/participatory_documents/pdf/pdf_modal_manager.js +4 -1
  26. data/app/packs/src/decidim/participatory_documents/pdf/suggestion_form.js +1 -1
  27. data/app/packs/src/decidim/participatory_documents/pdf.js +46 -0
  28. data/app/packs/src/decidim/participatory_documents/pdf_off.js +39 -0
  29. data/app/packs/stylesheets/decidim/participatory_documents/pdf/admin_modals.scss +9 -5
  30. data/app/packs/stylesheets/decidim/participatory_documents/pdf/admin_tweaks.scss +0 -21
  31. data/app/packs/stylesheets/decidim/participatory_documents/{decidim_admin_classes.scss → pdf/decidim_admin_styles.scss} +0 -3
  32. data/app/packs/stylesheets/decidim/participatory_documents/pdf/modals.scss +49 -0
  33. data/app/packs/stylesheets/decidim/participatory_documents/pdf/tweaks.scss +76 -7
  34. data/app/permissions/decidim/participatory_documents/admin/permissions.rb +32 -25
  35. data/app/permissions/decidim/participatory_documents/permissions.rb +2 -0
  36. data/app/serializers/decidim/participatory_documents/my_suggestion_serializer.rb +22 -0
  37. data/app/serializers/decidim/participatory_documents/suggestion_serializer.rb +1 -1
  38. data/app/uploaders/decidim/participatory_documents/pdf_document_uploader.rb +4 -0
  39. data/app/views/decidim/participatory_documents/admin/documents/_editor_modal.html.erb +1 -1
  40. data/app/views/decidim/participatory_documents/admin/documents/edit_pdf.html.erb +1 -0
  41. data/app/views/decidim/participatory_documents/admin/documents/pdf_viewer.html.erb +1 -1
  42. data/app/views/decidim/participatory_documents/admin/sections/_form.html.erb +0 -3
  43. data/app/views/decidim/participatory_documents/admin/suggestions/_add_valuators.html.erb +1 -1
  44. data/app/views/decidim/participatory_documents/admin/suggestions/_suggestion.html.erb +1 -1
  45. data/app/views/decidim/participatory_documents/admin/suggestions/_valuators.html.erb +1 -2
  46. data/app/views/decidim/participatory_documents/documents/_export_modal.html.erb +25 -0
  47. data/app/views/decidim/participatory_documents/documents/_pdfjs_base.html.erb +5 -2
  48. data/app/views/decidim/participatory_documents/documents/index.html.erb +2 -2
  49. data/app/views/decidim/participatory_documents/documents/pdf_viewer.html.erb +40 -33
  50. data/config/assets.rb +1 -0
  51. data/config/locales/ca.yml +261 -0
  52. data/config/locales/de.yml +261 -0
  53. data/config/locales/en.yml +15 -0
  54. data/config/locales/es.yml +261 -0
  55. data/lib/decidim/participatory_documents/component.rb +6 -4
  56. data/lib/decidim/participatory_documents/engine.rb +5 -1
  57. data/lib/decidim/participatory_documents/version.rb +2 -2
  58. data/lib/decidim/participatory_documents.rb +9 -3
  59. metadata +12 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f35c2f5f497785f46a7c83b3811345508243fbc4bcaab5190a3dde4bf913d78
4
- data.tar.gz: e089a777ebc1ae1f8a217e221a12e50a1f7acc5b08ea2642051c9e4a8d17a8c5
3
+ metadata.gz: d15ab2a26c0e881ac9828a12577a6eab25ba5bf170f19d35401c9a7c878e66e5
4
+ data.tar.gz: aa488aea6b962f8442807ad0d7e74f87c3a08eee861f584c0015e03dc21c13a6
5
5
  SHA512:
6
- metadata.gz: c1add4726bb3a46b5433d06ae7bec6c3bd99d681384dc90b4964d90fff76f174c67e31761ff6f18ddf6522e0e0b3fd367f0fcb873e3f9bf4777e1ba9f86e9b10
7
- data.tar.gz: 52eb7f44bb10ae11ca1eaef1a8a416f0c7da78a5d3605fdf1ece43f5621725bc3dbbb1d7feb11fb0227373991a97c9de50ac64ff4abe7aeac7d4018c5d828073
6
+ metadata.gz: ca9cd0de450e692d5ea0b05d2fe2f7a19ecb43fc9e3aed8b465b6a1e8a38692782f319d31828bc23b3ddd528fe880626e973a3ed1e72c4bb776a10e5686c111b
7
+ data.tar.gz: aac05750446931a873b85b1851b0a12d089a07c7ba07d55d21ef9abc82159a72ba1be70cdf3104388e1156ca8ab2b65fcae8ab34f26dffa4474746eb6fcf0b12
@@ -7,14 +7,14 @@ on:
7
7
  pull_request:
8
8
 
9
9
  env:
10
- RUBY_VERSION: 3.0.5
10
+ RUBY_VERSION: 3.0.6
11
11
  NODE_VERSION: 16.9.1
12
12
 
13
13
  jobs:
14
14
  lint-report:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
- - uses: actions/checkout@v2
17
+ - uses: actions/checkout@v4
18
18
  with:
19
19
  fetch-depth: 1
20
20
 
@@ -7,7 +7,9 @@ on:
7
7
  pull_request:
8
8
 
9
9
  env:
10
- RUBY_VERSION: 3.0.5
10
+ RUBY_VERSION: 3.0.6
11
+ SIMPLECOV: 1
12
+ CI: 1
11
13
  NODE_VERSION: 16.9.1
12
14
 
13
15
  jobs:
@@ -31,9 +33,16 @@ jobs:
31
33
  DATABASE_HOST: localhost
32
34
 
33
35
  steps:
34
- - uses: actions/checkout@v2
36
+ - uses: actions/checkout@v4
35
37
  with:
36
38
  fetch-depth: 1
39
+ - uses: nanasess/setup-chromedriver@v2
40
+ with:
41
+ chromedriver-version: 119.0.6045.105
42
+
43
+ - uses: nanasess/setup-chromedriver@v2
44
+ with:
45
+ chromedriver-version: 119.0.6045.105
37
46
 
38
47
  - uses: ruby/setup-ruby@v1
39
48
  with:
@@ -49,9 +58,10 @@ jobs:
49
58
 
50
59
  - name: Run RSpec
51
60
  run: bundle exec rspec
52
- env:
53
- SIMPLECOV: 1
54
- CODECOV: 1
61
+
62
+
63
+ - name: Upload coverage reports to Codecov
64
+ uses: codecov/codecov-action@v3
55
65
 
56
66
  - uses: actions/upload-artifact@v2-preview
57
67
  if: always()
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.5
1
+ 3.0.6
data/.simplecov CHANGED
@@ -1,13 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- SimpleCov.start do
4
- root ENV.fetch("ENGINE_ROOT", nil)
3
+ if ENV["SIMPLECOV"]
4
+ SimpleCov.start do
5
+ # We ignore some of the files because they are never tested
6
+ add_filter "/config/"
7
+ add_filter "/db/"
8
+ add_filter "lib/decidim/participatory_documents/version.rb"
9
+ add_filter "lib/decidim/participatory_documents/component.rb"
10
+ add_filter "/spec"
11
+ end
5
12
 
6
- add_filter "lib/decidim/participatory_documents/version.rb"
7
- add_filter "lib/decidim/participatory_documents/component.rb"
8
- add_filter "/spec"
9
- end
10
-
11
- SimpleCov.command_name ENV.fetch("COMMAND_NAME", nil) || File.basename(Dir.pwd)
13
+ SimpleCov.merge_timeout 1800
12
14
 
13
- SimpleCov.merge_timeout 1800
15
+ if ENV["CI"]
16
+ require "simplecov-cobertura"
17
+ SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
18
+ end
19
+ end