decidim-core 0.23.1.rc1 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-core might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1325d97781c54dfe655551e508d1c89a2e3a9009cb690bc17d621ae3914d680a
4
- data.tar.gz: 9335a863176d3c33a3be2c2c824ff63905f7f0699071d22c7f597a185641013c
3
+ metadata.gz: fd4b47f98a7a7b3b6a156adaccfc7e0de5776c3148a8ce61bfb124bc392343f8
4
+ data.tar.gz: 6b1a421c1be2d0970d820ff4fdc3d8c919f3cb07d1a0b7d947f1b9364b9f18aa
5
5
  SHA512:
6
- metadata.gz: 7916678d96e88735190ba2147cb8f329dfa5fb3520bd949317611f9b8a96fef20bfc642a1afd18fcce4f018278d8ed3ed301e941fcedc3ef5a7fe2f0edb1b93a
7
- data.tar.gz: 43ff1787f1687e254e141b4be1ff82e73da19c2ee2bc3e4d1e288f949c556d882bfbb080b013d660180fb647fb1dd7129d9cf46d23e6914596a076ab6387500d
6
+ metadata.gz: fe891eb362d41e32de930ea1d2db6c27112eb4a8e7a1107601147ec3d6c2309140a6053c4f6b448cb8d082c1fb96948d4d30877378f0a0c08b7fb26475f83ed6
7
+ data.tar.gz: 14781d481d19cd0813fe530dcc1337ad37c8f6f8c5734082417b49f9e20cdd9ce35ca49eb73beee30b9574e20757f04692677563c91808ca545e91c9db9f1e38
@@ -1124,7 +1124,7 @@ it:
1124
1124
  date: Segnalato il
1125
1125
  details: Dettagli
1126
1126
  hello: Ciao %{name},
1127
- manage_moderations: Gestire moderazioni
1127
+ manage_moderations: Gestire le moderazioni
1128
1128
  participatory_space: Spazio partecipativo
1129
1129
  reason: Motivazione
1130
1130
  report_html: <p>Il seguente <a href="%{url}">contenuto</a> è stato segnalato.</p>
@@ -164,7 +164,7 @@ ja:
164
164
  promote_button: '%{model_name} にプロモート'
165
165
  promote_confirm_text: この承認を宣伝してもよろしいですか?
166
166
  promote_help_text: この制約を宣伝し、独立した %{model_name} として公開することができます
167
- section_heading: 修正 (%{count})
167
+ section_heading: 修正履歴 (%{count})
168
168
  compare_draft:
169
169
  continue: 続ける
170
170
  no_similars_found: 似たような表現は見つかりません。
@@ -899,7 +899,7 @@ pt:
899
899
  subject: Um recurso foi escondido automaticamente
900
900
  report:
901
901
  hello: Olá %{name},
902
- manage_moderations: Gerir moderações
902
+ manage_moderations: Gerenciar moderações
903
903
  report_html: <p>O seguinte <a href="%{url}">content</a> foi reportado.</p>
904
904
  subject: Um recurso foi relatado
905
905
  reports:
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-core version.
5
5
  module Core
6
6
  def self.version
7
- "0.23.1.rc1"
7
+ "0.23.1"
8
8
  end
9
9
  end
10
10
  end
@@ -59,12 +59,24 @@ module Decidim
59
59
 
60
60
  # Caches the path for the given resource.
61
61
  def resource_path
62
- @resource_path ||= resource_locator.path
62
+ @resource_path ||= begin
63
+ if resource&.respond_to?(:polymorphic_resource_path)
64
+ resource.polymorphic_resource_path(resource_url_params)
65
+ else
66
+ resource_locator.path(resource_url_params)
67
+ end
68
+ end
63
69
  end
64
70
 
65
71
  # Caches the URL for the given resource.
66
72
  def resource_url
67
- @resource_url ||= resource_locator.url
73
+ @resource_url ||= begin
74
+ if resource&.respond_to?(:polymorphic_resource_url)
75
+ resource.polymorphic_resource_url(resource_url_params)
76
+ else
77
+ resource_locator.url(resource_url_params)
78
+ end
79
+ end
68
80
  end
69
81
 
70
82
  def resource_text; end
@@ -99,6 +111,10 @@ module Decidim
99
111
  resource.try(:participatory_space)
100
112
  end
101
113
 
114
+ def resource_url_params
115
+ {}
116
+ end
117
+
102
118
  attr_reader :event_name, :resource, :user, :user_role, :extra
103
119
  end
104
120
  end
@@ -63,9 +63,9 @@ module Decidim
63
63
  def retrieve_organization(resource)
64
64
  if @declared_fields[:organization_id].present?
65
65
  organization_id = read_field(resource, @declared_fields, :organization_id)
66
- Decidim::Organization.find(organization_id)
66
+ Decidim::Organization.find_by(id: organization_id)
67
67
  else
68
- participatory_space(resource).organization
68
+ participatory_space(resource)&.organization
69
69
  end
70
70
  end
71
71
 
@@ -84,6 +84,8 @@ module Decidim
84
84
  return unless self.class.searchable_resource?(self)
85
85
 
86
86
  org = self.class.search_resource_fields_mapper.retrieve_organization(self)
87
+ return unless org
88
+
87
89
  searchables_in_org = searchable_resources.by_organization(org.id)
88
90
  if self.class.search_resource_fields_mapper.index_on_update?(self)
89
91
  if searchables_in_org.empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1.rc1
4
+ version: 0.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-06 00:00:00.000000000 Z
13
+ date: 2020-11-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -844,28 +844,28 @@ dependencies:
844
844
  requirements:
845
845
  - - '='
846
846
  - !ruby/object:Gem::Version
847
- version: 0.23.1.rc1
847
+ version: 0.23.1
848
848
  type: :runtime
849
849
  prerelease: false
850
850
  version_requirements: !ruby/object:Gem::Requirement
851
851
  requirements:
852
852
  - - '='
853
853
  - !ruby/object:Gem::Version
854
- version: 0.23.1.rc1
854
+ version: 0.23.1
855
855
  - !ruby/object:Gem::Dependency
856
856
  name: decidim-dev
857
857
  requirement: !ruby/object:Gem::Requirement
858
858
  requirements:
859
859
  - - '='
860
860
  - !ruby/object:Gem::Version
861
- version: 0.23.1.rc1
861
+ version: 0.23.1
862
862
  type: :development
863
863
  prerelease: false
864
864
  version_requirements: !ruby/object:Gem::Requirement
865
865
  requirements:
866
866
  - - '='
867
867
  - !ruby/object:Gem::Version
868
- version: 0.23.1.rc1
868
+ version: 0.23.1
869
869
  description: Adds core features so other engines can hook into the framework.
870
870
  email:
871
871
  - josepjaume@gmail.com
@@ -2492,9 +2492,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2492
2492
  version: '0'
2493
2493
  required_rubygems_version: !ruby/object:Gem::Requirement
2494
2494
  requirements:
2495
- - - ">"
2495
+ - - ">="
2496
2496
  - !ruby/object:Gem::Version
2497
- version: 1.3.1
2497
+ version: '0'
2498
2498
  requirements: []
2499
2499
  rubygems_version: 3.0.3
2500
2500
  signing_key: