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>

View File

@@ -444,6 +444,8 @@ en:
show:
read_more: "Read more about %{goal}"
read_less: "Read less about %{goal}"
targets:
no_local_targets: This goal has no local targets
title: "Sustainable Development Goals"
filter:
heading: "Filters by SDG"

View File

@@ -444,6 +444,8 @@ es:
show:
read_more: "Leer más sobre %{goal}"
read_less: "Leer menos sobre %{goal}"
targets:
no_local_targets: Este objetivo no tiene metas localizadas
title: "Objetivos de Desarrollo Sostenible"
filter:
heading: "Filtros por ODS"