Skip to content
Snippets Groups Projects
Unverified Commit b5876030 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Fix #2482 (#2493)

parent 3e45823c
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,10 @@ call_to_action_class += ' call_to_action--with-title' unless block.title.blank?
<%= render 'admin/communication/blocks/partials/top', block: block %>
<% if block.template.elements %>
<div class="actions" <% if block.template.elements.count > 1 %>role="group"<% end %>>
<% block.template.elements.each do |element| %>
<%
block.template.elements.each do |element|
next if element.title.blank?
%>
<% if element.title %>
<a href="<%= block_component_show block, :url, template: element %>"
<% if element.target_blank %>
......
<div class="mb-1"><%= block_component_snippet block, :text %></div>
<% block.template.elements.each_with_index do |element, index| %>
<%
block.template.elements.each_with_index do |element, index|
next if element.title.blank?
%>
<a class="btn disabled <%= index.zero? ? 'btn-dark' : 'btn-light' %>">
<%= block_component_snippet block, :title, template: element %>
</a>
......
......@@ -4,9 +4,11 @@
<%= block_component_static block, :alt %>
<%= block_component_static block, :credit %>
buttons:
<% block.template.elements.each do |element| %>
<%
block.template.elements.each do |element|
next if element.title.blank?
%>
<%= block_component_static block, :title, template: element, list: true, depth: 4 %>
<%= block_component_static block, :url, template: element, depth: 5 %>
<%= block_component_static block, :target_blank, template: element, depth: 5 %>
<% 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