Browse Source

Hide 'next' button if no results

master
Dylan Baker 4 years ago
parent
commit
635fd6d1d4
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      web/views/results.erb

+ 5
- 3
web/views/results.erb View File

53
         </a>
53
         </a>
54
       <% end %>
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
     <% end %>
61
     <% end %>
60
   </div>
62
   </div>
61
 </div>
63
 </div>

Loading…
Cancel
Save