1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Blocking buttons with Devise Authentication and cleaning up views

This commit is contained in:
Jacob Cody Wimer
2014-01-22 08:38:55 -05:00
parent 382e1a0c05
commit 8797381b6c
9 changed files with 13 additions and 23 deletions

View File

@@ -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 {
color: #f00;
ul {

View File

@@ -17,7 +17,8 @@ class SchoolsController < ApplicationController
def new
@school = School.new
if params[:tournament]
@tournament = params[:tournament]
@tournament_field = params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
end

View File

@@ -16,7 +16,8 @@ class WrestlersController < ApplicationController
def new
@wrestler = Wrestler.new
if params[:school]
@school = params[:school]
@school_field = params[:school]
@school = School.find(params[:school])
end
end

View File

@@ -10,7 +10,6 @@
<li><%= link_to "Bout Board" , '#' %></li>
<% end %>
<% if user_signed_in? %>
<li><%= link_to "Admin" , '/admin/index' %></li>
<li><%= link_to "Log Out", destroy_user_session_path, method: :delete %></li>
<% else %>
<li><%= link_to "Log In" , new_user_session_path %></li>

View File

@@ -23,7 +23,7 @@
<% if @school %>
<%= f.hidden_field :tournament_id, :value => @tournament %>
<%= f.hidden_field :tournament_id, :value => @tournament_field %>
<% else %>
<div class="field">
<%= f.label 'Tournament' %><br>

View File

@@ -2,4 +2,4 @@
<%= render 'form' %>
<%= link_to 'Back', schools_path %>
<%= link_to 'Back', "/tournaments/#{@tournament.id}" %>

View File

@@ -1,5 +1,7 @@
<h1>Pick A Tournament</h1>
<% if user_signed_in? %>
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn" %>
<% end %>
</br>
</br>
<table class="table table-striped table-bordered">

View File

@@ -17,7 +17,7 @@
</div>
<% if @school %>
<%= f.hidden_field :school_id, :value => @school %>
<%= f.hidden_field :school_id, :value => @school_field %>
<% else %>
<div class="field">
<%= f.label 'School' %><br>

View File

@@ -2,4 +2,4 @@
<%= render 'form' %>
<%= link_to 'Back', wrestlers_path %>
<%= link_to 'Back', "/schools/#{@school.id}" %>