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)

View File

@@ -1,7 +1,7 @@
<div class="legislation-process card">
<%= link_to url_for(process) do %>
<figure class="figure-card">
<%= image_tag("welcome_process.png", alt: "") %>
<%= image_tag(image_path_for("welcome_process.png"), alt: "") %>
<figcaption>
<span><%= t("welcome.feed.process_label") %></span><br>
<h3><%= process.title %></h3>

View File

@@ -1,4 +1,5 @@
class Widget::Feeds::ProcessComponent < ApplicationComponent
delegate :image_path_for, to: :helpers
attr_reader :process
def initialize(process)