decidim-assemblies 0.23.3 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/assemblies/assembly_m_cell.rb +2 -0
  3. data/app/cells/decidim/assemblies/statistic/show.erb +9 -0
  4. data/app/cells/decidim/assemblies/statistic_cell.rb +20 -0
  5. data/app/cells/decidim/assemblies/statistics/show.erb +17 -0
  6. data/app/cells/decidim/assemblies/statistics_cell.rb +18 -0
  7. data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -0
  8. data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +12 -72
  9. data/app/commands/decidim/assemblies/admin/update_assembly.rb +2 -1
  10. data/app/controllers/decidim/assemblies/admin/imports_controller.rb +14 -0
  11. data/app/controllers/decidim/assemblies/admin/moderations/reports_controller.rb +14 -0
  12. data/app/controllers/decidim/assemblies/assemblies_controller.rb +1 -1
  13. data/app/events/decidim/role_assigned_to_assembly_event.rb +1 -1
  14. data/app/forms/decidim/assemblies/admin/assembly_form.rb +3 -0
  15. data/app/helpers/decidim/assemblies/admin/assemblies_admin_menu_helper.rb +15 -0
  16. data/app/models/decidim/assembly.rb +3 -3
  17. data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +35 -25
  18. data/app/queries/decidim/assemblies/organization_assemblies.rb +1 -1
  19. data/app/queries/decidim/assemblies/organization_published_assemblies.rb +1 -1
  20. data/app/serializers/decidim/assemblies/assembly_serializer.rb +1 -0
  21. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +4 -0
  22. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +11 -1
  23. data/app/views/decidim/assemblies/assemblies/show.html.erb +1 -1
  24. data/app/views/layouts/decidim/admin/assemblies.html.erb +2 -20
  25. data/app/views/layouts/decidim/admin/assembly.html.erb +2 -1
  26. data/config/locales/ar.yml +2 -1
  27. data/config/locales/ca.yml +9 -3
  28. data/config/locales/cs.yml +9 -3
  29. data/config/locales/de.yml +9 -3
  30. data/config/locales/el.yml +2 -4
  31. data/config/locales/en.yml +9 -3
  32. data/config/locales/es-MX.yml +9 -3
  33. data/config/locales/es-PY.yml +9 -3
  34. data/config/locales/es.yml +9 -3
  35. data/config/locales/eu.yml +2 -1
  36. data/config/locales/fi-plain.yml +9 -3
  37. data/config/locales/fi.yml +9 -3
  38. data/config/locales/fr-CA.yml +9 -3
  39. data/config/locales/fr.yml +9 -3
  40. data/config/locales/gl.yml +59 -1
  41. data/config/locales/hu.yml +2 -4
  42. data/config/locales/id-ID.yml +2 -1
  43. data/config/locales/is-IS.yml +1 -1
  44. data/config/locales/it.yml +2 -4
  45. data/config/locales/ja.yml +2 -4
  46. data/config/locales/lv.yml +2 -4
  47. data/config/locales/nl.yml +12 -3
  48. data/config/locales/no.yml +2 -4
  49. data/config/locales/pl.yml +21 -9
  50. data/config/locales/pt-BR.yml +2 -1
  51. data/config/locales/pt.yml +2 -4
  52. data/config/locales/ro-RO.yml +149 -102
  53. data/config/locales/ru.yml +3 -2
  54. data/config/locales/sk.yml +0 -3
  55. data/config/locales/sl.yml +2 -1
  56. data/config/locales/sr-CS.yml +0 -3
  57. data/config/locales/sv.yml +11 -3
  58. data/config/locales/tr-TR.yml +2 -4
  59. data/config/locales/uk.yml +3 -2
  60. data/config/locales/zh-CN.yml +2 -4
  61. data/db/migrate/20210204152393_add_weight_field_to_assembly.rb +7 -0
  62. data/db/migrate/20210310120444_add_followable_counter_cache_to_assemblies.rb +16 -0
  63. data/lib/decidim/api/assemblies_type_type.rb +16 -0
  64. data/lib/decidim/api/assembly_member_type.rb +28 -0
  65. data/lib/decidim/api/assembly_type.rb +64 -0
  66. data/lib/decidim/assemblies.rb +1 -0
  67. data/lib/decidim/assemblies/admin_engine.rb +31 -1
  68. data/lib/decidim/assemblies/api.rb +9 -0
  69. data/lib/decidim/assemblies/engine.rb +3 -5
  70. data/lib/decidim/assemblies/participatory_space.rb +38 -38
  71. data/lib/decidim/assemblies/query_extensions.rb +39 -20
  72. data/lib/decidim/assemblies/test/factories.rb +5 -4
  73. data/lib/decidim/assemblies/version.rb +1 -1
  74. metadata +23 -14
  75. data/app/types/decidim/assemblies/assemblies_type_type.rb +0 -17
  76. data/app/types/decidim/assemblies/assembly_member_type.rb +0 -29
  77. data/app/types/decidim/assemblies/assembly_type.rb +0 -67
  78. data/app/views/decidim/assemblies/assemblies/_statistics.html.erb +0 -10
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Assemblies
5
- # This type represents an AssembliesType.
6
- AssembliesTypeType = GraphQL::ObjectType.define do
7
- name "AssembliesType"
8
- description "An assemblies type"
9
-
10
- field :id, !types.ID, "The assemblies type's unique ID"
11
- field :title, !Decidim::Core::TranslatedFieldType, "The title of this assemblies type."
12
- field :createdAt, !Decidim::Core::DateTimeType, "The time this assemblies type was created", property: :created_at
13
- field :updatedAt, !Decidim::Core::DateTimeType, "The time this assemblies type was updated", property: :updated_at
14
- field :assemblies, !types[Decidim::Assemblies::AssemblyType], "Assemblies with this assemblies type"
15
- end
16
- end
17
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Assemblies
5
- # This type represents a assembly.
6
- AssemblyMemberType = GraphQL::ObjectType.define do
7
- name "AssemblyMember"
8
- description "An assembly member"
9
-
10
- field :id, !types.ID, "Internal ID of the member"
11
- field :fullName, types.String, "Full name of the member", property: :full_name
12
- field :position, types.String, "Position of the member in the assembly"
13
-
14
- field :user, Decidim::Core::UserType, "The corresponding decidim user", property: :user
15
-
16
- field :createdAt, Decidim::Core::DateTimeType, "The time this member was created", property: :created_at
17
- field :updatedAt, Decidim::Core::DateTimeType, "The time this member was updated", property: :updated_at
18
-
19
- field :weight, types.Int, "Order of appearance in which it should be represented"
20
- field :gender, types.String, "Gender of the member"
21
- # field :birthday, Decidim::Core::DateType, "Birthday date of the member" # non-public currently
22
- field :birthplace, types.String, "Birthplace of the member"
23
- field :designationDate, Decidim::Core::DateType, "Date of designation of the member", property: :designation_date
24
- # field :designationMode, types.String, "Mode in which the member was designated", property: :designation_mode # non-public currently
25
- field :positionOther, types.String, "Custom position name", property: :position_other
26
- field :ceasedDate, Decidim::Core::DateType, "Date of cease for the member", property: :ceased_date
27
- end
28
- end
29
- end
@@ -1,67 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Assemblies
5
- # This type represents a assembly.
6
- AssemblyType = GraphQL::ObjectType.define do
7
- interfaces [
8
- -> { Decidim::Core::ParticipatorySpaceInterface },
9
- -> { Decidim::Core::AttachableInterface },
10
- -> { Decidim::Core::ParticipatorySpaceResourceableInterface }
11
- ]
12
-
13
- name "Assembly"
14
- description "An assembly"
15
-
16
- field :id, !types.ID, "The internal ID for this assembly"
17
- field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this assembly"
18
- field :shortDescription, Decidim::Core::TranslatedFieldType, "The sort description of this assembly", property: :short_description
19
- field :description, Decidim::Core::TranslatedFieldType, "The description of this assembly"
20
- field :slug, !types.String, "The slug of this assembly"
21
- field :hashtag, types.String, "The hashtag for this assembly"
22
- field :createdAt, !Decidim::Core::DateTimeType, "The time this assembly was created", property: :created_at
23
- field :updatedAt, !Decidim::Core::DateTimeType, "The time this assembly was updated", property: :updated_at
24
- field :publishedAt, !Decidim::Core::DateTimeType, "The time this assembly was published", property: :published_at
25
- field :reference, !types.String, "Reference for this assembly"
26
- field :categories, !types[Decidim::Core::CategoryType], "Categories for this assembly"
27
-
28
- field :heroImage, types.String, "The hero image for this assembly", property: :hero_image
29
- field :bannerImage, types.String, "The banner image for this assembly", property: :banner_image
30
- field :promoted, types.Boolean, "If this assembly is promoted (therefore in the homepage)"
31
- field :developerGroup, Decidim::Core::TranslatedFieldType, "The promoter group of this assembly", property: :developer_group
32
- field :metaScope, Decidim::Core::TranslatedFieldType, "The scope metadata of this assembly", property: :meta_scope
33
- field :localArea, Decidim::Core::TranslatedFieldType, "The organization area of this assembly", property: :local_area
34
- field :target, Decidim::Core::TranslatedFieldType, "Who participates in this assembly"
35
- field :participatoryScope, Decidim::Core::TranslatedFieldType, "What is decided on this assembly", property: :participatory_scope
36
- field :participatoryStructure, Decidim::Core::TranslatedFieldType, "How it is decided on this assembly", property: :participatory_structure
37
- field :showStatistics, types.Boolean, "If this assembly should show statistics", property: :show_statistics
38
- field :scopesEnabled, types.Boolean, "If this assembly has scopes enabled", property: :scopes_enabled
39
- field :privateSpace, types.Boolean, "If this assembly is a private space", property: :private_space
40
- field :area, Decidim::Core::AreaApiType, "Area of this assembly"
41
- field :parent, Decidim::Assemblies::AssemblyType, "The parent assembly of this assembly"
42
- field :parentsPath, types.String, "Assembly hierarchy representation", property: :parents_path
43
- field :childrenCount, types.Int, "Number of children assemblies", property: :children_count
44
- field :purposeOfAction, Decidim::Core::TranslatedFieldType, "Purpose of action", property: :purpose_of_action
45
- field :composition, Decidim::Core::TranslatedFieldType, "Composition of this assembly"
46
- field :assemblyType, Decidim::Assemblies::AssembliesTypeType, "Type of the assembly", property: :assembly_type
47
- field :creationDate, Decidim::Core::DateType, "Creation date of this assembly", property: :creation_date
48
- field :createdBy, types.String, "The creator of this assembly", property: :created_by
49
- field :createdByOther, Decidim::Core::TranslatedFieldType, "Custom creator", property: :created_by_other
50
- field :duration, Decidim::Core::DateType, "Duration of this assembly"
51
- field :includedAt, Decidim::Core::DateType, "Included at", property: :included_at
52
- field :closingDate, Decidim::Core::DateType, "Closing date of the assembly", property: :closing_date
53
- field :closingDateReason, Decidim::Core::TranslatedFieldType, "Closing date reason of this assembly", property: :closing_date_reason
54
- field :internalOrganisation, Decidim::Core::TranslatedFieldType, "Internal organisation of this assembly", property: :internal_organisation
55
- field :isTransparent, types.Boolean, "If this assembly is transparent", property: :is_transparent
56
- field :specialFeatures, Decidim::Core::TranslatedFieldType, "Special features of this assembly", property: :special_features
57
- field :twitterHandler, types.String, "Twitter handler", property: :twitter_handler
58
- field :instagramHandler, types.String, "Instagram handler", property: :instagram_handler
59
- field :facebookHandler, types.String, "Facebook handler", property: :facebook_handler
60
- field :youtubeHandler, types.String, "Youtube handler", property: :youtube_handler
61
- field :githubHandler, types.String, "Github handler", property: :github_handler
62
-
63
- field :members, !types[Decidim::Assemblies::AssemblyMemberType], "Members of this assembly"
64
- field :children, !types[Decidim::Assemblies::AssemblyType], "Childrens of this assembly"
65
- end
66
- end
67
- end
@@ -1,10 +0,0 @@
1
- <section class="extended" id="assembly-statistics" class="statistics">
2
- <div class="row column">
3
- <h4 class="section-heading"><%= t("statistics.headline", scope: "decidim.assemblies") %></h4>
4
- </div>
5
- <div class="row">
6
- <div class="columns small-centered mediumlarge-12 large-12 process_stats">
7
- <%= stats.highlighted %>
8
- </div>
9
- </div>
10
- </section>