Re-namespacing a bit to clear out some fairly old stuff from the top level
This commit is contained in:
12
oldstuff/map-mash/app/views/mash_tournaments/edit.html.erb
Normal file
12
oldstuff/map-mash/app/views/mash_tournaments/edit.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<h1>Editing mash_tournament</h1>
|
||||
|
||||
<% form_for(@mash_tournament) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.submit 'Update' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Show', @mash_tournament %> |
|
||||
<%= link_to 'Back', mash_tournaments_path %>
|
18
oldstuff/map-mash/app/views/mash_tournaments/index.html.erb
Normal file
18
oldstuff/map-mash/app/views/mash_tournaments/index.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<h1>Listing mash_tournaments</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
</tr>
|
||||
|
||||
<% @mash_tournaments.each do |mash_tournament| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', mash_tournament %></td>
|
||||
<td><%= link_to 'Edit', edit_mash_tournament_path(mash_tournament) %></td>
|
||||
<td><%= link_to 'Destroy', mash_tournament, :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New mash_tournament', new_mash_tournament_path %>
|
@@ -0,0 +1,9 @@
|
||||
%h1 New Map Mash tournament!
|
||||
|
||||
- form_for(@mash_tournament) do |f|
|
||||
= f.error_messages
|
||||
|
||||
= f.label(:total_rounds)
|
||||
= f.select(:total_rounds, total_rounds_options_for_select)
|
||||
%p
|
||||
= f.submit 'Start'
|
15
oldstuff/map-mash/app/views/mash_tournaments/show.html.haml
Normal file
15
oldstuff/map-mash/app/views/mash_tournaments/show.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
%h1
|
||||
Tournament #{@mash_tournament.id} Complete! You chose
|
||||
%em #{@mash_tournament.rounds.reverse.first.mashes.first.winner.name}!
|
||||
|
||||
- @mash_tournament.rounds.reverse.each do |round|
|
||||
%h2 Round #{round.number}
|
||||
- round.mashes.each do |mash|
|
||||
%ul
|
||||
- if mash.map_a.present? && mash.map_b.present? && mash.winner.present?
|
||||
%li
|
||||
#{mash.map_a.name} vs. #{mash.map_b.name}, winner =
|
||||
%strong #{mash.winner.name}
|
||||
|
||||
|
||||
= link_to 'New!', :controller => 'mash_tournaments', :action => 'new'
|
Reference in New Issue
Block a user