decidim-action_delegator 0.7.1 → 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: caf66583f72b3582a54d1ab049356ba76fffb5031e4d4ca214c67c80778a4d0f
4
- data.tar.gz: 29eed3db878b8d08aca87938cc96796894a39b9354a19a593b43afd7af5caa61
3
+ metadata.gz: ca4612ec0f7ff48ca4db9c6ce96adf9563afd16c898b45333fc3e63177c70454
4
+ data.tar.gz: f503d3d4b9d4ab544e60909c1907aff6b405cbe54dce8eab3330c7e718ea6b50
5
5
  SHA512:
6
- metadata.gz: 31c6a9dfcacb203062d281cac13c75e1cc972be68872026135c9334800bfb6191d02d0e10433bb50077aa4da8e168e86f23fb313d3a672280ba7309740222c16
7
- data.tar.gz: ab3a8ff8260a1713c58fe5db966f98370fa3e5f7dbf04eda01ba7039b3b9cb590d20f5c6f81bdc9ca663a3cc1f1dd6bf2667de3a06b267713abc94a365fa91fb
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.*
@@ -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),
@@ -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.1"
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.1
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