decidim-consultations 0.24.3 → 0.25.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/consultations/consultation_m_cell.rb +1 -1
  3. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +1 -1
  4. data/app/commands/decidim/consultations/admin/update_consultation.rb +5 -13
  5. data/app/commands/decidim/consultations/admin/update_question.rb +5 -13
  6. data/app/controllers/concerns/decidim/consultations/needs_question.rb +1 -1
  7. data/app/forms/decidim/consultations/admin/consultation_form.rb +2 -2
  8. data/app/forms/decidim/consultations/admin/question_form.rb +3 -3
  9. data/app/models/decidim/consultation.rb +4 -4
  10. data/app/models/decidim/consultations/question.rb +13 -5
  11. data/app/packs/entrypoints/decidim_consultations.js +8 -0
  12. data/app/{assets/images/decidim/consultations/icon.svg → packs/images/decidim/consultations/decidim_consultations.svg} +0 -0
  13. data/app/packs/src/decidim/consultations/show_more.js +10 -0
  14. data/app/{assets/javascripts/decidim/consultations/utils.js.es6 → packs/src/decidim/consultations/utils.js} +5 -5
  15. data/app/{assets/javascripts → packs/src}/decidim/consultations/utils_multiple.js +2 -1
  16. data/app/{assets/javascripts → packs/src}/decidim/consultations/vote_dialog.js +1 -1
  17. data/app/{assets → packs}/stylesheets/decidim/consultations/_question.scss +0 -0
  18. data/app/{assets → packs}/stylesheets/decidim/consultations/_question_multiple_votes.scss +0 -0
  19. data/app/{assets → packs}/stylesheets/decidim/consultations/_stats.scss +0 -0
  20. data/app/{assets → packs}/stylesheets/decidim/consultations/_video_wrapper.scss +0 -0
  21. data/app/{assets → packs}/stylesheets/decidim/consultations/banners/_block-banner.scss +0 -0
  22. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-banner.scss +0 -0
  23. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-card.scss +0 -0
  24. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-header.scss +0 -0
  25. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-home-banner.scss +0 -0
  26. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-home-intro.scss +0 -0
  27. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-intro.scss +0 -0
  28. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-title.scss +0 -0
  29. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations_nav.scss +0 -0
  30. data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/introductory_image.scss +0 -0
  31. data/app/packs/stylesheets/decidim/consultations/consultations.scss +14 -0
  32. data/app/{assets/stylesheets/decidim/consultations/highlighted-content-banner.css.scss → packs/stylesheets/decidim/consultations/highlighted-content-banner.scss} +0 -0
  33. data/app/queries/decidim/consultations/admin/admin_users.rb +16 -12
  34. data/app/views/decidim/consultations/_consultation.html.erb +1 -1
  35. data/app/views/decidim/consultations/admin/consultations/_form.html.erb +1 -1
  36. data/app/views/decidim/consultations/admin/question_configuration/_form.html.erb +1 -1
  37. data/app/views/decidim/consultations/admin/questions/_form.html.erb +1 -1
  38. data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +1 -1
  39. data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
  40. data/app/views/decidim/consultations/consultations/_filters.html.erb +1 -0
  41. data/app/views/decidim/consultations/consultations/index.html.erb +1 -2
  42. data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +1 -1
  43. data/app/views/decidim/consultations/questions/_right_column.html.erb +1 -1
  44. data/app/views/decidim/consultations/questions/_vote_button.html.erb +1 -2
  45. data/app/views/decidim/consultations/questions/show.html.erb +3 -2
  46. data/app/views/layouts/decidim/_consultation_header.html.erb +1 -1
  47. data/app/views/layouts/decidim/_question_components.html.erb +1 -1
  48. data/app/views/layouts/decidim/_question_header.html.erb +1 -1
  49. data/app/views/layouts/decidim/admin/consultation.html.erb +1 -1
  50. data/app/views/layouts/decidim/admin/question.html.erb +4 -83
  51. data/config/assets.rb +9 -0
  52. data/config/locales/ar.yml +2 -8
  53. data/config/locales/ca.yml +5 -8
  54. data/config/locales/cs.yml +5 -8
  55. data/config/locales/de.yml +5 -8
  56. data/config/locales/el.yml +2 -8
  57. data/config/locales/en.yml +6 -8
  58. data/config/locales/es-MX.yml +5 -8
  59. data/config/locales/es-PY.yml +5 -8
  60. data/config/locales/es.yml +5 -8
  61. data/config/locales/eu.yml +2 -8
  62. data/config/locales/fi-plain.yml +5 -8
  63. data/config/locales/fi.yml +5 -8
  64. data/config/locales/fr-CA.yml +3 -9
  65. data/config/locales/fr-LU.yml +372 -0
  66. data/config/locales/fr.yml +2 -8
  67. data/config/locales/gl.yml +5 -8
  68. data/config/locales/hu.yml +2 -8
  69. data/config/locales/id-ID.yml +2 -8
  70. data/config/locales/is-IS.yml +2 -8
  71. data/config/locales/it.yml +6 -8
  72. data/config/locales/ja.yml +8 -8
  73. data/config/locales/lb-LU.yml +1 -0
  74. data/config/locales/lv.yml +2 -8
  75. data/config/locales/nl.yml +5 -8
  76. data/config/locales/no.yml +2 -8
  77. data/config/locales/pl.yml +5 -8
  78. data/config/locales/pt-BR.yml +90 -8
  79. data/config/locales/pt.yml +2 -8
  80. data/config/locales/ro-RO.yml +5 -8
  81. data/config/locales/ru.yml +2 -8
  82. data/config/locales/sk.yml +2 -8
  83. data/config/locales/sv.yml +5 -8
  84. data/config/locales/tr-TR.yml +2 -8
  85. data/config/locales/uk.yml +2 -8
  86. data/config/locales/zh-CN.yml +2 -8
  87. data/lib/decidim/api/consultation_question_type.rb +8 -0
  88. data/lib/decidim/api/consultation_type.rb +8 -0
  89. data/lib/decidim/consultations/admin_engine.rb +109 -24
  90. data/lib/decidim/consultations/engine.rb +6 -12
  91. data/lib/decidim/consultations/participatory_space.rb +46 -9
  92. data/lib/decidim/consultations/version.rb +1 -1
  93. metadata +37 -38
  94. data/app/assets/config/decidim_consultations_manifest.css +0 -3
  95. data/app/assets/config/decidim_consultations_manifest.js +0 -5
  96. data/app/assets/images/decidim/consultations/icon2.svg +0 -1
  97. data/app/assets/javascripts/decidim/consultations/show_more.js.es6 +0 -12
  98. data/app/assets/stylesheets/decidim/consultations/consultations.scss +0 -6
  99. data/app/helpers/decidim/consultations/admin/consultation_menu_helper.rb +0 -15
  100. data/config/locales/ja-JP.yml +0 -367
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76a57b79f44ef8431a92ee879f88670e10a9f0bc7f7e05f6d514449cc41d705a
4
- data.tar.gz: 8a7deefb364d59297a16a98b3406a0be10c5b193ef870e463f104f749a71dff2
3
+ metadata.gz: 5aa524deefdaef9be5dc1c2f64beadc017ad0ef763b0567437b82e93f38573cd
4
+ data.tar.gz: 302a087db8e132962bb79cd124977b75a91b64848794ff743590fe27dfe2fac0
5
5
  SHA512:
6
- metadata.gz: 97a2d2e547dc329dda02b4e4f9974dd65f8974026a7446780891e0370666049ac328d6a58e10fb04d894592215e74a5851e4305bee83662e20c8a7161e12806f
7
- data.tar.gz: ad410b74f846d50645a191a86c484996ffa3adb40fef93da1381e3fa7d39f8939fa3e5e45158d1b1e2176951b8767389cb47c994708e32237fc4f00a0fa15b06
6
+ metadata.gz: 6cbbd8a681bdfa90b2896138e8ceba1b9c5d8bee88daf63ef88e8473cd7eceb26c8da32f250143c321d0121bda16d6fba7d19bedc86b9fe2b56080064d9f159b
7
+ data.tar.gz: c38c6f123b0e88754238caf18c265549f2d153618aff871c5ab67e136dd4789cb0cfb87bdf418c4e86654953b9833c276ab05c596a87a5e95404189631c00ef1
@@ -44,7 +44,7 @@ module Decidim
44
44
  end
45
45
 
46
46
  def resource_image_path
47
- model.banner_image.url
47
+ model.attached_uploader(:banner_image).path
48
48
  end
49
49
 
50
50
  def has_image?
@@ -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.banner_image.url %>)"></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>
@@ -6,14 +6,13 @@ module Decidim
6
6
  # A command with all the business logic when updating an existing participatory
7
7
  # consultation in the system.
8
8
  class UpdateConsultation < Rectify::Command
9
+ include ::Decidim::AttachmentAttributesMethods
10
+
9
11
  # Public: Initializes the command.
10
12
  #
11
13
  # consultation - the Consultation to update
12
14
  # form - A form object with the params.
13
15
  def initialize(consultation, form)
14
- form.banner_image = consultation.banner_image if form.banner_image.blank?
15
- form.introductory_image = consultation.introductory_image if form.introductory_image.blank?
16
-
17
16
  @consultation = consultation
18
17
  @form = form
19
18
  end
@@ -57,16 +56,9 @@ module Decidim
57
56
  introductory_video_url: form.introductory_video_url,
58
57
  start_voting_date: form.start_voting_date,
59
58
  end_voting_date: form.end_voting_date
60
- }.merge(uploader_attributes)
61
- end
62
-
63
- def uploader_attributes
64
- {
65
- banner_image: form.banner_image,
66
- remove_banner_image: form.remove_banner_image,
67
- introductory_image: form.introductory_image,
68
- remove_introductory_image: form.remove_introductory_image
69
- }.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
59
+ }.merge(
60
+ attachment_attributes(:introductory_image, :banner_image)
61
+ )
70
62
  end
71
63
  end
72
64
  end
@@ -6,14 +6,13 @@ module Decidim
6
6
  # A command with all the business logic when updating an existing participatory
7
7
  # question in the system.
8
8
  class UpdateQuestion < Rectify::Command
9
+ include ::Decidim::AttachmentAttributesMethods
10
+
9
11
  # Public: Initializes the command.
10
12
  #
11
13
  # question - the Question to update
12
14
  # form - A form object with the params.
13
15
  def initialize(question, form)
14
- form.hero_image = question.hero_image if form.hero_image.blank?
15
- form.banner_image = question.banner_image if form.banner_image.blank?
16
-
17
16
  @question = question
18
17
  @form = form
19
18
  end
@@ -64,16 +63,9 @@ module Decidim
64
63
  external_voting: form.external_voting,
65
64
  i_frame_url: form.i_frame_url,
66
65
  order: form.order
67
- }.merge(uploader_attributes)
68
- end
69
-
70
- def uploader_attributes
71
- {
72
- hero_image: form.hero_image,
73
- remove_hero_image: form.remove_hero_image,
74
- banner_image: form.banner_image,
75
- remove_banner_image: form.remove_banner_image
76
- }.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
66
+ }.merge(
67
+ attachment_attributes(:hero_image, :banner_image)
68
+ )
77
69
  end
78
70
  end
79
71
  end
@@ -112,7 +112,7 @@ module Decidim
112
112
  end
113
113
 
114
114
  def current_published_question_index
115
- current_consultation_published_questions.find_index(current_question)
115
+ current_consultation_published_questions.find_index(current_question) || -1
116
116
  end
117
117
  end
118
118
  end
@@ -15,10 +15,10 @@ module Decidim
15
15
  translatable_attribute :description, String
16
16
  attribute :slug, String
17
17
  attribute :banner_image
18
- attribute :remove_banner_image
18
+ attribute :remove_banner_image, Boolean, default: false
19
19
  attribute :introductory_video_url, String
20
20
  attribute :introductory_image, String
21
- attribute :remove_introductory_image
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
24
24
  attribute :end_voting_date, Decidim::Attributes::LocalizedDate
@@ -20,10 +20,10 @@ module Decidim
20
20
  translatable_attribute :origin_title, String
21
21
  attribute :origin_url, String
22
22
  attribute :slug, String
23
- attribute :remove_hero_image
23
+ attribute :remove_hero_image, Boolean, default: false
24
24
  attribute :hero_image
25
25
  attribute :banner_image
26
- attribute :remove_banner_image
26
+ attribute :remove_banner_image, Boolean, default: false
27
27
  attribute :hashtag, String
28
28
  attribute :decidim_scope_id, Integer
29
29
  attribute :external_voting, Boolean, default: false
@@ -37,7 +37,7 @@ module Decidim
37
37
  validates :banner_image, passthru: { to: Decidim::Consultations::Question }
38
38
  validate :slug_uniqueness
39
39
  validates :origin_scope, :origin_title, translatable_presence: true, if: :has_origin_data?
40
- validates :i_frame_url, presence: true, if: :external_voting
40
+ validates :i_frame_url, url: true, presence: true, if: :external_voting
41
41
  validates :order, numericality: { only_integer: true, allow_nil: true, allow_blank: true }
42
42
 
43
43
  alias organization current_organization
@@ -36,11 +36,11 @@ module Decidim
36
36
  validates :slug, uniqueness: { scope: :organization }
37
37
  validates :slug, presence: true, format: { with: Decidim::Consultation.slug_format }
38
38
 
39
- validates_upload :banner_image
40
- mount_uploader :banner_image, Decidim::BannerImageUploader
39
+ has_one_attached :banner_image
40
+ validates_upload :banner_image, uploader: Decidim::BannerImageUploader
41
41
 
42
- validates_upload :introductory_image
43
- mount_uploader :introductory_image, Decidim::BannerImageUploader
42
+ has_one_attached :introductory_image
43
+ validates_upload :introductory_image, uploader: Decidim::BannerImageUploader
44
44
 
45
45
  scope :upcoming, -> { published.where("start_voting_date > ?", Time.now.utc) }
46
46
  scope :active, lambda {
@@ -55,11 +55,11 @@ module Decidim
55
55
  dependent: :destroy,
56
56
  as: :participatory_space
57
57
 
58
- validates_upload :hero_image
59
- mount_uploader :hero_image, Decidim::HeroImageUploader
58
+ has_one_attached :hero_image
59
+ validates_upload :hero_image, uploader: Decidim::HeroImageUploader
60
60
 
61
- validates_upload :banner_image
62
- mount_uploader :banner_image, Decidim::BannerImageUploader
61
+ has_one_attached :banner_image
62
+ validates_upload :banner_image, uploader: Decidim::BannerImageUploader
63
63
 
64
64
  default_scope { order(order: :asc) }
65
65
 
@@ -132,7 +132,7 @@ module Decidim
132
132
  end
133
133
 
134
134
  def banner_image_url
135
- banner_image.present? ? banner_image.url : consultation.banner_image.url
135
+ banner_image.attached? ? attached_uploader(:banner_image).path : consultation.attached_uploader(:banner_image).path
136
136
  end
137
137
 
138
138
  # Public: Check if the user has voted the question.
@@ -201,6 +201,14 @@ module Decidim
201
201
  true
202
202
  end
203
203
 
204
+ def user_allowed_to_comment?(user)
205
+ ActionAuthorizer.new(user, "comment", self, nil).authorize.ok?
206
+ end
207
+
208
+ def component
209
+ nil
210
+ end
211
+
204
212
  def attachment_context
205
213
  :admin
206
214
  end
@@ -0,0 +1,8 @@
1
+ import "src/decidim/consultations/show_more"
2
+ import "src/decidim/consultations/utils"
3
+ import "src/decidim/consultations/utils_multiple"
4
+ import "src/decidim/consultations/vote_dialog"
5
+ import "src/decidim/slug_form"
6
+
7
+ // Images
8
+ require.context("../images", true)
@@ -0,0 +1,10 @@
1
+ /* eslint-disable no-invalid-this */
2
+
3
+ $(() => {
4
+
5
+ $(".show-more").on("click", function() {
6
+ $(this).hide();
7
+ $(".show-more-panel").removeClass("hide");
8
+ });
9
+
10
+ })
@@ -1,10 +1,10 @@
1
- /* eslint-disable no-invalid-this, no-undefined */
1
+ /* eslint-disable no-invalid-this */
2
2
 
3
- (() => {
3
+ $(() => {
4
4
  $(".vote-button-caption").mouseover(function () {
5
5
  const replaceText = $(this).data("replace");
6
6
 
7
- if (replaceText !== null && replaceText !== undefined && replaceText !== "") {
7
+ if (replaceText) {
8
8
  $(this).text(replaceText);
9
9
  }
10
10
  });
@@ -12,8 +12,8 @@
12
12
  $(".vote-button-caption").mouseout(function () {
13
13
  const originalText = $(this).data("original");
14
14
 
15
- if (originalText !== null && originalText !== undefined && originalText !== "") {
15
+ if (originalText) {
16
16
  $(this).text(originalText);
17
17
  }
18
18
  });
19
- })(this);
19
+ })
@@ -1,7 +1,8 @@
1
1
  /* eslint-disable no-invalid-this, no-undefined */
2
2
 
3
- $(document).ready(function () {
3
+ $(() => {
4
4
  let $remainingVotesCount = $("#remaining-votes-count");
5
+
5
6
  $('form .multiple_votes_form input[type="checkbox"]').on("change", function(event) {
6
7
  let max = parseInt($remainingVotesCount.text(), 10);
7
8
  if ($(this).is(":checked")) {
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-invalid-this */
2
2
 
3
- $(document).ready(function () {
3
+ $(() => {
4
4
  let button = $("#vote_button"),
5
5
  buttonChange = $("#question-vote-confirm-modal-button-change"),
6
6
  responseButtons = $(".response-title"),
@@ -0,0 +1,14 @@
1
+ @import "stylesheets/decidim/consultations/question";
2
+ @import "stylesheets/decidim/consultations/question_multiple_votes";
3
+ @import "stylesheets/decidim/consultations/video_wrapper";
4
+ @import "stylesheets/decidim/consultations/stats";
5
+ @import "stylesheets/decidim/consultations/consultations/consultations-banner";
6
+ @import "stylesheets/decidim/consultations/consultations/consultations-card";
7
+ @import "stylesheets/decidim/consultations/consultations/consultations-header";
8
+ @import "stylesheets/decidim/consultations/consultations/consultations-home-banner";
9
+ @import "stylesheets/decidim/consultations/consultations/consultations-home-intro";
10
+ @import "stylesheets/decidim/consultations/consultations/consultations-intro";
11
+ @import "stylesheets/decidim/consultations/consultations/consultations_nav";
12
+ @import "stylesheets/decidim/consultations/consultations/consultations-title";
13
+ @import "stylesheets/decidim/consultations/consultations/introductory_image";
14
+ @import "stylesheets/decidim/consultations/banners/block-banner";
@@ -3,37 +3,41 @@
3
3
  module Decidim
4
4
  module Consultations
5
5
  module Admin
6
- # A class used to find the admins for a participatory process including
7
- # organization admins.
6
+ # A class used to find the admins for a consultation or an organization consultations.
8
7
  class AdminUsers < Rectify::Query
9
8
  # Syntactic sugar to initialize the class and return the queried objects.
10
9
  #
11
- # consultation - a process that needs to find its process admins
10
+ # consultation - a consultation that needs to find its consultation admins
12
11
  def self.for(consultation)
13
12
  new(consultation).query
14
13
  end
15
14
 
15
+ # Syntactic sugar to initialize the class and return the queried objects.
16
+ #
17
+ # organization - an organization that needs to find its consultation admins
18
+ def self.for_organization(organization)
19
+ new(nil, organization).query
20
+ end
21
+
16
22
  # Initializes the class.
17
23
  #
18
- # consultation - a consultation that needs to find its process admins
19
- def initialize(consultation)
24
+ # consultation - a consultation that needs to find its consultation admins
25
+ # organization - an organization that needs to find its consultation admins
26
+ def initialize(consultation, organization = nil)
20
27
  @consultation = consultation
28
+ @organization = consultation&.organization || organization
21
29
  end
22
30
 
23
- # Finds organization admins and the users with role admin for the given process.
31
+ # Finds organization admins and the users with role admin for the given consultation.
24
32
  #
25
33
  # Returns an ActiveRecord::Relation.
26
34
  def query
27
- Decidim::User.where(id: organization_admins)
35
+ organization.admins
28
36
  end
29
37
 
30
38
  private
31
39
 
32
- attr_reader :consultation
33
-
34
- def organization_admins
35
- consultation.organization.admins
36
- end
40
+ attr_reader :organization
37
41
  end
38
42
  end
39
43
  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.banner_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>
@@ -1,4 +1,4 @@
1
- <%= javascript_include_tag "decidim/slug_form" %>
1
+ <%= javascript_pack_tag "decidim_consultations" %>
2
2
 
3
3
  <div class="card">
4
4
  <div class="card-divider">
@@ -1,4 +1,4 @@
1
- <%= javascript_include_tag "decidim/slug_form" %>
1
+ <%= javascript_pack_tag "decidim_consultations" %>
2
2
 
3
3
  <div class="card">
4
4
  <div class="card-divider">
@@ -1,4 +1,4 @@
1
- <%= javascript_include_tag "decidim/slug_form" %>
1
+ <%= javascript_pack_tag "decidim_consultations" %>
2
2
 
3
3
  <div class="card">
4
4
  <div class="card-divider">
@@ -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.banner_image.url %>)"></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.introductory_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">
@@ -9,6 +9,7 @@
9
9
  class: "input-group-field",
10
10
  placeholder: t("consultations.filters.search", scope: "decidim"),
11
11
  title: t("consultations.filters.search", scope: "decidim"),
12
+ "aria-label": t("consultations.filters.search", scope: "decidim"),
12
13
  data: { disable_dynamic_change: true } %>
13
14
  <div class="input-group-button">
14
15
  <button type="submit" class="button" aria-controls="consultations">
@@ -31,5 +31,4 @@ edit_link(
31
31
  </div>
32
32
  <% end %>
33
33
 
34
- <%= javascript_include_tag "decidim/filters" %>
35
- <%= javascript_include_tag "decidim/results_listing" %>
34
+ <%= javascript_pack_tag "decidim_consultations" %>
@@ -26,4 +26,4 @@
26
26
  </div>
27
27
  </div>
28
28
 
29
- <%= javascript_include_tag "decidim/consultations/utils_multiple" %>
29
+ <%= javascript_pack_tag "decidim_consultations" %>
@@ -1,5 +1,5 @@
1
1
  <% add_decidim_meta_tags({
2
- image_url: current_participatory_space.hero_image_url,
2
+ image_url: current_participatory_space.attached_uploader(:hero_image).path,
3
3
  description: translated_attribute(current_participatory_space.question_context),
4
4
  title: strip_tags(translated_attribute(current_participatory_space.title)),
5
5
  url: decidim_consultations.question_url(current_participatory_space),
@@ -96,5 +96,4 @@
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_include_tag "decidim/consultations/utils" %>
100
- <%= javascript_include_tag "decidim/consultations/vote_dialog" %>
99
+ <%= javascript_pack_tag "decidim_consultations" %>
@@ -30,13 +30,12 @@
30
30
  </div>
31
31
  </div>
32
32
 
33
- <%= javascript_include_tag "decidim/consultations/show_more" %>
34
33
  <%= comments_for current_question if current_question.published? %>
35
34
 
36
35
  <%= content_for :question_header_details do %>
37
36
  <div id="question-header-details" class="row consultations-home-intro">
38
37
  <div class="columns medium-5">
39
- <%= image_tag current_question.hero_image&.url, alt: t("question.hero_image", scope: "activemodel.attributes") if current_question.hero_image&.url %>
38
+ <%= image_tag current_question.attached_uploader(:hero_image).path, alt: t("question.hero_image", scope: "activemodel.attributes") if current_question.hero_image.attached? %>
40
39
  </div>
41
40
 
42
41
  <div class="columns medium-5">
@@ -56,3 +55,5 @@
56
55
  </div>
57
56
  </div>
58
57
  <% end %>
58
+
59
+ <%= javascript_pack_tag "decidim_consultations" %>
@@ -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.banner_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>
@@ -7,7 +7,7 @@
7
7
  <%= component_icon(current_component) %>
8
8
  <%= translated_attribute(current_component.name) %>
9
9
  <% else %>
10
- <%= external_icon "decidim/pages/icon.svg", role: "img", "aria-hidden": true %>
10
+ <%= external_icon "media/images/decidim_pages.svg", role: "img", "aria-hidden": true %>
11
11
  <%= t ".question_menu_item" %>
12
12
  <% end %>
13
13
  </span>
@@ -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.banner_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>
@@ -1,5 +1,5 @@
1
1
  <% content_for :sidebar_menu_nav do %>
2
- <%= admin_consultation_menu.render do
2
+ <%= sidebar_menu(:admin_consultation_menu).render do
3
3
  public_page_link decidim_consultations.consultation_path(current_consultation)
4
4
  end %>
5
5
  <% end %>