diff options
author | sadbeast <sadbeast@sadbeast.com> | 2024-01-31 17:47:56 -0800 |
---|---|---|
committer | sadbeast <sadbeast@sadbeast.com> | 2024-01-31 17:47:56 -0800 |
commit | 332ec93366315fa1ed7b4acd7a3407c96e8ddfa7 (patch) | |
tree | 6ae553317f12a7a6a29c849c8805ffab96436dc2 /app/views/leagues | |
download | td-main.tar.gz td-main.tar.bz2 |
Diffstat (limited to 'app/views/leagues')
-rw-r--r-- | app/views/leagues/index.html.erb | 3 | ||||
-rw-r--r-- | app/views/leagues/show.html.erb | 33 |
2 files changed, 36 insertions, 0 deletions
diff --git a/app/views/leagues/index.html.erb b/app/views/leagues/index.html.erb new file mode 100644 index 0000000..bcfa1fd --- /dev/null +++ b/app/views/leagues/index.html.erb @@ -0,0 +1,3 @@ +<% @leagues.each do |league| %> + <p><%= link_to league.name, league_path(league) %></p> +<% end %> diff --git a/app/views/leagues/show.html.erb b/app/views/leagues/show.html.erb new file mode 100644 index 0000000..d7a43d3 --- /dev/null +++ b/app/views/leagues/show.html.erb @@ -0,0 +1,33 @@ +<div class="grid"> +<% @player_scores.each do |score| %> + <div><strong><%= score.player %> - <%= score.score %></strong></div> +<% end %> +</div> +<table role="grid"> + <thead> + <tr> + <th scope="col"><%= sort_link(@q, :team) %></th> + <th scope="col"><%= sort_link(@q, :player) %></th> + <th scope="col" style="width: 11em"><%= sort_link(@q, :total) %></th> + </tr> + </thead> + <tbody> + <% @scores.each do |score| %> + <tr> + <td scope="row"><%= score.team %></td> + <td><%= score.player %></td> + <td> + <%= score.total %> + <p> + <small><strong><abbr title="Wins">W</abbr>:</strong> <%= score.win %></small> + <% if score.playoffs > 0 %><small><strong><abbr title="Made the Playoffs">P</abbr>:</strong> <%= score.playoffs %></small><% end %> + <% if score.divisional > 0 %><small><strong><abbr title="Made the Divisional Round">D</abbr>:</strong> <%= score.divisional %></small><% end %> + <% if score.conference > 0 %><small><strong><abbr title="Made the Conference Championship">C</abbr>:</strong> <%= score.conference %></small><% end %> + <% if score.superbowl > 0 %><small><strong><abbr title="Made the Superbowl">S</abbr>:</strong> <%= score.superbowl %></small><% end %> + <% if score.champion > 0 %><small><strong><abbr title="Superbowl Winner">SW</abbr>:</strong> <%= score.champion %></small><% end %> + </p> + </td> + </tr> + <% end %> + </tbody> +</table> |