-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rails_apps_composer: navigation links
- Loading branch information
Dan Mitchell
committed
Mar 11, 2014
1 parent
92e96d1
commit b3db4a6
Showing
6 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="authform"> | ||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :role => 'form'}) do |f| %> | ||
<h3>Forgot your password?</h3> | ||
<p>We'll send password reset instructions.</p> | ||
<%= devise_error_messages! %> | ||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, :autofocus => true, class: 'form-control' %> | ||
</div> | ||
<%= f.submit 'Reset Password', :class => 'button right' %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<div class="authform"> | ||
<h3>Edit <%= resource_name.to_s.humanize %></h3> | ||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :role => 'form'}) do |f| %> | ||
<%= devise_error_messages! %> | ||
<div class="form-group"> | ||
<%= f.label :name %> | ||
<%= f.text_field :name, :autofocus => true, class: 'form-control' %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, class: 'form-control' %> | ||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | ||
<% end %> | ||
</div> | ||
<fieldset> | ||
<p>Leave these fields blank if you don't want to change your password.</p> | ||
<div class="form-group"> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, :autocomplete => 'off', class: 'form-control' %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :password_confirmation %> | ||
<%= f.password_field :password_confirmation, class: 'form-control' %> | ||
</div> | ||
</fieldset> | ||
<fieldset> | ||
<p>You must enter your current password to make changes.</p> | ||
<div class="form-group"> | ||
<%= f.label :current_password %> | ||
<%= f.password_field :current_password, class: 'form-control' %> | ||
</div> | ||
</fieldset> | ||
<%= f.submit 'Update', :class => 'button right' %> | ||
<% end %> | ||
</div> | ||
<div class="authform"> | ||
<h3>Cancel Account</h3> | ||
<p>Unhappy? We'll be sad to see you go.</p> | ||
<%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => 'button right' %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="authform"> | ||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :role => 'form'}) do |f| %> | ||
<h3>Sign up</h3> | ||
<%= devise_error_messages! %> | ||
<div class="form-group"> | ||
<%= f.label :name %> | ||
<%= f.text_field :name, :autofocus => true, class: 'form-control' %> | ||
</div> | ||
<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 %> | ||
<%= f.password_field :password_confirmation, class: 'form-control' %> | ||
</div> | ||
<%= f.submit 'Sign up', :class => 'button right' %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<div class="authform"> | ||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f| %> | ||
<h3>Log in</h3> | ||
<%= devise_error_messages! %> | ||
<div class="form-group"> | ||
<%- if devise_mapping.registerable? %> | ||
<%= link_to 'Sign up', new_registration_path(resource_name), class: 'right' %> | ||
<% end -%> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, :autofocus => true, class: 'form-control' %> | ||
</div> | ||
<div class="form-group"> | ||
<%- if devise_mapping.recoverable? %> | ||
<%= link_to "Forgot password?", new_password_path(resource_name), class: 'right' %> | ||
<% end -%> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, class: 'form-control' %> | ||
</div> | ||
<%= f.submit 'Log in', :class => 'button right' %> | ||
<% if devise_mapping.rememberable? -%> | ||
<div class="checkbox"> | ||
<%= f.check_box :remember_me %> <%= f.label :remember_me %> | ||
</div> | ||
<% end -%> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<%# add navigation links to this file %> | ||
<% if user_signed_in? %> | ||
<li><%= link_to 'Logout', destroy_user_session_path, :method=>'delete' %></li> | ||
<% else %> | ||
<li><%= link_to 'Login', new_user_session_path %></li> | ||
<% end %> | ||
<% if user_signed_in? %> | ||
<li><%= link_to 'Edit account', edit_user_registration_path %></li> | ||
<% else %> | ||
<li><%= link_to 'Sign up', new_user_registration_path %></li> | ||
<% end %> | ||
<% if user_signed_in? %> | ||
<li><%= link_to 'Users', users_path %></li> | ||
<% end %> |