Add more images to admin site customization

This commit is contained in:
decabeza
2022-05-19 20:34:09 +02:00
committed by Javi Martín
parent 11bed74678
commit 10cd182774
12 changed files with 81 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
<% if investment.image.present? %>
<%= image_tag investment.image.variant(:large), alt: investment.image.title.unicode_normalize %>
<% else %>
<%= image_tag "budget_investment_no_image.jpg", alt: investment.title %>
<%= image_tag(image_path_for("budget_investment_no_image.jpg"), alt: investment.title) %>
<% end %>
<% if investment.should_show_vote_count? || investment.should_show_price? %>

View File

@@ -1,5 +1,5 @@
class Budgets::InvestmentComponent < ApplicationComponent
delegate :locale_and_user_status, :namespaced_budget_investment_path, to: :helpers
delegate :locale_and_user_status, :namespaced_budget_investment_path, :image_path_for, to: :helpers
attr_reader :investment
def initialize(investment)