decidim-consultations 0.26.5 → 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 +2 -2
- 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/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/_consultation.html.erb +1 -1
- data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +1 -1
- data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
- data/app/views/decidim/consultations/consultations/_filters.html.erb +4 -4
- data/app/views/decidim/consultations/consultations/_question.html.erb +1 -1
- 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 +3 -1
- data/app/views/layouts/decidim/_consultation_header.html.erb +1 -1
- data/app/views/layouts/decidim/_question_header.html.erb +1 -1
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +2 -1
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +2 -1
- data/config/locales/cs.yml +3 -2
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +2 -1
- data/config/locales/el.yml +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +2 -1
- data/config/locales/es-PY.yml +2 -1
- data/config/locales/es.yml +2 -1
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +1 -1
- data/config/locales/fi-plain.yml +2 -1
- data/config/locales/fi.yml +2 -1
- data/config/locales/fr-CA.yml +3 -2
- data/config/locales/fr.yml +4 -3
- data/config/locales/ga-IE.yml +1 -1
- data/config/locales/gl.yml +2 -1
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +2 -11
- data/config/locales/id-ID.yml +1 -1
- data/config/locales/is-IS.yml +2 -1
- data/config/locales/it.yml +1 -1
- data/config/locales/ja.yml +2 -1
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +1 -3
- data/config/locales/lt.yml +1 -394
- data/config/locales/lv.yml +1 -1
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +2 -2
- data/config/locales/no.yml +1 -1
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +1 -1
- data/config/locales/pt-BR.yml +2 -2
- data/config/locales/pt.yml +1 -1
- data/config/locales/ro-RO.yml +2 -1
- data/config/locales/ru.yml +1 -3
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +1 -1
- 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 -1
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +1 -1
- data/config/locales/uk.yml +1 -3
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +1 -1
- 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 -19
- data/app/services/decidim/consultations/consultation_search.rb +0 -51
- data/config/locales/gn-PY.yml +0 -1
- data/config/locales/ka-GE.yml +0 -1
- data/config/locales/lo-LA.yml +0 -1
- data/config/locales/oc-FR.yml +0 -1
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">
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% highlighted_consultations.each do |consultation| %>
|
8
8
|
<div class="column">
|
9
9
|
<%= link_to decidim_consultations.consultation_path(consultation), class: "card card--consultation card--mini" do %>
|
10
|
-
<div class="card__image-top" style="background-image:url(
|
10
|
+
<div class="card__image-top" style="background-image:url(<%= consultation.attached_uploader(:banner_image).path %>)"></div>
|
11
11
|
<div class="card__content">
|
12
12
|
<span class="card__title card__link"><%= translated_attribute consultation.title %></span>
|
13
13
|
<span class="card--process__small"><%= voting_ends_text_for(consultation) %></span>
|
@@ -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,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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= link_to consultation_path(consultation), class: "consultations-banner" do %>
|
2
2
|
<div class="consultations-header consultations-home-banner row column">
|
3
3
|
<div class="row column consultations-header__main"
|
4
|
-
style="background-image:url(
|
4
|
+
style="background-image:url(<%= consultation.attached_uploader(:banner_image).path %>);">
|
5
5
|
<div class="consultations-header__container row">
|
6
6
|
<div class="columns mediumlarge-9 consultations-header__info">
|
7
7
|
<div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="card card--process">
|
3
3
|
<%= link_to consultation_path(consultation), class: "card__link" do %>
|
4
4
|
<div class="card__image-top"
|
5
|
-
style="background-image:url(
|
5
|
+
style="background-image:url(<%= consultation.attached_uploader(:banner_image).path %>)"></div>
|
6
6
|
<% end %>
|
7
7
|
<div class="card__content">
|
8
8
|
<%= link_to consultation_path(consultation), class: "card__link" do %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="columns medium-6 large-5 large-pull-1">
|
6
6
|
<% if consultation.introductory_video_url.blank? %>
|
7
7
|
<div class="card--full__image consultations-card__image introductory-image"
|
8
|
-
style="background-image: url(
|
8
|
+
style="background-image: url(<%= consultation.attached_uploader(:introductory_image).path %>);">
|
9
9
|
</div>
|
10
10
|
<% else %>
|
11
11
|
<div class="embed-container">
|
@@ -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" %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
<div class="columns mediumlarge-8 large-3 card--process__column">
|
13
13
|
<div class="card--full__image consultations-card__image"
|
14
|
-
style="background-image: url(
|
14
|
+
style="background-image: url(<%= question.banner_image_url %>)">
|
15
15
|
<div class="card__content row collapse">
|
16
16
|
<div class="columns large-10 large-push-1">
|
17
17
|
<% if question.results_published? %>
|
@@ -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"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div class="consultations-header consultations-home-banner row column">
|
4
4
|
<div class="row column consultations-header__main"
|
5
|
-
style="background-image:url(
|
5
|
+
style="background-image:url(<%= current_consultation.attached_uploader(:banner_image).path %>);">
|
6
6
|
<div class="consultations-header__container row">
|
7
7
|
<div class="columns mediumlarge-9 consultations-header__info">
|
8
8
|
<div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="consultations-header row column">
|
2
2
|
<div class="row column consultations-header__main"
|
3
|
-
style="background-image:url(
|
3
|
+
style="background-image:url(<%= question.attached_uploader(:banner_image).path %>);">
|
4
4
|
<div class="consultations-header__container row">
|
5
5
|
<div class="columns mediumlarge-9 consultations-header__info">
|
6
6
|
<div>
|
data/config/locales/am-ET.yml
CHANGED
data/config/locales/ar.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
ar:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -270,9 +271,9 @@ ar:
|
|
270
271
|
filters:
|
271
272
|
active: نشيط
|
272
273
|
all: الكل
|
274
|
+
date: التاريخ
|
273
275
|
finished: تم الانتهاء من
|
274
276
|
search: بحث
|
275
|
-
state: الحالة
|
276
277
|
upcoming: القادمة
|
277
278
|
filters_small_view:
|
278
279
|
close_modal: أغلق النافذة
|
data/config/locales/bg.yml
CHANGED
data/config/locales/ca.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
ca:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -251,9 +252,9 @@ ca:
|
|
251
252
|
filters:
|
252
253
|
active: Actiu
|
253
254
|
all: Totes
|
255
|
+
date: Data
|
254
256
|
finished: Acabat
|
255
257
|
search: Cerca
|
256
|
-
state: Estat
|
257
258
|
upcoming: Proper
|
258
259
|
filters_small_view:
|
259
260
|
close_modal: Tanca la finestra
|
data/config/locales/cs.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
cs:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -267,9 +268,9 @@ cs:
|
|
267
268
|
filters:
|
268
269
|
active: Aktivní
|
269
270
|
all: Vše
|
271
|
+
date: Datum
|
270
272
|
finished: Dokončeno
|
271
273
|
search: Vyhledávání
|
272
|
-
state: Stav
|
273
274
|
upcoming: Nadcházející
|
274
275
|
filters_small_view:
|
275
276
|
close_modal: Zavřete okno
|
@@ -329,7 +330,7 @@ cs:
|
|
329
330
|
show:
|
330
331
|
badge_name:
|
331
332
|
finished: Dokončeno
|
332
|
-
open:
|
333
|
+
open: otevřeno
|
333
334
|
open_votes: Hlasování zahájeno
|
334
335
|
published_results: Publikované výsledky
|
335
336
|
footer_button_text:
|
data/config/locales/da.yml
CHANGED
data/config/locales/de.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
de:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -251,9 +252,9 @@ de:
|
|
251
252
|
filters:
|
252
253
|
active: Aktiv
|
253
254
|
all: Alle
|
255
|
+
date: Datum
|
254
256
|
finished: Fertig
|
255
257
|
search: Suche
|
256
|
-
state: Zustand
|
257
258
|
upcoming: Bevorstehende
|
258
259
|
filters_small_view:
|
259
260
|
close_modal: Fenster schließen
|
data/config/locales/el.yml
CHANGED