decidim-consultations 0.24.0 → 0.25.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/consultation_m_cell.rb +1 -1
- data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +1 -1
- data/app/commands/decidim/consultations/admin/update_consultation.rb +5 -13
- data/app/commands/decidim/consultations/admin/update_question.rb +5 -13
- data/app/controllers/concerns/decidim/consultations/needs_question.rb +1 -1
- data/app/forms/decidim/consultations/admin/consultation_form.rb +2 -2
- data/app/forms/decidim/consultations/admin/question_form.rb +3 -3
- data/app/models/decidim/consultation.rb +4 -4
- data/app/models/decidim/consultations/question.rb +13 -5
- data/app/packs/entrypoints/decidim_consultations.js +8 -0
- data/app/{assets/images/decidim/consultations/icon.svg → packs/images/decidim/consultations/decidim_consultations.svg} +0 -0
- data/app/packs/src/decidim/consultations/show_more.js +10 -0
- data/app/{assets/javascripts/decidim/consultations/utils.js.es6 → packs/src/decidim/consultations/utils.js} +5 -5
- data/app/{assets/javascripts → packs/src}/decidim/consultations/utils_multiple.js +2 -1
- data/app/{assets/javascripts → packs/src}/decidim/consultations/vote_dialog.js +1 -1
- data/app/{assets → packs}/stylesheets/decidim/consultations/_question.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/_question_multiple_votes.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/_stats.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/_video_wrapper.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/banners/_block-banner.scss +0 -0
- data/app/packs/stylesheets/decidim/consultations/consultations.scss +14 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-banner.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-card.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-header.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-home-banner.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-home-intro.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-intro.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-title.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations_nav.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/introductory_image.scss +0 -0
- data/app/{assets/stylesheets/decidim/consultations/highlighted-content-banner.css.scss → packs/stylesheets/decidim/consultations/highlighted-content-banner.scss} +0 -0
- data/app/queries/decidim/consultations/admin/admin_users.rb +16 -12
- data/app/views/decidim/consultations/_consultation.html.erb +1 -1
- data/app/views/decidim/consultations/admin/consultations/_form.html.erb +1 -1
- data/app/views/decidim/consultations/admin/consultations/index.html.erb +1 -1
- data/app/views/decidim/consultations/admin/question_configuration/_form.html.erb +1 -1
- data/app/views/decidim/consultations/admin/questions/_form.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 +1 -0
- data/app/views/decidim/consultations/consultations/index.html.erb +1 -2
- data/app/views/decidim/consultations/question_multiple_votes/_voting_rules.html.erb +1 -1
- data/app/views/decidim/consultations/questions/_right_column.html.erb +1 -1
- data/app/views/decidim/consultations/questions/_vote_button.html.erb +1 -2
- data/app/views/decidim/consultations/questions/show.html.erb +3 -2
- data/app/views/layouts/decidim/_consultation_header.html.erb +1 -1
- data/app/views/layouts/decidim/_question_components.html.erb +1 -1
- data/app/views/layouts/decidim/_question_header.html.erb +1 -1
- data/app/views/layouts/decidim/admin/consultation.html.erb +1 -1
- data/app/views/layouts/decidim/admin/question.html.erb +4 -83
- data/config/assets.rb +9 -0
- data/config/locales/ar.yml +2 -8
- data/config/locales/ca.yml +5 -8
- data/config/locales/cs.yml +10 -13
- data/config/locales/de.yml +5 -8
- data/config/locales/el.yml +2 -8
- data/config/locales/en.yml +6 -8
- data/config/locales/es-MX.yml +5 -8
- data/config/locales/es-PY.yml +5 -8
- data/config/locales/es.yml +5 -8
- data/config/locales/eu.yml +2 -8
- data/config/locales/fi-plain.yml +5 -8
- data/config/locales/fi.yml +5 -8
- data/config/locales/fr-CA.yml +3 -9
- data/config/locales/fr-LU.yml +372 -0
- data/config/locales/fr.yml +2 -8
- data/config/locales/gl.yml +5 -8
- data/config/locales/hu.yml +2 -8
- data/config/locales/id-ID.yml +2 -8
- data/config/locales/is-IS.yml +2 -8
- data/config/locales/it.yml +6 -8
- data/config/locales/ja.yml +8 -8
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +2 -8
- data/config/locales/nl.yml +5 -8
- data/config/locales/no.yml +2 -8
- data/config/locales/pl.yml +6 -9
- data/config/locales/pt-BR.yml +90 -8
- data/config/locales/pt.yml +2 -8
- data/config/locales/ro-RO.yml +5 -8
- data/config/locales/ru.yml +2 -8
- data/config/locales/sk.yml +2 -8
- data/config/locales/sv.yml +8 -8
- data/config/locales/tr-TR.yml +2 -8
- data/config/locales/uk.yml +2 -8
- data/config/locales/zh-CN.yml +2 -8
- data/lib/decidim/api/consultation_question_type.rb +8 -0
- data/lib/decidim/api/consultation_type.rb +8 -0
- data/lib/decidim/consultations/admin_engine.rb +109 -24
- data/lib/decidim/consultations/engine.rb +6 -12
- data/lib/decidim/consultations/participatory_space.rb +46 -9
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +38 -39
- data/app/assets/config/decidim_consultations_manifest.css +0 -3
- data/app/assets/config/decidim_consultations_manifest.js +0 -5
- data/app/assets/images/decidim/consultations/icon2.svg +0 -1
- data/app/assets/javascripts/decidim/consultations/show_more.js.es6 +0 -12
- data/app/assets/stylesheets/decidim/consultations/consultations.scss +0 -6
- data/app/helpers/decidim/consultations/admin/consultation_menu_helper.rb +0 -15
- data/config/locales/ja-JP.yml +0 -367
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f64f136c291b8eafc43cfa52ba5e097c6b0e3ffe2a931d528557eb4a6168802
|
4
|
+
data.tar.gz: 614cbb4d2e1c4d57c4ca5d09bcb374bcecf13910e7cf16680d0930f53035728f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd201e2dc280154c5612183d518516460361d8bd33c5421ee9245779a88e5a6dae7b6241bf751e46a39a240b9d7144f0f4490638d7b602963a5ce50025d3b715
|
7
|
+
data.tar.gz: fc0d58733d3f97e11a0ddaecf5a621bfa3e0716e8a1e7de61a3549a1d70f9ce677d0ff1a8d104023b23700d2a8383013db317d76e340a56bfa406f8f6eb725e0
|
@@ -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.
|
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(
|
61
|
-
|
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(
|
68
|
-
|
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
|
@@ -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
|
-
|
40
|
-
|
39
|
+
has_one_attached :banner_image
|
40
|
+
validates_upload :banner_image, uploader: Decidim::BannerImageUploader
|
41
41
|
|
42
|
-
|
43
|
-
|
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
|
-
|
59
|
-
|
58
|
+
has_one_attached :hero_image
|
59
|
+
validates_upload :hero_image, uploader: Decidim::HeroImageUploader
|
60
60
|
|
61
|
-
|
62
|
-
|
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.
|
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)
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
|
-
/* eslint-disable no-invalid-this
|
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
|
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
|
15
|
+
if (originalText) {
|
16
16
|
$(this).text(originalText);
|
17
17
|
}
|
18
18
|
});
|
19
|
-
})
|
19
|
+
})
|
@@ -1,7 +1,8 @@
|
|
1
1
|
/* eslint-disable no-invalid-this, no-undefined */
|
2
2
|
|
3
|
-
$(
|
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")) {
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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";
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-banner.scss
RENAMED
File without changes
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-card.scss
RENAMED
File without changes
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-header.scss
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-intro.scss
RENAMED
File without changes
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations-title.scss
RENAMED
File without changes
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/_consultations_nav.scss
RENAMED
File without changes
|
data/app/{assets → packs}/stylesheets/decidim/consultations/consultations/introductory_image.scss
RENAMED
File without changes
|
File without changes
|
@@ -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
|
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
|
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
|
19
|
-
|
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
|
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
|
-
|
35
|
+
organization.admins
|
28
36
|
end
|
29
37
|
|
30
38
|
private
|
31
39
|
|
32
|
-
attr_reader :
|
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.
|
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>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h2 class="card-title">
|
4
4
|
<%= t "decidim.admin.titles.consultations" %>
|
5
5
|
<%= link_to t("actions.new_consultation", scope: "decidim.admin"),
|
6
|
-
[
|
6
|
+
[:new, :consultation], class: "button tiny button--title" if allowed_to? :create, :consultation %>
|
7
7
|
</h2>
|
8
8
|
</div>
|
9
9
|
<%= admin_filter_selector %>
|
@@ -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.
|
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.
|
8
|
+
style="background-image: url(<%= consultation.attached_uploader(:introductory_image).path %>);">
|
9
9
|
</div>
|
10
10
|
<% else %>
|
11
11
|
<div class="embed-container">
|