Ver código fonte

Hide 'next' button if no results

master
Dylan Baker 4 anos atrás
pai
commit
635fd6d1d4
1 arquivos alterados com 5 adições e 3 exclusões
  1. 5
    3
      web/views/results.erb

+ 5
- 3
web/views/results.erb Ver arquivo

@@ -53,9 +53,11 @@
53 53
         </a>
54 54
       <% end %>
55 55
 
56
-      <a class="btn btn--small btn--next" href="<%= next_url %>">
57
-        next page
58
-      </a>
56
+      <% unless results.empty? %>
57
+        <a class="btn btn--small btn--next" href="<%= next_url %>">
58
+          next page
59
+        </a>
60
+      <% end %>
59 61
     <% end %>
60 62
   </div>
61 63
 </div>

Carregando…
Cancelar
Salvar