mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-14 17:06:46 +00:00
Blocking buttons with Devise Authentication and cleaning up views
This commit is contained in:
@@ -123,19 +123,6 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* forms */
|
|
||||||
|
|
||||||
input, textarea, select, .uneditable-input {
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
@include box_sizing;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
height: auto !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#error_explanation {
|
#error_explanation {
|
||||||
color: #f00;
|
color: #f00;
|
||||||
ul {
|
ul {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ class SchoolsController < ApplicationController
|
|||||||
def new
|
def new
|
||||||
@school = School.new
|
@school = School.new
|
||||||
if params[:tournament]
|
if params[:tournament]
|
||||||
@tournament = params[:tournament]
|
@tournament_field = params[:tournament]
|
||||||
|
@tournament = Tournament.find(params[:tournament])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ class WrestlersController < ApplicationController
|
|||||||
def new
|
def new
|
||||||
@wrestler = Wrestler.new
|
@wrestler = Wrestler.new
|
||||||
if params[:school]
|
if params[:school]
|
||||||
@school = params[:school]
|
@school_field = params[:school]
|
||||||
|
@school = School.find(params[:school])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,10 @@
|
|||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
<li><%= link_to "Home", root_path %></li>
|
<li><%= link_to "Home", root_path %></li>
|
||||||
<% if @tournament %>
|
<% if @tournament %>
|
||||||
<li><%= link_to "Brackets" , '#' %></li>
|
<li><%= link_to "Brackets" , '#' %></li>
|
||||||
<li><%= link_to "Bout Board" , '#' %></li>
|
<li><%= link_to "Bout Board" , '#' %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<li><%= link_to "Admin" , '/admin/index' %></li>
|
|
||||||
<li><%= link_to "Log Out", destroy_user_session_path, method: :delete %></li>
|
<li><%= link_to "Log Out", destroy_user_session_path, method: :delete %></li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li><%= link_to "Log In" , new_user_session_path %></li>
|
<li><%= link_to "Log In" , new_user_session_path %></li>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<% if @school %>
|
<% if @school %>
|
||||||
<%= f.hidden_field :tournament_id, :value => @tournament %>
|
<%= f.hidden_field :tournament_id, :value => @tournament_field %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<%= f.label 'Tournament' %><br>
|
<%= f.label 'Tournament' %><br>
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
<%= render 'form' %>
|
<%= render 'form' %>
|
||||||
|
|
||||||
<%= link_to 'Back', schools_path %>
|
<%= link_to 'Back', "/tournaments/#{@tournament.id}" %>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<h1>Pick A Tournament</h1>
|
<h1>Pick A Tournament</h1>
|
||||||
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn" %>
|
<% if user_signed_in? %>
|
||||||
|
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn" %>
|
||||||
|
<% end %>
|
||||||
</br>
|
</br>
|
||||||
</br>
|
</br>
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @school %>
|
<% if @school %>
|
||||||
<%= f.hidden_field :school_id, :value => @school %>
|
<%= f.hidden_field :school_id, :value => @school_field %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<%= f.label 'School' %><br>
|
<%= f.label 'School' %><br>
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
<%= render 'form' %>
|
<%= render 'form' %>
|
||||||
|
|
||||||
<%= link_to 'Back', wrestlers_path %>
|
<%= link_to 'Back', "/schools/#{@school.id}" %>
|
||||||
|
|||||||
Reference in New Issue
Block a user