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 +4 -4
- data/README.md +1 -1
- data/app/overrides/decidim/consultations/consultations/_regular_questions/prevent_empty_questions.html.erb.deface +10 -0
- data/app/overrides/decidim/consultations/consultations/_regular_questions/remove_highlighted_scopes.html.erb.deface +3 -2
- data/app/overrides/decidim/consultations/questions/_vote_button/add_delegations_link.html.erb.deface +1 -1
- data/app/overrides/decidim/consultations/questions/_vote_button/add_modal.html.erb.deface +1 -1
- data/app/overrides/decidim/consultations/questions/_vote_button/replace_delegation_to_multivote_link.html.erb.deface +1 -1
- data/lib/decidim/action_delegator/version.rb +1 -1
- data/lib/decidim/action_delegator.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca4612ec0f7ff48ca4db9c6ce96adf9563afd16c898b45333fc3e63177c70454
|
4
|
+
data.tar.gz: f503d3d4b9d4ab544e60909c1907aff6b405cbe54dce8eab3330c7e718ea6b50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
4
|
-
|
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>
|
data/app/overrides/decidim/consultations/questions/_vote_button/add_delegations_link.html.erb.deface
CHANGED
@@ -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),
|
@@ -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.
|
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-
|
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
|