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

summary only if objects exist (#1997)

parent 2ceecdae
No related branches found
No related tags found
No related merge requests found
......@@ -17,19 +17,19 @@
number_of_panels = 0
%>
<div class="row g-5">
<% if @website.feature_posts && can?(:read, Communication::Website::Post) %>
<% if @website.feature_posts && @posts.any? && can?(:read, Communication::Website::Post) %>
<% number_of_panels += 1 %>
<div class="col-lg-6">
<%= render 'admin/communication/websites/show/posts' %>
</div>
<% end %>
<% if @website.feature_agenda && can?(:read, Communication::Website::Agenda::Event) %>
<% if @website.feature_agenda && @events.any? && can?(:read, Communication::Website::Agenda::Event) %>
<% number_of_panels += 1 %>
<div class="col-lg-6">
<%= render 'admin/communication/websites/show/events' %>
</div>
<% end %>
<% if @website.feature_portfolio && can?(:read, Communication::Website::Portfolio::Project) %>
<% if @website.feature_portfolio && @projects.any? && can?(:read, Communication::Website::Portfolio::Project) %>
<% number_of_panels += 1 %>
<div class="col-lg-6">
<%= render 'admin/communication/websites/show/projects' %>
......
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