All <%= @tournament.name %> matches

<% matches_path = "/tournaments/#{@tournament.id}/matches" %> <%= form_tag(matches_path, method: :get, id: "search-form") do %> <%= text_field_tag :search, params[:search], placeholder: "Search wrestler, school, or bout #" %> <%= submit_tag "Search" %> <% end %>

Search by wrestler name, school name, or bout number.


<% @matches.each do |match| %> <% end %>
Bout number Bracket Position Matchup Finished?
<%= match.bout_number %> <%= match.bracket_position %> <%= match.w1_bracket_name.html_safe %> vs <%= match.w2_bracket_name.html_safe %> <%= match.finished %> <%= link_to 'Show', match, :class=>"btn btn-default btn-sm" %> <%= link_to 'Edit Wrestlers', edit_match_path(match), :class=>"btn btn-primary btn-sm" %> <%= link_to 'Edit Mat/Queue', edit_assignment_match_path(match), :class=>"btn btn-primary btn-sm" %> <%= link_to 'Stat Match', "/matches/#{match.id}/stat", :class=>"btn btn-primary btn-sm" %>
<% if @total_pages.present? && @total_pages > 1 %>

<% start_index = ((@page - 1) * @per_page) + 1 end_index = [@page * @per_page, @total_count].min %> Showing <%= start_index %> - <%= end_index %> of <%= @total_count %> matches

<% end %>

Total matches without byes: <%= @matches_without_byes_count %>

Unfinished matches: <%= @unfinished_matches_without_byes_count %>