Skip to content

Commit

Permalink
override image size media
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Nov 13, 2023
1 parent 026580a commit 92b21f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/cells/concerns/decidim/photo_cell_override.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Decidim
module PhotoCellOverride
extend ActiveSupport::Concern

def image_thumb
image_tag model.big_url, alt: t("alt", scope: "decidim.conferences.photo.image.attributes")
end
end
end
1 change: 1 addition & 0 deletions config/initializers/conferences_hacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Decidim::CardMCell.prepend(Decidim::CardMCellOverride)
Decidim::CardMCell.include(Decidim::ConferenceCellExtensions)
Decidim::Conferences::ConferenceMCell.include(Decidim::ConferenceCellExtensions)
Decidim::Conferences::PhotoCell.prepend(Decidim::PhotoCellOverride)
Decidim::Conference.include(ConferenceOverride)
end

Expand Down

0 comments on commit 92b21f6

Please sign in to comment.