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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +2 -2
  3. data/app/commands/decidim/consultations/admin/create_consultation.rb +1 -1
  4. data/app/commands/decidim/consultations/admin/create_question.rb +1 -1
  5. data/app/commands/decidim/consultations/admin/create_response.rb +1 -1
  6. data/app/commands/decidim/consultations/admin/create_response_group.rb +1 -1
  7. data/app/commands/decidim/consultations/admin/destroy_response_group.rb +1 -1
  8. data/app/commands/decidim/consultations/admin/publish_consultation.rb +1 -1
  9. data/app/commands/decidim/consultations/admin/publish_consultation_results.rb +1 -1
  10. data/app/commands/decidim/consultations/admin/publish_question.rb +1 -1
  11. data/app/commands/decidim/consultations/admin/unpublish_consultation.rb +1 -1
  12. data/app/commands/decidim/consultations/admin/unpublish_consultation_results.rb +1 -1
  13. data/app/commands/decidim/consultations/admin/unpublish_question.rb +1 -1
  14. data/app/commands/decidim/consultations/admin/update_consultation.rb +1 -1
  15. data/app/commands/decidim/consultations/admin/update_question.rb +1 -1
  16. data/app/commands/decidim/consultations/admin/update_question_configuration.rb +1 -1
  17. data/app/commands/decidim/consultations/admin/update_response.rb +1 -1
  18. data/app/commands/decidim/consultations/admin/update_response_group.rb +1 -1
  19. data/app/commands/decidim/consultations/multiple_vote_question.rb +1 -1
  20. data/app/commands/decidim/consultations/unvote_question.rb +1 -1
  21. data/app/commands/decidim/consultations/vote_question.rb +1 -1
  22. data/app/controllers/decidim/consultations/consultations_controller.rb +5 -12
  23. data/app/forms/decidim/consultations/admin/consultation_form.rb +1 -1
  24. data/app/helpers/decidim/consultations/consultations_helper.rb +1 -1
  25. data/app/helpers/decidim/consultations/questions_helper.rb +3 -3
  26. data/app/models/decidim/consultation.rb +9 -3
  27. data/app/permissions/decidim/consultations/permissions.rb +1 -3
  28. data/app/presenters/decidim/consultations/question_stats_presenter.rb +4 -2
  29. data/app/queries/decidim/consultations/admin/admin_users.rb +1 -1
  30. data/app/queries/decidim/consultations/organization_active_consultations.rb +1 -1
  31. data/app/queries/decidim/consultations/organization_consultations.rb +1 -1
  32. data/app/queries/decidim/consultations/organization_questions.rb +1 -1
  33. data/app/views/decidim/consultations/_consultation.html.erb +1 -1
  34. data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +1 -1
  35. data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
  36. data/app/views/decidim/consultations/consultations/_filters.html.erb +4 -4
  37. data/app/views/decidim/consultations/consultations/_question.html.erb +1 -1
  38. data/app/views/decidim/consultations/consultations/index.html.erb +3 -1
  39. data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +3 -1
  40. data/app/views/decidim/consultations/questions/_vote_button.html.erb +3 -1
  41. data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -0
  42. data/app/views/decidim/consultations/questions/show.html.erb +3 -1
  43. data/app/views/layouts/decidim/_consultation_header.html.erb +1 -1
  44. data/app/views/layouts/decidim/_question_header.html.erb +1 -1
  45. data/config/locales/am-ET.yml +1 -0
  46. data/config/locales/ar.yml +2 -1
  47. data/config/locales/bg.yml +1 -0
  48. data/config/locales/ca.yml +2 -1
  49. data/config/locales/cs.yml +3 -2
  50. data/config/locales/da.yml +1 -0
  51. data/config/locales/de.yml +2 -1
  52. data/config/locales/el.yml +1 -1
  53. data/config/locales/en.yml +1 -1
  54. data/config/locales/eo.yml +1 -0
  55. data/config/locales/es-MX.yml +2 -1
  56. data/config/locales/es-PY.yml +2 -1
  57. data/config/locales/es.yml +2 -1
  58. data/config/locales/et.yml +1 -0
  59. data/config/locales/eu.yml +1 -1
  60. data/config/locales/fi-plain.yml +2 -1
  61. data/config/locales/fi.yml +2 -1
  62. data/config/locales/fr-CA.yml +3 -2
  63. data/config/locales/fr.yml +4 -3
  64. data/config/locales/ga-IE.yml +1 -1
  65. data/config/locales/gl.yml +2 -1
  66. data/config/locales/hr.yml +1 -0
  67. data/config/locales/hu.yml +2 -11
  68. data/config/locales/id-ID.yml +1 -1
  69. data/config/locales/is-IS.yml +2 -1
  70. data/config/locales/it.yml +1 -1
  71. data/config/locales/ja.yml +2 -1
  72. data/config/locales/ko.yml +1 -0
  73. data/config/locales/lb.yml +1 -3
  74. data/config/locales/lt.yml +1 -394
  75. data/config/locales/lv.yml +1 -1
  76. data/config/locales/mt.yml +1 -0
  77. data/config/locales/nl.yml +2 -2
  78. data/config/locales/no.yml +1 -1
  79. data/config/locales/om-ET.yml +1 -0
  80. data/config/locales/pl.yml +1 -1
  81. data/config/locales/pt-BR.yml +2 -2
  82. data/config/locales/pt.yml +1 -1
  83. data/config/locales/ro-RO.yml +2 -1
  84. data/config/locales/ru.yml +1 -3
  85. data/config/locales/si-LK.yml +1 -0
  86. data/config/locales/sk.yml +1 -1
  87. data/config/locales/sl.yml +1 -0
  88. data/config/locales/so-SO.yml +1 -0
  89. data/config/locales/sr-CS.yml +1 -0
  90. data/config/locales/sv.yml +2 -1
  91. data/config/locales/sw-KE.yml +1 -0
  92. data/config/locales/ti-ER.yml +1 -0
  93. data/config/locales/tr-TR.yml +1 -1
  94. data/config/locales/uk.yml +1 -3
  95. data/config/locales/val-ES.yml +1 -0
  96. data/config/locales/vi.yml +1 -0
  97. data/config/locales/zh-CN.yml +1 -1
  98. data/config/locales/zh-TW.yml +1 -0
  99. data/lib/decidim/consultations/participatory_space.rb +7 -7
  100. data/lib/decidim/consultations/version.rb +1 -1
  101. metadata +14 -19
  102. data/app/services/decidim/consultations/consultation_search.rb +0 -51
  103. data/config/locales/gn-PY.yml +0 -1
  104. data/config/locales/ka-GE.yml +0 -1
  105. data/config/locales/lo-LA.yml +0 -1
  106. data/config/locales/oc-FR.yml +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00d73c6a82981690ec677074cb1dbc436240333e6a6b42c5d04a5d35e7695dcc
4
- data.tar.gz: 5581547c31a6bee5b8ac45396df12c1f4a89e3c95c58896db4f75f19a996e3e6
3
+ metadata.gz: ed2b64c4b2a1e4fe0318cc12cfab14df6d0d890bd1a92cfd67dd00fdb6333d18
4
+ data.tar.gz: 9d68171ea724aa3f93c18a9e9f2d4b88da2bc8f3dd244cdc2d223fc69f7929d3
5
5
  SHA512:
6
- metadata.gz: 59160a8b6d6a755542088492c26b0568ff3aa93b7b5c6eeafa2c305a4d44cc906e1d805ca7917f4777793436c7697ed6e5f7df8c4808cd3ff5ef210799299183
7
- data.tar.gz: 83da9e61428beb8b3d532f3b12d1ff5952800688a69ae651120c84dab4349d9af44ca233d95b146502950a2137b73441d6acc026ed6bc5d06f167a1988ea701d
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('<%= consultation.attached_uploader(:banner_image).path %>')"></div>
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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 < Rectify::Command
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.results
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 search_klass
49
- ConsultationSearch
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
- search_text: "",
55
- state: "all"
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, String
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 options_for_state_filter
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 !current_user
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
- # Allow ransacker to search for a key in a hstore column (`title`.`en`)
110
- ransacker :title do |parent|
111
- Arel::Nodes::InfixOperation.new("->>", parent.table[:title], Arel::Nodes.build_quoted(I18n.locale.to_s))
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 < Rectify::Presenter
7
- attribute :question, Decidim::Consultations::Question
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 < Rectify::Query
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 < Rectify::Query
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 < Rectify::Query
6
+ class OrganizationConsultations < 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 questions given an organization.
6
- class OrganizationQuestions < Rectify::Query
6
+ class OrganizationQuestions < 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('<%= consultation.attached_uploader(:banner_image).path %>');">
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('<%= consultation.attached_uploader(:banner_image).path %>')"></div>
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('<%= consultation.attached_uploader(:introductory_image).path %>');">
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 :search_text,
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 :state,
24
- options_for_state_filter,
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.state", scope: "decidim") },
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('<%= question.banner_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? %>
@@ -31,4 +31,6 @@ edit_link(
31
31
  </div>
32
32
  <% end %>
33
33
 
34
- <%= javascript_pack_tag "decidim_consultations" %>
34
+ <% content_for :js_content do %>
35
+ <%= javascript_pack_tag "decidim_consultations" %>
36
+ <% end %>
@@ -26,4 +26,6 @@
26
26
  </div>
27
27
  </div>
28
28
 
29
- <%= javascript_pack_tag "decidim_consultations" %>
29
+ <% content_for :js_content do %>
30
+ <%= javascript_pack_tag "decidim_consultations" %>
31
+ <% end %>
@@ -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
- <%= javascript_pack_tag "decidim_consultations" %>
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"),
@@ -56,4 +56,6 @@
56
56
  </div>
57
57
  <% end %>
58
58
 
59
- <%= javascript_pack_tag "decidim_consultations" %>
59
+ <% content_for :js_content do %>
60
+ <%= javascript_pack_tag "decidim_consultations" %>
61
+ <% end %>
@@ -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('<%= current_consultation.attached_uploader(:banner_image).path %>');">
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('<%= question.attached_uploader(:banner_image).path %>');">
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>
@@ -1 +1,2 @@
1
+ ---
1
2
  am:
@@ -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: أغلق النافذة
@@ -1 +1,2 @@
1
+ ---
1
2
  bg:
@@ -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
@@ -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: Otevřeno
333
+ open: otevřeno
333
334
  open_votes: Hlasování zahájeno
334
335
  published_results: Publikované výsledky
335
336
  footer_button_text:
@@ -1 +1,2 @@
1
+ ---
1
2
  da:
@@ -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
@@ -1,3 +1,4 @@
1
+ ---
1
2
  el:
2
3
  activemodel:
3
4
  attributes:
@@ -252,7 +253,6 @@ el:
252
253
  all: Όλα
253
254
  finished: Ολοκληρωμένες
254
255
  search: Αναζήτηση
255
- state: Κατάσταση
256
256
  upcoming: Προσεχείς
257
257
  filters_small_view:
258
258
  close_modal: Κλείσιμο παραθύρου