decidim-action_delegator 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72ece5d4d1d3c253b4fd99f8372ba014ca14446be9f96119c87879ca8c94be6f
4
- data.tar.gz: 8b1fb12a9a22f2bd035deb01273b3a73da14a916d4b250ddccf174d79f4b1f48
3
+ metadata.gz: ca4612ec0f7ff48ca4db9c6ce96adf9563afd16c898b45333fc3e63177c70454
4
+ data.tar.gz: f503d3d4b9d4ab544e60909c1907aff6b405cbe54dce8eab3330c7e718ea6b50
5
5
  SHA512:
6
- metadata.gz: f29fbeaeb138c6c2b527b465d40146356f7dfa395ed04bcfc80df697738c94f82589a625ab455a6d11e1810975ef7648b078256684b33863e625866c8a20dd64
7
- data.tar.gz: 4119061790bd135c90c14932ab33b939b8f05b05dd07c1c32ca6140f68727da2e4fd43e52308ec4b8cb8b947d00e34350181467664d024e3163098062af9fe88
6
+ metadata.gz: 8a32dd04273f2f27ee30969e638ec3341365214fdaa22ec37cdbe0a6d2a2cb4c98c1bd78b680eb2cc162a48fd2b7277993f6b85180ab1e51357bdf53d6c791aa
7
+ data.tar.gz: e4629f6b1eb8d5debdb3bafabce31563f5d63ffbf498909068e317dfb2a13311f1753035d7def22c3c4dc16b0760a626627079a08942372d1671592d3964ac19
data/README.md CHANGED
@@ -47,7 +47,7 @@ bundle exec rails db:migrate
47
47
  > If you are upgrading from a previous version, you need to run the migrations again and import all membership types/weights into the built-in census by executing in your production server:
48
48
  >
49
49
  > ```bash
50
- > RAILS_ENV=production bundle exec rails decidim_action_delegator:import_direct_verifications
50
+ > RAILS_ENV=production bundle exec rails action_delegator:import_direct_verifications
51
51
  > ```
52
52
  >
53
53
  > *It is safe to run the previous command multiple times, no content will be imported twice.*
@@ -139,6 +139,40 @@ Decidim::ActionDelegator.configure do |config|
139
139
  end
140
140
  ```
141
141
 
142
+ ### Other configuration options
143
+
144
+ There are some other configuration options available, for more info check [action_delegator](lib/decidim/action_delegator.rb). These are the default values
145
+
146
+ ```ruby
147
+ Decidim::ActionDelegator.configure do |config|
148
+ # this is the SmsGateway provided by this module
149
+ # Note that it will be ignored if you provide your own SmsGateway in Decidm.sms_gateway_service
150
+ config.sms_gateway_service = "Decidim::ActionDelegator::SmsGateway"
151
+
152
+ # The default expiration time for the integrated authorization
153
+ # if zero, the authorization won't be registered
154
+ config.authorization_expiration_time = 3.months
155
+
156
+ # Put this to false if you don't want to allow administrators to invite users not registered
157
+ # in the platform when uploading a census (inviting users without permission can be a GDPR offense).
158
+ config.allow_to_invite_users = true
159
+
160
+ # used for comparing phone numbers from a census list and the ones introduced by the user
161
+ # the phone number will be normalized before comparing it so, for instance,
162
+ # if you have a census list with +34 666 666 666 and the user introduces 0034666666666 or 666666666, they will be considered the same
163
+ # can be empty or null if yo don't want to check different combinations of prefixes
164
+ config.phone_prefixes = %w(+34 0034 34)
165
+
166
+ # The regex for validating phone numbers
167
+ config.phone_regex = /^\d{6,15}$/ # 6 to 15 digits
168
+
169
+ # Consultations has an annoying and totally useless deprecation warning
170
+ # This plugin removes it by default.
171
+ # If you want to keep it, you can set this config to false
172
+ config.remove_consultation_deprecation_warning = true
173
+ end
174
+ ```
175
+
142
176
  ### Track delegated votes and unvotes
143
177
 
144
178
  Votes and revocations done on behalf of other members are tracked through the
@@ -290,3 +324,8 @@ https://crowdin.com/project/decidim-action-delegator-vote
290
324
  ## License
291
325
 
292
326
  This engine is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.
327
+
328
+ ## About
329
+
330
+ This plugin is currently maintained by [![Pokecode](app/packs/images/logo-pokecode.png)](https://pokecode.net)with much appreciated contributions from other companies.
331
+
@@ -0,0 +1,10 @@
1
+ <!-- replace 'erb[silent]:contains("if consultation.questions.any?")' -->
2
+
3
+ <%
4
+ show_questions = if Decidim::ActionDelegator.remove_duplicated_highlighted_questions
5
+ consultation.questions.count > consultation.highlighted_questions.count
6
+ else
7
+ consultation.questions.any?
8
+ end
9
+ %>
10
+ <% if show_questions %>
@@ -1,4 +1,5 @@
1
1
  <!-- replace 'h3.heading6' -->
2
2
 
3
- <% next if current_consultation.highlighted_scope == questions.first.scope %>
4
- <h3 class="heading6"><%= translated_attribute questions&.first&.scope&.name %></h3>
3
+ <% next if questions.blank? %>
4
+ <% next if Decidim::ActionDelegator.remove_duplicated_highlighted_questions && current_consultation.highlighted_scope == questions.first.scope %>
5
+ <h3 class="heading6"><%= translated_attribute questions&.first&.scope&.name %></h3>
@@ -1,3 +1,3 @@
1
1
  <!-- insert_before "erb[silent]:contains('elsif question.consultation.active?')" -->
2
2
 
3
- <%= render partial: "decidim/action_delegator/consultations/questions/link_to_delegations", locals: { question: question } %>
3
+ <%= render partial: "decidim/action_delegator/consultations/questions/link_to_delegations", locals: { question: question } %>
@@ -1,3 +1,3 @@
1
1
  <!-- insert_before "erb[loud]:contains('javascript_pack_tag')" -->
2
2
 
3
- <%= render partial: "decidim/action_delegator/consultations/questions/delegations_modal", locals: { question: question } %>
3
+ <%= render partial: "decidim/action_delegator/consultations/questions/delegations_modal", locals: { question: question } %>
@@ -1,4 +1,4 @@
1
- <!-- replace_contents "erb[silent]:contains('if question.multiple?')"
1
+ <!-- replace_contents "erb[silent]:contains('if question.multiple?')"
2
2
  closing_selector "erb[silent]:contains('else')" -->
3
3
 
4
4
  <%= link_to decidim_consultations.question_question_multiple_votes_path(question, delegation: 0),
Binary file
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  # This holds the decidim-action_delegator version.
5
5
  module ActionDelegator
6
- VERSION = "0.7.0"
6
+ VERSION = "0.7.2"
7
7
  DECIDIM_VERSION = "0.26.5"
8
8
  COMPAT_DECIDIM_VERSION = [">= 0.26.0", "< 0.27"].freeze
9
9
  end
@@ -48,6 +48,12 @@ module Decidim
48
48
  config_accessor :remove_consultation_deprecation_warning do
49
49
  true
50
50
  end
51
+
52
+ # In a consultation the highlighted questions are duplicated in the list of regular questions
53
+ # this maintains the highlighted questions in the highlighted list and removes them from the regular list
54
+ config_accessor :remove_duplicated_highlighted_questions do
55
+ true
56
+ end
51
57
  end
52
58
  end
53
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-action_delegator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pau Pérez Fabregat
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-17 00:00:00.000000000 Z
12
+ date: 2023-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: decidim-admin
@@ -203,6 +203,7 @@ files:
203
203
  - app/models/decidim/action_delegator/unversioned_vote.rb
204
204
  - app/models/decidim/action_delegator/whodunnit_vote.rb
205
205
  - app/overrides/decidim/consultations/consultations/_question/add_delegation_link.html.erb.deface
206
+ - app/overrides/decidim/consultations/consultations/_regular_questions/prevent_empty_questions.html.erb.deface
206
207
  - app/overrides/decidim/consultations/consultations/_regular_questions/remove_highlighted_scopes.html.erb.deface
207
208
  - app/overrides/decidim/consultations/question_multiple_votes/_form/add_delegation_notice.html.erb.deface
208
209
  - app/overrides/decidim/consultations/questions/_vote_button/add_delegations_link.html.erb.deface
@@ -214,6 +215,7 @@ files:
214
215
  - app/overrides/layouts/decidim/admin/remove_deprecation.rb
215
216
  - app/packs/entrypoints/decidim_action_delegator.scss
216
217
  - app/packs/entrypoints/decidim_action_delegator_questions.js
218
+ - app/packs/images/logo-pokecode.png
217
219
  - app/packs/src/decidim/action_delegator/questions.js
218
220
  - app/packs/stylesheets/decidim/action_delegator/questions.scss
219
221
  - app/permissions/concerns/decidim/action_delegator/consultations/permissions_override.rb