decidim-consultations 0.26.0 → 0.27.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +1 -1
- data/app/commands/decidim/consultations/admin/create_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/create_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/create_response.rb +1 -1
- data/app/commands/decidim/consultations/admin/create_response_group.rb +1 -1
- data/app/commands/decidim/consultations/admin/destroy_response_group.rb +1 -1
- data/app/commands/decidim/consultations/admin/publish_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/publish_consultation_results.rb +1 -1
- data/app/commands/decidim/consultations/admin/publish_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/unpublish_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/unpublish_consultation_results.rb +1 -1
- data/app/commands/decidim/consultations/admin/unpublish_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_consultation.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_question.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_question_configuration.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_response.rb +1 -1
- data/app/commands/decidim/consultations/admin/update_response_group.rb +1 -1
- data/app/commands/decidim/consultations/multiple_vote_question.rb +1 -1
- data/app/commands/decidim/consultations/unvote_question.rb +1 -1
- data/app/commands/decidim/consultations/vote_question.rb +1 -1
- data/app/controllers/concerns/decidim/consultations/needs_consultation.rb +1 -1
- data/app/controllers/concerns/decidim/consultations/needs_question.rb +3 -1
- data/app/controllers/decidim/consultations/consultations_controller.rb +5 -12
- data/app/forms/decidim/consultations/admin/consultation_form.rb +1 -1
- data/app/helpers/decidim/consultations/consultations_helper.rb +1 -1
- data/app/helpers/decidim/consultations/questions_helper.rb +3 -3
- data/app/models/decidim/consultation.rb +9 -3
- data/app/permissions/decidim/consultations/permissions.rb +1 -3
- data/app/presenters/decidim/consultations/question_stats_presenter.rb +4 -2
- data/app/queries/decidim/consultations/admin/admin_users.rb +1 -1
- data/app/queries/decidim/consultations/organization_active_consultations.rb +1 -1
- data/app/queries/decidim/consultations/organization_consultations.rb +1 -1
- data/app/queries/decidim/consultations/organization_questions.rb +1 -1
- data/app/views/decidim/consultations/consultations/_filters.html.erb +4 -4
- data/app/views/decidim/consultations/consultations/index.html.erb +3 -1
- data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +3 -1
- data/app/views/decidim/consultations/questions/_vote_button.html.erb +3 -1
- data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -0
- data/app/views/decidim/consultations/questions/show.html.erb +7 -5
- data/app/views/layouts/decidim/_question_components.html.erb +19 -34
- data/app/views/layouts/decidim/_question_header.html.erb +2 -2
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +15 -2
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +2 -2
- data/config/locales/cs.yml +2 -2
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +3 -2
- data/config/locales/el.yml +1 -2
- data/config/locales/en.yml +1 -2
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +2 -2
- data/config/locales/es-PY.yml +2 -2
- data/config/locales/es.yml +2 -2
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +1 -2
- data/config/locales/fi-plain.yml +2 -2
- data/config/locales/fi.yml +2 -2
- data/config/locales/fr-CA.yml +2 -2
- data/config/locales/fr.yml +2 -2
- data/config/locales/ga-IE.yml +1 -5
- data/config/locales/gl.yml +2 -2
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +2 -2
- data/config/locales/id-ID.yml +1 -2
- data/config/locales/is-IS.yml +2 -2
- data/config/locales/it.yml +1 -2
- data/config/locales/ja.yml +2 -2
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +1 -2
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +1 -2
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +1 -2
- data/config/locales/no.yml +1 -2
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +1 -2
- data/config/locales/pt-BR.yml +2 -3
- data/config/locales/pt.yml +1 -2
- data/config/locales/ro-RO.yml +2 -2
- data/config/locales/ru.yml +1 -2
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +1 -2
- data/config/locales/sl.yml +1 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +2 -2
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +1 -2
- data/config/locales/uk.yml +1 -2
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +1 -2
- data/config/locales/zh-TW.yml +1 -0
- data/lib/decidim/consultations/participatory_space.rb +7 -7
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +14 -15
- data/app/services/decidim/consultations/consultation_search.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed2b64c4b2a1e4fe0318cc12cfab14df6d0d890bd1a92cfd67dd00fdb6333d18
|
4
|
+
data.tar.gz: 9d68171ea724aa3f93c18a9e9f2d4b88da2bc8f3dd244cdc2d223fc69f7929d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 387ce250a35f9dcc9d9023097e98299c39eb0ad03244c3a34aee94b78b38df109f6e08f892321f80a151a94550377932d3c6f618e51b9429e843bab4d12c8f60
|
7
|
+
data.tar.gz: 5ec9a304e767896b408bcc7df7f59de3c33804bcc7b8002d9c2beac84f346b3e18c1bead3cbd45441e14878f619622de5768ef6bbd1afee25cd37771a93c366a
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<section class="wrapper-home home-section">
|
1
|
+
<section id="highlighted_consultations" class="wrapper-home home-section">
|
2
2
|
<div class="row" id="highlighted-consultations">
|
3
3
|
<h3 class="section-heading"><%= t("active_consultations", scope: i18n_scope) %></h3>
|
4
4
|
<div class="row collapse">
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when creating a new participatory
|
7
7
|
# consultation in the system.
|
8
|
-
class CreateConsultation <
|
8
|
+
class CreateConsultation < Decidim::Command
|
9
9
|
# Public: Initializes the command.
|
10
10
|
#
|
11
11
|
# form - A form object with the params.
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when creating a new question
|
7
|
-
class CreateQuestion <
|
7
|
+
class CreateQuestion < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# form - A form object with the params.
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when creating a new response
|
7
|
-
class CreateResponse <
|
7
|
+
class CreateResponse < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# form - A form object with the params.
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when creating a new response group
|
7
|
-
class CreateResponseGroup <
|
7
|
+
class CreateResponseGroup < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# form - A form object with the params.
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic to destroy a response group in the
|
7
7
|
# system.
|
8
|
-
class DestroyResponseGroup <
|
8
|
+
class DestroyResponseGroup < Decidim::Command
|
9
9
|
# Public: Initializes the command.
|
10
10
|
#
|
11
11
|
# response_group - A ResponseGroup that will be destroyed
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that sets a consultation as published.
|
7
|
-
class PublishConsultation <
|
7
|
+
class PublishConsultation < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# consultation - A Consultation that will be published
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that sets a consultation results as published.
|
7
|
-
class PublishConsultationResults <
|
7
|
+
class PublishConsultationResults < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# consultation - A Consultation that will get its results published
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that sets a question as published.
|
7
|
-
class PublishQuestion <
|
7
|
+
class PublishQuestion < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# question - A Question that will be published
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that sets a consultation as unpublished.
|
7
|
-
class UnpublishConsultation <
|
7
|
+
class UnpublishConsultation < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# consultation - A Consultation that will be unpublished
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that sets a consultation results as unpublished.
|
7
|
-
class UnpublishConsultationResults <
|
7
|
+
class UnpublishConsultationResults < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# consultation - A Consultation that will get its results unpublished
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that sets a question as unpublished.
|
7
|
-
class UnpublishQuestion <
|
7
|
+
class UnpublishQuestion < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# question - A Question that will be unpublished
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when updating an existing participatory
|
7
7
|
# consultation in the system.
|
8
|
-
class UpdateConsultation <
|
8
|
+
class UpdateConsultation < Decidim::Command
|
9
9
|
include ::Decidim::AttachmentAttributesMethods
|
10
10
|
|
11
11
|
# Public: Initializes the command.
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when updating an existing participatory
|
7
7
|
# question in the system.
|
8
|
-
class UpdateQuestion <
|
8
|
+
class UpdateQuestion < Decidim::Command
|
9
9
|
include ::Decidim::AttachmentAttributesMethods
|
10
10
|
|
11
11
|
# Public: Initializes the command.
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command that configures how many and how much questions can be voted.
|
7
|
-
class UpdateQuestionConfiguration <
|
7
|
+
class UpdateQuestionConfiguration < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# question - the Question to update
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when updating an response in the system.
|
7
|
-
class UpdateResponse <
|
7
|
+
class UpdateResponse < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# response - the response to update
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when updating a new response group
|
7
|
-
class UpdateResponseGroup <
|
7
|
+
class UpdateResponseGroup < Decidim::Command
|
8
8
|
# Public: Initializes the command.
|
9
9
|
#
|
10
10
|
# response_group - the response group to update
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
# A command with all the business logic when a user votes a multivote question.
|
6
|
-
class MultipleVoteQuestion <
|
6
|
+
class MultipleVoteQuestion < Decidim::Command
|
7
7
|
# Public: Initializes the command.
|
8
8
|
#
|
9
9
|
# form - A Decidim::Consultations::MultiVoteForm object.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
# A command with all the business logic when a user unvotes a question.
|
6
|
-
class UnvoteQuestion <
|
6
|
+
class UnvoteQuestion < Decidim::Command
|
7
7
|
# Public: Initializes the command.
|
8
8
|
#
|
9
9
|
# question - A Decidim::Consultations::Question object.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
# A command with all the business logic when a user votes a question.
|
6
|
-
class VoteQuestion <
|
6
|
+
class VoteQuestion < Decidim::Command
|
7
7
|
# Public: Initializes the command.
|
8
8
|
#
|
9
9
|
# form - A Decidim::Consultations::VoteForm object.
|
@@ -38,7 +38,7 @@ module Decidim
|
|
38
38
|
|
39
39
|
def detect_consultation
|
40
40
|
request.env["current_consultation"] ||
|
41
|
-
organization_consultations.find_by(slug: params[:consultation_slug] || params[:slug])
|
41
|
+
organization_consultations.find_by!(slug: params[:consultation_slug] || params[:slug])
|
42
42
|
end
|
43
43
|
|
44
44
|
def organization_consultations
|
@@ -82,8 +82,10 @@ module Decidim
|
|
82
82
|
private
|
83
83
|
|
84
84
|
def detect_question
|
85
|
+
return unless request.env["current_question"] || params[:question_slug] || params[:slug]
|
86
|
+
|
85
87
|
request.env["current_question"] ||
|
86
|
-
OrganizationQuestions.for(current_organization).find_by(slug: params[:question_slug] || params[:slug])
|
88
|
+
OrganizationQuestions.for(current_organization).find_by!(slug: params[:question_slug] || params[:slug])
|
87
89
|
end
|
88
90
|
|
89
91
|
def detect_consultation
|
@@ -38,28 +38,21 @@ module Decidim
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def consultations
|
41
|
-
@consultations = search.
|
41
|
+
@consultations = search.result
|
42
42
|
@consultations = reorder(@consultations)
|
43
43
|
@consultations = paginate(@consultations)
|
44
44
|
end
|
45
45
|
|
46
46
|
alias collection consultations
|
47
47
|
|
48
|
-
def
|
49
|
-
|
48
|
+
def search_collection
|
49
|
+
Consultation.where(organization: current_organization).published
|
50
50
|
end
|
51
51
|
|
52
52
|
def default_filter_params
|
53
53
|
{
|
54
|
-
|
55
|
-
|
56
|
-
}
|
57
|
-
end
|
58
|
-
|
59
|
-
def context_params
|
60
|
-
{
|
61
|
-
organization: current_organization,
|
62
|
-
current_user: current_user
|
54
|
+
search_text_cont: "",
|
55
|
+
with_any_date: "all"
|
63
56
|
}
|
64
57
|
end
|
65
58
|
end
|
@@ -17,7 +17,7 @@ module Decidim
|
|
17
17
|
attribute :banner_image
|
18
18
|
attribute :remove_banner_image, Boolean, default: false
|
19
19
|
attribute :introductory_video_url, String
|
20
|
-
attribute :introductory_image
|
20
|
+
attribute :introductory_image
|
21
21
|
attribute :remove_introductory_image, Boolean, default: false
|
22
22
|
attribute :decidim_highlighted_scope_id, Integer
|
23
23
|
attribute :start_voting_date, Decidim::Attributes::LocalizedDate
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module ConsultationsHelper
|
6
6
|
# Returns options for state filter selector.
|
7
|
-
def
|
7
|
+
def options_for_date_filter
|
8
8
|
[
|
9
9
|
["all", t("consultations.filters.all", scope: "decidim")],
|
10
10
|
["active", t("consultations.filters.active", scope: "decidim")],
|
@@ -34,11 +34,11 @@ module Decidim
|
|
34
34
|
tag = "button"
|
35
35
|
html_options ||= {}
|
36
36
|
|
37
|
-
if
|
38
|
-
html_options["data-open"] = "loginModal"
|
39
|
-
else
|
37
|
+
if current_user
|
40
38
|
html_options["data-open"] = "authorizationModal"
|
41
39
|
html_options["data-open-url"] = decidim_consultations.authorization_vote_modal_question_path(question)
|
40
|
+
else
|
41
|
+
html_options["data-open"] = "loginModal"
|
42
42
|
end
|
43
43
|
|
44
44
|
html_options["onclick"] = "event.preventDefault();"
|
@@ -14,6 +14,7 @@ module Decidim
|
|
14
14
|
include Decidim::Searchable
|
15
15
|
include Decidim::HasUploadValidations
|
16
16
|
include Decidim::TranslatableResource
|
17
|
+
include Decidim::FilterableResource
|
17
18
|
|
18
19
|
translatable_fields :title, :subtitle, :description
|
19
20
|
|
@@ -51,6 +52,8 @@ module Decidim
|
|
51
52
|
scope :finished, -> { published.where("end_voting_date < ?", Time.now.utc) }
|
52
53
|
scope :order_by_most_recent, -> { order(created_at: :desc) }
|
53
54
|
|
55
|
+
scope_search_multi :with_any_date, [:active, :upcoming, :finished]
|
56
|
+
|
54
57
|
searchable_fields({
|
55
58
|
participatory_space: :itself,
|
56
59
|
A: :title,
|
@@ -106,9 +109,12 @@ module Decidim
|
|
106
109
|
!active?
|
107
110
|
end
|
108
111
|
|
109
|
-
#
|
110
|
-
|
111
|
-
|
112
|
+
# Create i18n ransackers for :title, :subtitle and :description.
|
113
|
+
# Create the :search_text ransacker alias for searching from all of these.
|
114
|
+
ransacker_i18n_multi :search_text, [:title, :subtitle, :description]
|
115
|
+
|
116
|
+
def self.ransackable_scopes(_auth_object = nil)
|
117
|
+
[:with_any_date]
|
112
118
|
end
|
113
119
|
end
|
114
120
|
end
|
@@ -36,14 +36,12 @@ module Decidim
|
|
36
36
|
return unless permission_action.scope == :public
|
37
37
|
|
38
38
|
case permission_action.subject
|
39
|
-
when :consultation_list
|
39
|
+
when :consultation_list, :participatory_space
|
40
40
|
allow!
|
41
41
|
when :consultation
|
42
42
|
toggle_allow(consultation.published? || user&.admin?)
|
43
43
|
when :question
|
44
44
|
toggle_allow(question.published? || user&.admin?)
|
45
|
-
when :participatory_space
|
46
|
-
allow!
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
@@ -3,8 +3,10 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
# A presenter to render statistics in the homepage.
|
6
|
-
class QuestionStatsPresenter <
|
7
|
-
|
6
|
+
class QuestionStatsPresenter < SimpleDelegator
|
7
|
+
def question
|
8
|
+
__getobj__.fetch(:question)
|
9
|
+
end
|
8
10
|
|
9
11
|
def supports_count
|
10
12
|
question.votes_count
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module Consultations
|
5
5
|
module Admin
|
6
6
|
# A class used to find the admins for a consultation or an organization consultations.
|
7
|
-
class AdminUsers <
|
7
|
+
class AdminUsers < Decidim::Query
|
8
8
|
# Syntactic sugar to initialize the class and return the queried objects.
|
9
9
|
#
|
10
10
|
# consultation - a consultation that needs to find its consultation admins
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
# This query class filters all consultations given an organization.
|
6
|
-
class OrganizationActiveConsultations <
|
6
|
+
class OrganizationActiveConsultations < Decidim::Query
|
7
7
|
def self.for(organization)
|
8
8
|
new(organization).query
|
9
9
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
# This query class filters all consultations given an organization.
|
6
|
-
class OrganizationConsultations <
|
6
|
+
class OrganizationConsultations < Decidim::Query
|
7
7
|
def self.for(organization)
|
8
8
|
new(organization).query
|
9
9
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="filters__section">
|
5
5
|
<div class="filters__search">
|
6
6
|
<div class="input-group">
|
7
|
-
<%= form.search_field :
|
7
|
+
<%= form.search_field :search_text_cont,
|
8
8
|
label: false,
|
9
9
|
class: "input-group-field",
|
10
10
|
placeholder: t("consultations.filters.search", scope: "decidim"),
|
@@ -20,11 +20,11 @@
|
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<%= form.collection_radio_buttons :
|
24
|
-
|
23
|
+
<%= form.collection_radio_buttons :with_any_date,
|
24
|
+
options_for_date_filter,
|
25
25
|
:first,
|
26
26
|
:last,
|
27
|
-
{ legend_title: t("consultations.filters.
|
27
|
+
{ legend_title: t("consultations.filters.date", scope: "decidim") },
|
28
28
|
"aria-controls": "consultations" %>
|
29
29
|
|
30
30
|
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
@@ -96,4 +96,6 @@
|
|
96
96
|
|
97
97
|
<%= render partial: "decidim/consultations/questions/vote_modal", locals: { question: question } %>
|
98
98
|
<%= render partial: "decidim/consultations/questions/vote_modal_confirm", locals: { question: question } %>
|
99
|
-
|
99
|
+
<% content_for :js_content do %>
|
100
|
+
<%= javascript_pack_tag "decidim_consultations" %>
|
101
|
+
<% end %>
|
@@ -17,6 +17,7 @@
|
|
17
17
|
<div class="row">
|
18
18
|
<div class="columns medium-8 medium-offset-2">
|
19
19
|
<%= form_with url: decidim_consultations.question_question_votes_path(question),
|
20
|
+
local: false,
|
20
21
|
id: "confirm-vote-form" do |form| %>
|
21
22
|
<%= form.hidden_field :decidim_consultations_response_id, id: "decidim_consultations_response_id" %>
|
22
23
|
<%= form.submit t("questions.vote_modal_confirm.confirm", scope: "decidim"),
|
@@ -40,20 +40,22 @@
|
|
40
40
|
|
41
41
|
<div class="columns medium-5">
|
42
42
|
<% unless translated_attribute(current_question.origin_scope).blank? %>
|
43
|
-
<
|
43
|
+
<h3 class="heading6"><%= t "question.origin_scope", scope: "activemodel.attributes" %></h3>
|
44
44
|
<p><%= translated_attribute current_question.origin_scope %></p>
|
45
45
|
<% end %>
|
46
46
|
|
47
|
-
<
|
47
|
+
<h3 class="heading6"><%= t "question.promoter_group", scope: "activemodel.attributes" %></h3>
|
48
48
|
<p><%= translated_attribute current_question.promoter_group %></p>
|
49
49
|
|
50
|
-
<
|
50
|
+
<h3 class="heading6"><%= t "question.scope", scope: "activemodel.attributes" %></h3>
|
51
51
|
<p><%= translated_attribute current_question.scope.name %></p>
|
52
52
|
|
53
|
-
<
|
53
|
+
<h3 class="heading6"><%= t "question.participatory_scope", scope: "activemodel.attributes" %></h3>
|
54
54
|
<p><%= translated_attribute current_question.participatory_scope %></p>
|
55
55
|
</div>
|
56
56
|
</div>
|
57
57
|
<% end %>
|
58
58
|
|
59
|
-
|
59
|
+
<% content_for :js_content do %>
|
60
|
+
<%= javascript_pack_tag "decidim_consultations" %>
|
61
|
+
<% end %>
|
@@ -1,36 +1,21 @@
|
|
1
|
-
<div class="row column">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<span class="process-nav__link">
|
6
|
-
<% if self.try(:current_component) %>
|
7
|
-
<%= component_icon(current_component) %>
|
8
|
-
<%= translated_attribute(current_component.name) %>
|
9
|
-
<% else %>
|
10
|
-
<%= external_icon "media/images/decidim_pages.svg", role: "img", "aria-hidden": true %>
|
11
|
-
<%= t ".question_menu_item" %>
|
12
|
-
<% end %>
|
13
|
-
</span>
|
14
|
-
</button>
|
1
|
+
<div class="row column consultations-nav">
|
2
|
+
<%
|
3
|
+
components = question.components.published.or(Decidim::Component.where(id: self.try(:current_component)))
|
4
|
+
%>
|
15
5
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
active: is_active_link?(main_component_path(component), :inclusive)
|
32
|
-
}
|
33
|
-
end)
|
34
|
-
%>
|
35
|
-
</div>
|
6
|
+
<%=
|
7
|
+
extended_navigation_bar([
|
8
|
+
{
|
9
|
+
name: t(".question_menu_item"),
|
10
|
+
url: decidim_consultations.question_path(question),
|
11
|
+
active: is_active_link?(decidim_consultations.question_path(question), :exclusive)
|
12
|
+
}
|
13
|
+
] + components.map do |component|
|
14
|
+
{
|
15
|
+
name: translated_attribute(component.name),
|
16
|
+
url: main_component_path(component),
|
17
|
+
active: is_active_link?(main_component_path(component), :inclusive)
|
18
|
+
}
|
19
|
+
end)
|
20
|
+
%>
|
36
21
|
</div>
|
@@ -23,10 +23,10 @@
|
|
23
23
|
<%= yield :question_header_instructions if content_for? :question_header_instructions %>
|
24
24
|
|
25
25
|
<div class="row column consultations-title">
|
26
|
-
<
|
26
|
+
<h2 class="heading2"><%= decidim_sanitize translated_attribute question.title %></h2>
|
27
27
|
<% unless question.hashtag.blank? %>
|
28
28
|
<div class="text-center">
|
29
|
-
<%= link_to "##{question.hashtag}",
|
29
|
+
<%= link_to "##{question.hashtag}", twitter_hashtag_url(question.hashtag), target: "_blank" %>
|
30
30
|
</div>
|
31
31
|
<% end %>
|
32
32
|
|
data/config/locales/am-ET.yml
CHANGED