Add empty message when there are not local targets

This commit is contained in:
taitus
2021-01-28 17:13:03 +01:00
committed by Javi Martín
parent f45bbb316c
commit 1d151b7b6f
3 changed files with 16 additions and 6 deletions

View File

@@ -10,12 +10,18 @@
<div class="tabs-content" data-tabs-content="target_tabs">
<% [global_targets, local_targets].each do |targets| %>
<div class="tabs-panel <%= active(targets) %>" id="tab_<%= type(targets) %>_targets">
<dl>
<% targets.sort.each do |target| %>
<dt><%= target.code %><dt>
<dd><%= target.title %><dd>
<% end %>
</dl>
<% if targets.blank? %>
<div class="callout primary">
<%= t("sdg.goals.show.targets.no_local_targets") %>
</div>
<% else %>
<dl>
<% targets.sort.each do |target| %>
<dt><%= target.code %><dt>
<dd><%= target.title %><dd>
<% end %>
</dl>
<% end %>
</div>
<% end %>
</div>