From 87093b08b700e31e76b76bef38e926f636752b62 Mon Sep 17 00:00:00 2001 From: Semyon Pupkov Date: Thu, 10 Aug 2017 23:48:21 +0500 Subject: [PATCH] Show bottom proposals button only if proposals exists --- app/views/proposals/index.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index e1c04c607..40cce19c1 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -61,9 +61,11 @@ <%= render 'shared/order_links', i18n_namespace: "proposals.index" %> -
- <%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button expanded' %> -
+ <% if @proposals.any? %> +
+ <%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button expanded' %> +
+ <% end %>
<%= render partial: 'proposals/proposal', collection: @proposals %>