From cbf1bf90f5dab50bdad52b7105a712d461aa6f81 Mon Sep 17 00:00:00 2001 From: Larissa Reis Date: Thu, 29 Oct 2015 11:00:35 -0300 Subject: [PATCH] link block: shows default message for new blocks with no links --- app/views/blocks/link_list.html.erb | 2 ++ test/unit/link_list_block_test.rb | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/app/views/blocks/link_list.html.erb b/app/views/blocks/link_list.html.erb index f5ea223..5c7dc29 100644 --- a/app/views/blocks/link_list.html.erb +++ b/app/views/blocks/link_list.html.erb @@ -1,5 +1,7 @@ <%= block_title(block.title) %> +<%= block.links.empty? && block.title.empty? ? content_tag('em', _('Please, edit this block to add links')) : '' %> +