summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2018-03-29 16:00:30 +0200
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2018-03-29 16:06:33 +0200
commit0886c741755dd9ae390aefb9062a139f38b11aa1 (patch)
tree44f7e0e8598ce09fcffb11d92d4b5df52496f034
parente5f03eaa54e3f9db7ff0980e8b3bb90e7270f9b5 (diff)
downloadecs-0886c741755dd9ae390aefb9062a139f38b11aa1.tar.gz
ecs-0886c741755dd9ae390aefb9062a139f38b11aa1.zip
Delete anonymous link when its count is zero.
-rw-r--r--app/views/admin/participants/list.html.haml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/admin/participants/list.html.haml b/app/views/admin/participants/list.html.haml
index 01d4c5b..32a3aaf 100644
--- a/app/views/admin/participants/list.html.haml
+++ b/app/views/admin/participants/list.html.haml
@@ -20,10 +20,11 @@
%h1.box1 Listing Participants (#{@list_participants_count.to_s})
.text-link= link_to 'New participant', new_admin_participant_path
-- if @list_anonymous
- .text-link= link_to "Hide anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "false")
-- else
- .text-link= link_to "Show anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "true")
+- if @list_participants_anonymous_count > 0
+ - if @list_anonymous
+ .text-link= link_to "Hide anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "false")
+ - else
+ .text-link= link_to "Show anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "true")
%p
%table.list