Skip to content
Snippets Groups Projects
Commit cfc0a668 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix block init

parent 60f7eb93
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,14 @@ class Communication::Block::Template::CallToAction < Communication::Block::Templ
"#{data['button_secondary']}"
end
def url_tertiary
"#{data['url_tertiary']}"
end
def button_tertiary
"#{data['button_tertiary']}"
end
def image
extract_image_alt_and_credit data, 'image'
end
......
<%= kamifusen_tag @block.template.image.blob,
width: 600,
alt: @block.template.image.alt,
class: 'img-fluid' if @block.template.image %>
<caption><%= @block.template.image.alt %></caption>
<p class="small"><%= @block.template.image.credit %></p>
<%= @block.template.text.html_safe %>
<% if @block.template.image&.blob %>
<%= kamifusen_tag @block.template.image.blob,
width: 600,
alt: @block.template.image.alt,
class: 'img-fluid' if @block.template.image %>
<caption><%= @block.template.image.alt %></caption>
<p class="small"><%= @block.template.image.credit %></p>
<%= @block.template.text.html_safe %>
<% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment