Removing extracted map-mash subtree
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
<title>MashTournaments: <%= controller.action_name %></title>
|
||||
<%= stylesheet_link_tag 'scaffold' %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p style="color: green"><%= flash[:notice] %></p>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
<title>Map Mash</title>
|
||||
<%= stylesheet_link_tag 'styles' %>
|
||||
<%= stylesheet_link_tag 'scaffold' %>
|
||||
<%= javascript_include_tag 'jquery.min' %>
|
||||
<%= yield :head_js %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p style="color: green"><%= flash[:notice] %></p>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,16 +0,0 @@
|
||||
<h1>Editing map</h1>
|
||||
|
||||
<% form_for(@map) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name %><br />
|
||||
<%= f.text_field :name %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Update' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Show', @map %> |
|
||||
<%= link_to 'Back', maps_path %>
|
@@ -1,20 +0,0 @@
|
||||
<h1>Listing maps</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
|
||||
<% @maps.each do |map| %>
|
||||
<tr>
|
||||
<td><%=h map.name %></td>
|
||||
<td><%= link_to 'Show', map %></td>
|
||||
<td><%= link_to 'Edit', edit_map_path(map) %></td>
|
||||
<td><%= link_to 'Destroy', map, :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New map', new_map_path %>
|
@@ -1,15 +0,0 @@
|
||||
<h1>New map</h1>
|
||||
|
||||
<% form_for(@map) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name %><br />
|
||||
<%= f.text_field :name %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Create' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Back', maps_path %>
|
@@ -1,8 +0,0 @@
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%=h @map.name %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_map_path(@map) %> |
|
||||
<%= link_to 'Back', maps_path %>
|
@@ -1,12 +0,0 @@
|
||||
<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 %>
|
@@ -1,18 +0,0 @@
|
||||
<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 %>
|
@@ -1,9 +0,0 @@
|
||||
%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'
|
@@ -1,15 +0,0 @@
|
||||
%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'
|
@@ -1,22 +0,0 @@
|
||||
- content_for :head_js do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('.mash-image').click(function(elem) {
|
||||
$('#mash_winner_id').val($(elem.target).attr('data-map-id'));
|
||||
$('form[id^="edit_mash_"]').submit();
|
||||
});
|
||||
});
|
||||
|
||||
%h1 Mash the Maps!
|
||||
%p Choose your fave.
|
||||
|
||||
- form_for(@mash) do |f|
|
||||
= f.error_messages
|
||||
|
||||
#maps
|
||||
#map_a.mash-image
|
||||
%image{:src => "#{url_for @mash.map_a}.png", :'data-map-id' => @mash.map_a.id}
|
||||
#map_b.mash-image
|
||||
%image{:src => "#{url_for @mash.map_b}.png", :'data-map-id' => @mash.map_b.id}
|
||||
|
||||
= f.hidden_field :winner_id, :value => '?'
|
Reference in New Issue
Block a user