mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-19 14:00:27 +00:00
Swap wrestlers moved from edit wrestler to the bracket page
This commit is contained in:
@@ -27,4 +27,21 @@
|
||||
<% if @weight.wrestlers.size <= 6 && @weight.allPoolMatchesFinished(1) %>
|
||||
<%= render 'onePoolResults' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if can? :manage, @tournament %>
|
||||
<br><br>
|
||||
<h3>Swap Bracket Position</h3>
|
||||
<%= form_for(Wrestler.new, url: swap_wrestlers_path(@tournament)) do |f| %>
|
||||
<div class="field">
|
||||
<%= f.label 'Wrestler 1' %><br>
|
||||
<%= f.collection_select :originalId, @weight.wrestlers, :id, :name %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label 'Wrestler 2' %><br>
|
||||
<%= f.collection_select :swapId, @weight.wrestlers, :id, :name %>
|
||||
</div>
|
||||
<br>
|
||||
<%= submit_tag "Swap", :class=>"btn btn-success"%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user