1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-14 17:06:46 +00:00

Added shell views and routes to swap wrestlers bracket positions

Still need to set permssions on swap controller method
This commit is contained in:
2016-01-25 12:53:32 +00:00
parent 0275b48499
commit 75efa73777
4 changed files with 27 additions and 3 deletions

View File

@@ -53,4 +53,19 @@
</div>
<% end %>
<% if can? :manage, @wrestler.tournament %>
<br><br>
<h3>Swap Bracket Position</h3>
<%= form_for @wrestler, :url => url_for(:controller => 'wrestlers', :action => 'swap', :method => "post") do |f| %>
<div class="field">
<%= f.label 'Swap With' %><br>
<%= f.collection_select :swapId, @wrestler.weight.wrestlers, :id, :name %>
</div>
<br>
<%= submit_tag "Swap", :class=>"btn btn-success"%>
<% end %>
<% end %>