summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomer Kimia <tkimia@purdue.edu>2014-03-06 16:09:22 -0500
committerTomer Kimia <tkimia@purdue.edu>2014-03-06 16:09:22 -0500
commit240d8602fb6aaf249b33db7b0c2f8a72add63658 (patch)
treee985bda04bcb469e38e9abd9bb4548ef032311da
parenta421aace7383bb6718d23eed1bde02659a7a93ff (diff)
tournaments table only shows if tournaments exits
-rw-r--r--app/views/sessions/new.html.erb2
-rw-r--r--app/views/tournaments/index.html.erb9
2 files changed, 7 insertions, 4 deletions
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
index 6439b9f..398cb49 100644
--- a/app/views/sessions/new.html.erb
+++ b/app/views/sessions/new.html.erb
@@ -18,6 +18,6 @@
</p>
<% end %>
- <p>New user? <%= link_to "Sign up now!", new_user_path %></p>
+ <p>New user? <%= link_to("Sign up now!", new_user_path) %></p>
</div>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
index 26d0643..e9147f6 100644
--- a/app/views/tournaments/index.html.erb
+++ b/app/views/tournaments/index.html.erb
@@ -1,6 +1,7 @@
-<h1>Listing tournaments</h1>
+<h1>Listing Tournaments</h1>
-<table>
+<% if @tournaments.length > 0 %>
+<table class="table table-hover">
<thead>
<tr>
<th>Tournament ID</th>
@@ -21,7 +22,9 @@
<% end %>
</tbody>
</table>
-
+<% else %>
+ <p class="no-entries"> No tournaments going on right now... Why not start your own? </p>
+<% end %>
<br>
<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %>