mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
git init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<%- 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' %>
|
||||
<%= 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 -%>
|
||||
@@ -0,0 +1,12 @@
|
||||
<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 %></div>
|
||||
|
||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "links" %>
|
||||
@@ -0,0 +1,5 @@
|
||||
<p>Welcome <%= @resource.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 => @resource.confirmation_token) %></p>
|
||||
@@ -0,0 +1,8 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_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>
|
||||
@@ -0,0 +1,7 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive amount 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 => @resource.unlock_token) %></p>
|
||||
@@ -0,0 +1,16 @@
|
||||
<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 %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Change my password" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "links" %>
|
||||
@@ -0,0 +1,12 @@
|
||||
<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 %></div>
|
||||
|
||||
<div><%= f.submit "Send me reset password instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "links" %>
|
||||
@@ -0,0 +1,25 @@
|
||||
<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 %></div>
|
||||
|
||||
<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>
|
||||
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
||||
@@ -0,0 +1,29 @@
|
||||
%h2 Sign up
|
||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
|
||||
= devise_error_messages!
|
||||
%div
|
||||
= f.label :first_name
|
||||
%br/
|
||||
= f.text_field :first_name
|
||||
%div
|
||||
= f.label :last_name
|
||||
%br/
|
||||
= f.text_field :last_name
|
||||
%div
|
||||
= f.label :nickname
|
||||
%br/
|
||||
= f.text_field :nickname
|
||||
%div
|
||||
= f.label :email
|
||||
%br/
|
||||
= f.email_field :email
|
||||
%div
|
||||
= f.label :password
|
||||
%br/
|
||||
= f.password_field :password
|
||||
%div
|
||||
= f.label :password_confirmation
|
||||
%br/
|
||||
= f.password_field :password_confirmation
|
||||
%div= f.submit "Sign up"
|
||||
= render "links"
|
||||
@@ -0,0 +1,28 @@
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
|
||||
<div><%= f.submit "Sign in" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "links" %>
|
||||
|
||||
<% if Rails.env.development? %>
|
||||
<% User.all.each do |user| %>
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<%= f.hidden_field :email, :value => user.email %></div>
|
||||
<%= f.hidden_field :password, :value => 'password' %></div>
|
||||
<div><%= f.submit "Sign in as #{user.email}" %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<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 %></div>
|
||||
|
||||
<div><%= f.submit "Resend unlock instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "links" %>
|
||||
@@ -0,0 +1,49 @@
|
||||
!!! 5
|
||||
%html{:lang => "en"}
|
||||
%head
|
||||
%meta{:charset => "utf-8"}/
|
||||
%title= content_for?(:title) ? yield(:title) : "Mash"
|
||||
= csrf_meta_tags
|
||||
/[if lt IE 9]
|
||||
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
||||
:css
|
||||
body {
|
||||
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
||||
}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
|
||||
%body
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container
|
||||
= link_to 'Mash', root_path, :class => 'brand'
|
||||
.container.nav-collapse
|
||||
%ul.nav
|
||||
%li= link_to "Home", root_path
|
||||
%ul.nav.pull-right
|
||||
- if user_signed_in?
|
||||
%li#logged_in_as
|
||||
= link_to "Hello #{current_user.first_name} #{current_user.last_name}", edit_user_registration_path
|
||||
%li#logout
|
||||
= link_to 'Logout', destroy_user_session_path, :method => :delete
|
||||
- else
|
||||
%li#login
|
||||
= link_to 'Login', new_user_session_path
|
||||
%li#register
|
||||
= link_to 'Register', new_user_registration_path
|
||||
|
||||
.container
|
||||
|
||||
.content
|
||||
- if flash[:notice]
|
||||
%p{:class => 'notice'}= flash[:notice]
|
||||
- if flash[:alert]
|
||||
%p{:class => 'alert'}= flash[:alert]
|
||||
.row
|
||||
.span13
|
||||
= yield
|
||||
|
||||
%footer
|
||||
%p © Rails App Template 2012
|
||||
|
||||
= javascript_include_tag "application"
|
||||
@@ -0,0 +1 @@
|
||||
Do the monster mash!
|
||||
@@ -0,0 +1,9 @@
|
||||
%p
|
||||
= link_to 'Create a Team', new_team_path, :class => 'btn btn-large btn-primary'
|
||||
|
||||
.teams
|
||||
- teams.each do |team|
|
||||
%h3.team= link_to team, team
|
||||
|
||||
= will_paginate teams
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
= form_for team, :html => { :class => 'form-horizontal' } do |f|
|
||||
.control-group{:class => team.errors[:name].present? ? 'error' : ''}
|
||||
= f.label :name, 'Name', :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :name
|
||||
- if team.errors[:name].present?
|
||||
.help-inline= team.errors[:name].join(', ')
|
||||
.control-group{:class => team.errors[:max_members].present? ? 'error' : ''}
|
||||
= f.label :max_members, 'Max members', :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :max_members
|
||||
- if team.errors[:max_members].present?
|
||||
.help-inline= team.errors[:max_members].join(', ')
|
||||
.control-group{:class => team.errors[:private_team].present? ? 'error' : ''}
|
||||
= f.label :private_team, 'Private team?', :class => 'control-label'
|
||||
.controls
|
||||
= f.check_box :private_team
|
||||
- if team.errors[:private_team].present?
|
||||
.help-inline= team.errors[:private_team].join(', ')
|
||||
.form-actions
|
||||
= f.submit 'Create Team', :class => 'btn btn-primary'
|
||||
@@ -0,0 +1,11 @@
|
||||
%h3= team
|
||||
|
||||
%ul.members
|
||||
%li= team.captain
|
||||
- team.members.each do |member|
|
||||
%li= member
|
||||
|
||||
- unless current_user.is_a_member_of?(team)
|
||||
= form_tag join_team_path(team) do
|
||||
= submit_tag 'Join team', :class => 'btn'
|
||||
|
||||
Reference in New Issue
Block a user