Merge pull request #4004 from consul/shared-banner

Move conditional into shared banner partial
This commit is contained in:
Javier Martín
2020-06-18 23:39:32 +02:00
committed by GitHub
6 changed files with 11 additions and 19 deletions

View File

@@ -1,6 +1,4 @@
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>
<%= render "shared/banner" %>
<% provide :title do %><%= t("budgets.index.title") %><% end %>

View File

@@ -40,9 +40,7 @@
<div class="row">
<div id="debates" class="debates-list small-12 medium-9 column">
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>
<%= render "shared/banner" %>
<% unless @search_terms || !has_featured? %>
<%= render "featured_debates" %>

View File

@@ -3,9 +3,7 @@
<%= render "shared/canonical", href: help_url %>
<% end %>
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>
<%= render "shared/banner" %>
<div class="jumbo light">
<div class="row">

View File

@@ -49,9 +49,7 @@
<div class="row">
<div id="proposals" class="proposals-list small-12 medium-9 column">
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>
<%= render "shared/banner" %>
<% if show_featured_proposals? %>
<div id="featured-proposals" class="row featured-proposals">

View File

@@ -1,4 +1,6 @@
<% banner ||= @banners.sample %>
<div class="banner" style="background-color:<%= banner.background_color %>;">
<%= sanitize banner_target_link(banner), attributes: %w[href style] %>
</div>
<% if has_banners? || controller.class == Admin::BannersController %>
<% banner ||= @banners.sample %>
<div class="banner" style="background-color:<%= banner.background_color %>;">
<%= sanitize banner_target_link(banner), attributes: %w[href style] %>
</div>
<% end %>

View File

@@ -4,9 +4,7 @@
<%= render "shared/canonical", href: root_url %>
<% end %>
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>
<%= render "shared/banner" %>
<% provide :social_media_meta_tags do %>
<%= render "shared/social_media_meta_tags",