From 79f44d46005f67cff516eb152a2247dda474d6fe Mon Sep 17 00:00:00 2001 From: jcwimer Date: Tue, 24 Mar 2015 21:06:09 +0000 Subject: [PATCH] Updated bracket views for all pool bracket types --- app/controllers/static_pages_controller.rb | 1 + app/views/static_pages/_fourPool.html.erb | 7 +- .../_fourPoolQuarterBracket.html.erb | 201 ++++++++++++++++++ .../_fourPoolSemiBracket.html.erb | 192 +++++++++++++++++ app/views/static_pages/_twoPool.html.erb | 7 +- .../_twoPoolFinalBracket.html.erb | 109 ++++++++++ .../static_pages/_twoPoolSemiBracket.html.erb | 123 +++++++++++ 7 files changed, 638 insertions(+), 2 deletions(-) create mode 100644 app/views/static_pages/_fourPoolQuarterBracket.html.erb create mode 100644 app/views/static_pages/_fourPoolSemiBracket.html.erb create mode 100644 app/views/static_pages/_twoPoolFinalBracket.html.erb create mode 100644 app/views/static_pages/_twoPoolSemiBracket.html.erb diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index 7a99334..938d21c 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -36,6 +36,7 @@ class StaticPagesController < ApplicationController if params[:weight] @weight = Weight.find(params[:weight]) + @bracketType = @weight.pool_bracket_type @tournament = Tournament.find(@weight.tournament_id) @matches = @tournament.upcomingMatches.select{|m| m.weight_id == @weight.id} @wrestlers = Wrestler.where(weight_id: @weight.id) diff --git a/app/views/static_pages/_fourPool.html.erb b/app/views/static_pages/_fourPool.html.erb index 5e9ff68..4516065 100644 --- a/app/views/static_pages/_fourPool.html.erb +++ b/app/views/static_pages/_fourPool.html.erb @@ -92,4 +92,9 @@

-<%= render 'fourPoolBracket' %> \ No newline at end of file +<% if @bracketType == "fourPoolsToQuarter" %> +<%= render 'fourPoolQuarterBracket' %> +<% end %> +<% if @bracketType == "fourPoolsToSemi" %> +<%= render 'fourPoolSemiBracket' %> +<% end %> \ No newline at end of file diff --git a/app/views/static_pages/_fourPoolQuarterBracket.html.erb b/app/views/static_pages/_fourPoolQuarterBracket.html.erb new file mode 100644 index 0000000..8ef185b --- /dev/null +++ b/app/views/static_pages/_fourPoolQuarterBracket.html.erb @@ -0,0 +1,201 @@ + + + +
Championship Bracket After Pool
+
+ + + + +
+
+
3rd/4th
+
+ + +
+
+
Consolation Bracket After Pool
+
+ + + +
+
+
7th/8th
+
+ + +
+
+ + + + diff --git a/app/views/static_pages/_fourPoolSemiBracket.html.erb b/app/views/static_pages/_fourPoolSemiBracket.html.erb new file mode 100644 index 0000000..6b25baf --- /dev/null +++ b/app/views/static_pages/_fourPoolSemiBracket.html.erb @@ -0,0 +1,192 @@ + + + +
Championship Bracket After Pool
+
+ + + +
+
+ +
3rd/4th
+
+ + +
+
+ + +
Consolation Bracket After Pool
+
+ + + +
+
+
7th/8th
+
+ + +
+
+ + + + diff --git a/app/views/static_pages/_twoPool.html.erb b/app/views/static_pages/_twoPool.html.erb index 94742e6..c0bcb2d 100644 --- a/app/views/static_pages/_twoPool.html.erb +++ b/app/views/static_pages/_twoPool.html.erb @@ -50,4 +50,9 @@ -<%= render 'twoPoolBracket' %> \ No newline at end of file +<% if @bracketType == "twoPoolsToFinal" %> +<%= render 'twoPoolFinalBracket' %> +<% end %> +<% if @bracketType == "twoPoolsToSemi" %> +<%= render 'twoPoolSemiBracket' %> +<% end %> diff --git a/app/views/static_pages/_twoPoolFinalBracket.html.erb b/app/views/static_pages/_twoPoolFinalBracket.html.erb new file mode 100644 index 0000000..6604bf4 --- /dev/null +++ b/app/views/static_pages/_twoPoolFinalBracket.html.erb @@ -0,0 +1,109 @@ + + +
+
Championship Match
+
+ + +
+ +
3rd/4th
+
+ + +
+ diff --git a/app/views/static_pages/_twoPoolSemiBracket.html.erb b/app/views/static_pages/_twoPoolSemiBracket.html.erb new file mode 100644 index 0000000..cee3580 --- /dev/null +++ b/app/views/static_pages/_twoPoolSemiBracket.html.erb @@ -0,0 +1,123 @@ + + +
+
Championship Bracket After Pool
+
+ + + +
+
+ +
3rd/4th
+
+ + +
\ No newline at end of file