From 072f5ba0e881a825c231105df6f4cc4a93d3cd8c Mon Sep 17 00:00:00 2001 From: Ankit Singla Date: Thu, 1 Feb 2018 19:20:12 +0530 Subject: [PATCH] improved show more/less on wiki pages --- app/views/grids/_notes.html.erb | 44 ++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/app/views/grids/_notes.html.erb b/app/views/grids/_notes.html.erb index a5126f11fd..74cd6ccb5c 100644 --- a/app/views/grids/_notes.html.erb +++ b/app/views/grids/_notes.html.erb @@ -54,7 +54,7 @@ <% if index == 9 %> - Show <%= nodes.length - 10 %> more + Show <%= (nodes.length - 10) == 0 ? "" : (nodes.length - 10) %> more @@ -73,15 +73,37 @@ <% end %>