From 6c33569f1238a8f01d7cf81ab26167a60a3322e1 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 26 May 2020 16:47:16 -0300 Subject: [PATCH] no mostrar traducciones si hay un solo idioma --- app/views/posts/index.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index e888625a..6ff7ff55 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -36,10 +36,11 @@ -# TODO: Pensar una interfaz mejor para cuando haya más de tres idiomas - .locales - - @site.locales.each do |locale| - = link_to t("locales.#{locale}.name"), site_posts_path(@site, locale: locale), - class: "mr-2 mt-2 mb-2#{locale == @locale ? 'active font-weight-bold' : ''}" + - unless @site.locales.length == 1 + .locales + - @site.locales.each do |locale| + = link_to t("locales.#{locale}.name"), site_posts_path(@site, locale: locale), + class: "mr-2 mt-2 mb-2#{locale == @locale ? 'active font-weight-bold' : ''}" %table.table.table-condensed.table-draggable %tbody - dir = t("locales.#{@locale}.dir")