-
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.
- Loading branch information
Francisco de Juan
committed
Jun 5, 2013
1 parent
7615320
commit c26cabd
Showing
21 changed files
with
226 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class CalendarsController < ApplicationController | ||
def show | ||
@users_by_availability = User.by_availability | ||
@weekdays = %w(monday tuesday wednesday thursday friday saturday sunday) | ||
end | ||
end |
4 changes: 2 additions & 2 deletions
4
app/controllers/my_account_controller.rb → app/controllers/my_accounts_controller.rb
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,2 @@ | ||
module CalendarHelper | ||
end |
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,32 @@ | ||
.page-header | ||
%h1 Calendar | ||
|
||
%table.table.table-striped | ||
%thead | ||
%tr | ||
%td | ||
- @weekdays.each do |day| | ||
%th= day | ||
%tbody | ||
- (10..22).each do |hour| | ||
%tr | ||
%th= hour | ||
- @weekdays.each do |day| | ||
%td | ||
- @users_by_availability["#{day}_#{hour}"].each do |user| | ||
%i{:class => "icon-user", :title => user.name} | ||
|
||
- if @users_by_availability["#{day}_#{hour}"].count > 0 | ||
.modal.hide.fade.in{:style => "display: none; ", :id => "#{day}_#{hour}"} | ||
.modal-header | ||
%a.close{"data-dismiss" => "modal"} × | ||
%h3= "#{day} at #{hour}" | ||
.modal-body | ||
%p= @users_by_availability["#{day}_#{hour}"].collect(&:name).to_sentence | ||
.modal-footer | ||
%a.btn.btn-success{:href => "#"} Let's play | ||
%a.btn{"data-dismiss" => "modal", :href => "#"} Close | ||
|
||
|
||
%a{"data-toggle" => "modal", :href => "##{day}_#{hour}"} | ||
%i{:class => "icon-plus"} |
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,9 @@ | ||
%h2 Resend confirmation instructions | ||
= 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= f.submit "Resend confirmation instructions" | ||
= render "devise/shared/links" |
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,4 @@ | ||
%p | ||
Welcome #{@email}! | ||
%p You can confirm your account email through the link below: | ||
%p= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) |
6 changes: 6 additions & 0 deletions
6
app/views/devise/mailer/reset_password_instructions.html.haml
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,6 @@ | ||
%p | ||
Hello #{@resource.email}! | ||
%p Someone has requested a link to change your password. You can do this through the link below. | ||
%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) | ||
%p If you didn't request this, please ignore this email. | ||
%p Your password won't change until you access the link above and create a new one. |
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,5 @@ | ||
%p | ||
Hello #{@resource.email}! | ||
%p Your account has been locked due to an excessive number of unsuccessful sign in attempts. | ||
%p Click the link below to unlock your account: | ||
%p= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) |
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,14 @@ | ||
%h2 Change your password | ||
= 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 | ||
= f.label :password_confirmation, "Confirm new password" | ||
%br/ | ||
= f.password_field :password_confirmation | ||
%div= f.submit "Change my password" | ||
= render "devise/shared/links" |
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,9 @@ | ||
%h2 Forgot your password? | ||
= 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= f.submit "Send me reset password instructions" | ||
= render "devise/shared/links" |
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,30 @@ | ||
%h2 | ||
Edit #{resource_name.to_s.humanize} | ||
= 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 | ||
- if devise_mapping.confirmable? && resource.pending_reconfirmation? | ||
%div | ||
Currently waiting confirmation for: #{resource.unconfirmed_email} | ||
%div | ||
= f.label :password | ||
%i (leave blank if you don't want to change it) | ||
%br/ | ||
= f.password_field :password, :autocomplete => "off" | ||
%div | ||
= f.label :password_confirmation | ||
%br/ | ||
= f.password_field :password_confirmation | ||
%div | ||
= f.label :current_password | ||
%i (we need your current password to confirm your changes) | ||
%br/ | ||
= f.password_field :current_password | ||
%div= f.submit "Update" | ||
%h3 Cancel my account | ||
%p | ||
Unhappy? #{button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete} | ||
= link_to "Back", :back |
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,25 @@ | ||
%h2 Sign up | ||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| | ||
= devise_error_messages! | ||
%div | ||
= f.label :name | ||
%br/ | ||
= f.text_field :name, :autofocus => true | ||
%div | ||
= f.label :phone | ||
%br/ | ||
= f.text_field :phone | ||
%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 "devise/shared/links" |
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,16 @@ | ||
%h2 Sign in | ||
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| | ||
%div | ||
= f.label :email | ||
%br/ | ||
= f.email_field :email, :autofocus => true | ||
%div | ||
= f.label :password | ||
%br/ | ||
= f.password_field :password | ||
- if devise_mapping.rememberable? | ||
%div | ||
= f.check_box :remember_me | ||
= f.label :remember_me | ||
%div= f.submit "Sign in" | ||
= render "devise/shared/links" |
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,19 @@ | ||
- if controller_name != 'sessions' | ||
= link_to "Sign in", new_session_path(resource_name) | ||
%br/ | ||
- if devise_mapping.registerable? && controller_name != 'registrations' | ||
= link_to "Sign up", new_registration_path(resource_name) | ||
%br/ | ||
- if devise_mapping.recoverable? && controller_name != 'passwords' | ||
= link_to "Forgot your password?", new_password_path(resource_name) | ||
%br/ | ||
- if devise_mapping.confirmable? && controller_name != 'confirmations' | ||
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) | ||
%br/ | ||
- 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/ | ||
- 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/ |
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,9 @@ | ||
%h2 Resend unlock instructions | ||
= 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= f.submit "Resend unlock instructions" | ||
= render "devise/shared/links" |
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 |
---|---|---|
|
@@ -12,7 +12,9 @@ | |
%b Email: | ||
= @user.email | ||
|
||
%h2 My week | ||
.page-header | ||
%h2 My week | ||
|
||
.row | ||
.span9 | ||
|
||
|
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,9 @@ | ||
require 'test_helper' | ||
|
||
class CalendarControllerTest < ActionController::TestCase | ||
test "should get show" do | ||
get :show | ||
assert_response :success | ||
end | ||
|
||
end |
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,4 @@ | ||
require 'test_helper' | ||
|
||
class CalendarHelperTest < ActionView::TestCase | ||
end |