1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-01 11:31:56 +00:00

Entered devise secret key

This commit is contained in:
Jacob Cody Wimer
2014-01-22 09:02:12 -05:00
parent 8797381b6c
commit 44511e8600
35 changed files with 857 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<%= form_for(@tournament) do |f| %>
<% if @tournament.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@tournament.errors.count, "error") %> prohibited this tournament from being saved:</h2>
<ul>
<% @tournament.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :address %><br>
<%= f.text_field :address %>
</div>
<div class="field">
<%= f.label :director %><br>
<%= f.text_field :director %>
</div>
<div class="field">
<%= f.label :director_email %><br>
<%= f.text_field :director_email %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing tournament</h1>
<%= render 'form' %>
<%= link_to 'Show', @tournament %> |
<%= link_to 'Back', tournaments_path %>

View File

@@ -0,0 +1,33 @@
<h1>Listing tournaments</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Director</th>
<th>Director email</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @tournaments.each do |tournament| %>
<tr>
<td><%= tournament.name %></td>
<td><%= tournament.address %></td>
<td><%= tournament.director %></td>
<td><%= tournament.director_email %></td>
<td><%= link_to 'Show', tournament %></td>
<td><%= link_to 'Edit', edit_tournament_path(tournament) %></td>
<td><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Tournament', new_tournament_path %>

View File

@@ -0,0 +1,4 @@
json.array!(@tournaments) do |tournament|
json.extract! tournament, :id, :name, :address, :director, :director_email
json.url tournament_url(tournament, format: :json)
end

View File

@@ -0,0 +1,5 @@
<h1>New tournament</h1>
<%= render 'form' %>
<%= link_to 'Back', tournaments_path %>

View File

@@ -0,0 +1,59 @@
<p id="notice"><%= notice %></p>
<%= link_to 'Edit', edit_tournament_path(@tournament) %> |
<%= link_to 'Back', tournaments_path %>
<h1>
<%= @tournament.name %>
</h1>
<p>
<strong>Address:</strong>
<%= @tournament.address %>
</p>
<p>
<strong>Director:</strong>
<%= @tournament.director %>
</p>
<p>
<strong>Director email:</strong>
<%= @tournament.director_email %>
</p>
<br>
<br>
<% if user_signed_in? %>
<%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}" %>
<% end %>
<br>
<br>
<h3>Schools</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Score</th>
<th></th>
</tr>
</thead>
<tbody>
<% @schools.each do |school| %>
<tr>
<td><%= school.name %></td>
<td><%= school.score %></td>
<td><%= link_to 'Show', school, :class=>"btn" %>
<% if user_signed_in? %>
<%= link_to 'Edit', edit_school_path(school), :class=>"btn" %>
<%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>

View File

@@ -0,0 +1 @@
json.extract! @tournament, :id, :name, :address, :director, :director_email, :created_at, :updated_at