mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-04 13:43:48 +00:00
Upgraded to rails 8.0.2, moved from dalli to solid cache, moved from delayed_job to solid queue, and add solid cable. deploy/rails-dev-run.sh no longer needs to chmod. Fixed finished_at callback for matches. Migrated from Devise to built in rails auth. Added view tests for the bracket page testing that all bout numbers render for all matches in each bracket type.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<p>Welcome <%= @email %>!</p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
|
||||
@@ -1,8 +0,0 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
||||
@@ -1,7 +0,0 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p>
|
||||
@@ -1,16 +0,0 @@
|
||||
<h2>Change your password</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div><%= f.label :password, "New password" %><br />
|
||||
<%= f.password_field :password, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Change my password", :class=>"btn btn-success"%></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,13 +0,0 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
<br>
|
||||
<div><%= f.submit "Send me reset password instructions",:class=>"btn btn-success" %></div>
|
||||
<% end %>
|
||||
<br>
|
||||
<br>
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,29 +0,0 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
||||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
||||
<% end %>
|
||||
|
||||
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
||||
<%= f.password_field :password, :autocomplete => "off" %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
||||
<%= f.password_field :current_password %></div>
|
||||
<br>
|
||||
<div><%= f.submit "Update",:class=>"btn btn-success" %></div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class=>"btn btn-danger" %></p>
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<h2>Sign up</h2>
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Sign up" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,18 +0,0 @@
|
||||
<h2 class="form-signin-heading">Sign in</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email ,:class=>"sr-only"%><br />
|
||||
<%= f.email_field :email, :autofocus => true,:class=>"form-control",:placeholder=>"Email Address" %></div>
|
||||
|
||||
<div><%= f.label :password,:class=>"sr-only" %><br />
|
||||
<%= f.password_field :password,:class=>"form-control",:placeholder=>"Password" %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div class="checkbox"><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
|
||||
<div><%= f.submit "Sign in" ,:class=>"btn btn-lg btn-primary btn-block" %></div>
|
||||
<% end %>
|
||||
<br>
|
||||
<br>
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,25 +0,0 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
@@ -1,12 +0,0 @@
|
||||
<h2>Resend unlock instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.submit "Resend unlock instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -19,13 +19,13 @@
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= current_user.email %>
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%=link_to "Log out", destroy_user_session_url ,:method => 'delete' %></li>
|
||||
<li><%=link_to "Edit user", edit_user_registration_path %></li>
|
||||
<li><%=link_to "My tournaments and schools","/static_pages/my_tournaments" %></li>
|
||||
<li><%= link_to "Log out", logout_path, method: :delete %></li>
|
||||
<li><%= link_to "Edit profile", edit_user_path(current_user) %></li>
|
||||
<li><%= link_to "My tournaments and schools", "/static_pages/my_tournaments" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li><%= link_to "Log In" , new_user_session_path %></li>
|
||||
<li><%= link_to "Log In", login_path %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
|
||||
34
app/views/password_resets/edit.html.erb
Normal file
34
app/views/password_resets/edit.html.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
<h1>Reset password</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<%= form_with(model: @user, url: password_reset_path(params[:id]), local: true) do |f| %>
|
||||
<% if @user.errors.any? %>
|
||||
<div class="error_explanation">
|
||||
<div class="alert alert-danger">
|
||||
The form contains <%= pluralize(@user.errors.count, "error") %>.
|
||||
</div>
|
||||
<ul>
|
||||
<% @user.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= hidden_field_tag :email, @user.email %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password_confirmation, "Confirmation" %>
|
||||
<%= f.password_field :password_confirmation, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<%= f.submit "Update password", class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
14
app/views/password_resets/new.html.erb
Normal file
14
app/views/password_resets/new.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<h1>Forgot password</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<%= form_with(url: password_resets_path, scope: :password_reset, local: true) do |f| %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<%= f.submit "Submit", class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
21
app/views/sessions/new.html.erb
Normal file
21
app/views/sessions/new.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<h1>Log in</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<%= form_with(url: login_path, scope: :session, local: true) do |f| %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<%= f.submit "Log in", class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
|
||||
<p>New user? <%= link_to "Sign up now!", signup_path %></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,14 @@
|
||||
<h3>
|
||||
Info
|
||||
</h3>
|
||||
|
||||
<% if (can? :manage, @tournament) && @tournament.curently_generating_matches == 1 %>
|
||||
<div class="alert alert-info">
|
||||
<strong>Match Generation In Progress</strong>
|
||||
<p>Tournament bracket generation is currently running. Please refresh the page to check progress.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<strong>Address:</strong>
|
||||
<%= @tournament.address %>
|
||||
@@ -118,34 +126,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
<% if can? :manage, @tournament %>
|
||||
<br><br>
|
||||
<h3>Background Jobs</h3>
|
||||
<p>This is a list of queued or running background jobs. Match generation, bracket advancement, team score calculation, etc.</p>
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name of Job</th>
|
||||
<th>Job Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @tournament.deferred_jobs.each do |job| %>
|
||||
<tr>
|
||||
<td><%= job.job_owner_type %></td>
|
||||
<td>
|
||||
<% if job.locked_at %>
|
||||
Running
|
||||
<% elsif job.last_error %>
|
||||
Error
|
||||
<% elsif job.attempts == 0 and !job.locked_at %>
|
||||
Pending
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
<br><br>
|
||||
|
||||
12
app/views/user_mailer/password_reset.html.erb
Normal file
12
app/views/user_mailer/password_reset.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<h1>Password reset</h1>
|
||||
|
||||
<p>To reset your password click the link below:</p>
|
||||
|
||||
<%= link_to "Reset password", edit_password_reset_url(@user.reset_token, email: @user.email) %>
|
||||
|
||||
<p>This link will expire in two hours.</p>
|
||||
|
||||
<p>
|
||||
If you did not request your password to be reset, please ignore this email and
|
||||
your password will stay as it is.
|
||||
</p>
|
||||
8
app/views/user_mailer/password_reset.text.erb
Normal file
8
app/views/user_mailer/password_reset.text.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
To reset your password click the link below:
|
||||
|
||||
<%= edit_password_reset_url(@user.reset_token, email: @user.email) %>
|
||||
|
||||
This link will expire in two hours.
|
||||
|
||||
If you did not request your password to be reset, please ignore this email and
|
||||
your password will stay as it is.
|
||||
38
app/views/users/edit.html.erb
Normal file
38
app/views/users/edit.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<h1>Edit profile</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<%= form_with(model: @user, local: true) do |f| %>
|
||||
<% if @user.errors.any? %>
|
||||
<div class="error_explanation">
|
||||
<div class="alert alert-danger">
|
||||
The form contains <%= pluralize(@user.errors.count, "error") %>.
|
||||
</div>
|
||||
<ul>
|
||||
<% @user.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, class: 'form-control' %>
|
||||
<small class="text-muted">Leave blank if you don't want to change it</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password_confirmation, "Confirmation" %>
|
||||
<%= f.password_field :password_confirmation, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<%= f.submit "Save changes", class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
39
app/views/users/new.html.erb
Normal file
39
app/views/users/new.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<h1>Sign up</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<%= form_with(model: @user, url: signup_path, local: true) do |f| %>
|
||||
<% if @user.errors.any? %>
|
||||
<div class="error_explanation">
|
||||
<div class="alert alert-danger">
|
||||
The form contains <%= pluralize(@user.errors.count, "error") %>.
|
||||
</div>
|
||||
<ul>
|
||||
<% @user.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password_confirmation, "Confirmation" %>
|
||||
<%= f.password_field :password_confirmation, class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<%= f.submit "Create account", class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
|
||||
<p>Already have an account? <%= link_to "Log in", login_path %></p>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user