base_rails_app 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -0
- data/README +1 -0
- data/lib/app/controllers/application_controller.rb +55 -0
- data/lib/app/controllers/password_resets_controller.rb +45 -0
- data/lib/app/controllers/user_sessions_controller.rb +25 -0
- data/lib/app/controllers/users_controller.rb +37 -0
- data/lib/app/helpers/application_helper.rb +4 -0
- data/lib/app/helpers/user_sessions_helper.rb +2 -0
- data/lib/app/helpers/users_helper.rb +2 -0
- data/lib/app/models/postman.rb +20 -0
- data/lib/app/models/user.rb +12 -0
- data/lib/app/models/user_session.rb +2 -0
- data/lib/app/views/application/404_not_found.html.erb +8 -0
- data/lib/app/views/layouts/application.html.erb +57 -0
- data/lib/app/views/password_resets/_sidebar.html.erb +0 -0
- data/lib/app/views/password_resets/edit.html.erb +33 -0
- data/lib/app/views/password_resets/new.html.erb +26 -0
- data/lib/app/views/postman/password_reset_instructions.html.erb +3 -0
- data/lib/app/views/postman/welcome_email.html.erb +3 -0
- data/lib/app/views/user_sessions/_form.html.erb +19 -0
- data/lib/app/views/user_sessions/_sidebar.html.erb +13 -0
- data/lib/app/views/user_sessions/new.html.erb +15 -0
- data/lib/app/views/users/_form.html.erb +28 -0
- data/lib/app/views/users/_sidebar.html.erb +6 -0
- data/lib/app/views/users/edit.html.erb +19 -0
- data/lib/app/views/users/new.html.erb +15 -0
- data/lib/app/views/users/show.html.erb +46 -0
- data/lib/base_rails_app.rb +5 -0
- data/lib/base_rails_app/boot.rb +2 -0
- data/lib/base_rails_app/tasks.rb +12 -0
- data/lib/config/configatron/cucumber.rb +0 -0
- data/lib/config/configatron/defaults.rb +4 -0
- data/lib/config/configatron/development.rb +1 -0
- data/lib/config/configatron/production.rb +0 -0
- data/lib/config/configatron/test.rb +0 -0
- data/lib/config/database.yml +25 -0
- data/lib/config/deploy.rb +15 -0
- data/lib/config/environments/cucumber.rb +22 -0
- data/lib/config/environments/development.rb +17 -0
- data/lib/config/environments/production.rb +28 -0
- data/lib/config/environments/test.rb +28 -0
- data/lib/config/gemtronics.rb +36 -0
- data/lib/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/config/initializers/configatron.rb +1 -0
- data/lib/config/initializers/hoptoad.rb +3 -0
- data/lib/config/initializers/inflections.rb +10 -0
- data/lib/config/initializers/mailers.rb +1 -0
- data/lib/config/initializers/mime_types.rb +5 -0
- data/lib/config/initializers/new_rails_defaults.rb +21 -0
- data/lib/config/initializers/session_store.rb +17 -0
- data/lib/config/locales/en.yml +5 -0
- data/lib/config/routes.rb +51 -0
- data/lib/config/schedule.rb +20 -0
- data/lib/db/migrate/20090809175903_create_users.rb +30 -0
- data/lib/db/migrate/20090809204840_acts_as_taggable_on_migration.rb +29 -0
- data/lib/db/migrate/20090912171353_create_delayed_jobs.rb +20 -0
- data/lib/db/migrate/20090912171829_add_delayed_job_extras.rb +11 -0
- data/lib/db/migrate/20090929201455_add_more_time_columns_to_dj.rb +11 -0
- data/lib/db/schema.rb +72 -0
- data/lib/db/seeds.rb +7 -0
- data/lib/lib/tasks/cucumber.rake +36 -0
- data/lib/lib/tasks/rcov.rake +27 -0
- data/lib/lib/tasks/rspec.rake +183 -0
- data/lib/vendor/plugins/delayed_job/generators/delayed_job/delayed_job_generator.rb +22 -0
- data/lib/vendor/plugins/delayed_job/generators/delayed_job/templates/migration.rb +20 -0
- data/lib/vendor/plugins/delayed_job/init.rb +2 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed/command.rb +65 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed/job.rb +271 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed/message_sending.rb +18 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed/performable_method.rb +55 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed/tasks.rb +15 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed/worker.rb +54 -0
- data/lib/vendor/plugins/delayed_job/lib/delayed_job.rb +13 -0
- data/lib/vendor/plugins/delayed_job/recipes/delayed_job.rb +26 -0
- data/lib/vendor/plugins/delayed_job/tasks/jobs.rake +1 -0
- data/lib/vendor/plugins/hoptoad_notifier/install.rb +1 -0
- data/lib/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier.rb +418 -0
- data/lib/vendor/plugins/hoptoad_notifier/lib/hoptoad_tasks.rb +26 -0
- data/lib/vendor/plugins/hoptoad_notifier/recipes/hoptoad.rb +22 -0
- data/lib/vendor/plugins/hoptoad_notifier/tasks/hoptoad_notifier_tasks.rake +66 -0
- data/lib/vendor/plugins/inherited_resources/README.rdoc +524 -0
- data/lib/vendor/plugins/inherited_resources/inherited_resources.gemspec +71 -0
- data/lib/vendor/plugins/inherited_resources/init.rb +1 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources.rb +23 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/actions.rb +79 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/base.rb +42 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/base_helpers.rb +363 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/belongs_to_helpers.rb +89 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/class_methods.rb +338 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/dsl.rb +26 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/dumb_responder.rb +20 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/has_scope_helpers.rb +83 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/legacy/respond_to.rb +156 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/legacy/responder.rb +200 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/polymorphic_helpers.rb +155 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/singleton_helpers.rb +95 -0
- data/lib/vendor/plugins/inherited_resources/lib/inherited_resources/url_helpers.rb +179 -0
- data/lib/vendor/plugins/inherited_resources/test/aliases_test.rb +139 -0
- data/lib/vendor/plugins/inherited_resources/test/association_chain_test.rb +125 -0
- data/lib/vendor/plugins/inherited_resources/test/base_test.rb +225 -0
- data/lib/vendor/plugins/inherited_resources/test/belongs_to_test.rb +87 -0
- data/lib/vendor/plugins/inherited_resources/test/class_methods_test.rb +138 -0
- data/lib/vendor/plugins/inherited_resources/test/customized_base_test.rb +162 -0
- data/lib/vendor/plugins/inherited_resources/test/customized_belongs_to_test.rb +76 -0
- data/lib/vendor/plugins/inherited_resources/test/defaults_test.rb +70 -0
- data/lib/vendor/plugins/inherited_resources/test/flash_test.rb +88 -0
- data/lib/vendor/plugins/inherited_resources/test/has_scope_test.rb +139 -0
- data/lib/vendor/plugins/inherited_resources/test/locales/en.yml +17 -0
- data/lib/vendor/plugins/inherited_resources/test/nested_belongs_to_test.rb +108 -0
- data/lib/vendor/plugins/inherited_resources/test/optional_belongs_to_test.rb +164 -0
- data/lib/vendor/plugins/inherited_resources/test/polymorphic_test.rb +186 -0
- data/lib/vendor/plugins/inherited_resources/test/redirect_to_test.rb +51 -0
- data/lib/vendor/plugins/inherited_resources/test/respond_to_test.rb +155 -0
- data/lib/vendor/plugins/inherited_resources/test/singleton_test.rb +83 -0
- data/lib/vendor/plugins/inherited_resources/test/test_helper.rb +38 -0
- data/lib/vendor/plugins/inherited_resources/test/url_helpers_test.rb +537 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cars/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cars/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cars/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cars/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cities/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cities/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cities/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/cities/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/comments/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/comments/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/comments/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/comments/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/employees/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/employees/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/employees/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/employees/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/managers/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/managers/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/managers/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/painters/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/painters/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/painters/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/painters/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/pets/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/pets/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/pets/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/pets/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/products/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/products/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/products/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/products/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/professors/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/professors/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/professors/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/professors/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/projects/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/projects/index.json.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/projects/respond_to_skip_default_template.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/projects/respond_with_resource.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/students/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/students/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/trees/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/trees/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/trees/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/trees/show.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/users/edit.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/users/index.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/users/new.html.erb +1 -0
- data/lib/vendor/plugins/inherited_resources/test/views/users/show.html.erb +1 -0
- data/lib/vendor/plugins/web-app-theme/README.md +22 -0
- data/lib/vendor/plugins/web-app-theme/images/avatar.png +0 -0
- data/lib/vendor/plugins/web-app-theme/index.html +473 -0
- data/lib/vendor/plugins/web-app-theme/javascripts/jquery-1.3.min.js +19 -0
- data/lib/vendor/plugins/web-app-theme/javascripts/jquery.localscroll.js +104 -0
- data/lib/vendor/plugins/web-app-theme/javascripts/jquery.scrollTo.js +150 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/theme/templates/view_layout_administration.html.erb +48 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/theme/templates/view_layout_sign.html.erb +15 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/theme/theme_generator.rb +38 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_edit.html.erb +20 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_form.html.erb +10 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_new.html.erb +19 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_show.html.erb +23 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_sidebar.html.erb +13 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_signin.html.erb +39 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_signup.html.erb +56 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/templates/view_tables.html.erb +50 -0
- data/lib/vendor/plugins/web-app-theme/rails_generators/themed/themed_generator.rb +89 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/base.css +336 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/bec-green/style.css +290 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/bec/style.css +301 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/blue/style.css +280 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/default/style.css +267 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/djime-cerulean/style.css +298 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/drastic-dark/style.css +373 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/kathleene/style.css +272 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/orange/style.css +263 -0
- data/lib/vendor/plugins/web-app-theme/stylesheets/themes/reidb-greenish/style.css +301 -0
- metadata +257 -0
data/LICENSE
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/README
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Filters added to this controller apply to all controllers in the application.
|
2
|
+
# Likewise, all the methods added will be available for all controllers.
|
3
|
+
|
4
|
+
class ApplicationController < ActionController::Base
|
5
|
+
protect_from_forgery
|
6
|
+
|
7
|
+
helper :all
|
8
|
+
helper_method :current_user_session, :current_user
|
9
|
+
filter_parameter_logging :password, :password_confirmation
|
10
|
+
|
11
|
+
rescue_from(ActiveRecord::RecordNotFound) do |e|
|
12
|
+
@exception = e
|
13
|
+
render :template => 'application/404_not_found', :status => 404
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def current_user_session
|
19
|
+
return @current_user_session if defined?(@current_user_session)
|
20
|
+
@current_user_session = UserSession.find
|
21
|
+
end
|
22
|
+
|
23
|
+
def current_user
|
24
|
+
return @current_user if defined?(@current_user)
|
25
|
+
@current_user = current_user_session && current_user_session.record
|
26
|
+
end
|
27
|
+
|
28
|
+
def require_user
|
29
|
+
unless current_user
|
30
|
+
store_location
|
31
|
+
flash[:notice] = "You must be logged in to access this page"
|
32
|
+
redirect_to login_url
|
33
|
+
return false
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def require_no_user
|
38
|
+
if current_user
|
39
|
+
store_location
|
40
|
+
flash[:notice] = "You must be logged out to access this page"
|
41
|
+
redirect_to my_account_url
|
42
|
+
return false
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def store_location
|
47
|
+
session[:return_to] = request.request_uri
|
48
|
+
end
|
49
|
+
|
50
|
+
def redirect_back_or_default(default)
|
51
|
+
redirect_to(session[:return_to] || default)
|
52
|
+
session[:return_to] = nil
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
class PasswordResetsController < ApplicationController
|
2
|
+
before_filter :require_no_user
|
3
|
+
before_filter :load_user_using_perishable_token, :only => [:show, :edit, :update]
|
4
|
+
|
5
|
+
def new
|
6
|
+
render
|
7
|
+
end
|
8
|
+
|
9
|
+
def create
|
10
|
+
@user = User.find_by_email(params[:email])
|
11
|
+
if @user
|
12
|
+
@user.deliver_password_reset_instructions!
|
13
|
+
flash[:notice] = "Instructions to reset your password have been emailed to you. Please check your email."
|
14
|
+
redirect_to login_url
|
15
|
+
else
|
16
|
+
flash[:notice] = "No user was found with that email address."
|
17
|
+
render :action => :new
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def show
|
22
|
+
render :action => :edit
|
23
|
+
end
|
24
|
+
|
25
|
+
def update
|
26
|
+
@user.password = params[:user][:password]
|
27
|
+
@user.password_confirmation = params[:user][:password_confirmation]
|
28
|
+
if @user.save
|
29
|
+
flash[:notice] = "Password successfully updated"
|
30
|
+
redirect_to my_account_url
|
31
|
+
else
|
32
|
+
render :action => :edit
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def load_user_using_perishable_token
|
39
|
+
@user = User.find_using_perishable_token(params[:id])
|
40
|
+
unless @user
|
41
|
+
flash[:notice] = "Sorry, but we could not locate your account. If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process."
|
42
|
+
redirect_to login_url
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class UserSessionsController < ApplicationController
|
2
|
+
before_filter :require_no_user, :only => [:new, :create]
|
3
|
+
before_filter :require_user, :only => :destroy
|
4
|
+
|
5
|
+
def new
|
6
|
+
@user_session = UserSession.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def create
|
10
|
+
@user_session = UserSession.new(params[:user_session])
|
11
|
+
if @user_session.save
|
12
|
+
flash[:notice] = "Login successful!"
|
13
|
+
redirect_back_or_default my_account_url
|
14
|
+
else
|
15
|
+
flash[:notice] = "Invalid login/password."
|
16
|
+
render :action => :new
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def destroy
|
21
|
+
current_user_session.destroy
|
22
|
+
flash[:notice] = "Logout successful!"
|
23
|
+
redirect_back_or_default login_path
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class UsersController < ApplicationController
|
2
|
+
inherit_resources
|
3
|
+
|
4
|
+
before_filter :require_no_user, :only => [:new, :create]
|
5
|
+
before_filter :require_user, :only => [:show, :edit, :update, :index]
|
6
|
+
|
7
|
+
actions :all, :except => [:destroy]
|
8
|
+
|
9
|
+
def index
|
10
|
+
redirect_to(my_account_url)
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
create! do |success, failure|
|
15
|
+
success.html {
|
16
|
+
PostmanWorker.deliver_welcome_email(@user)
|
17
|
+
flash[:notice] = "Account registered!"
|
18
|
+
redirect_back_or_default my_account_url
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def update
|
24
|
+
update! do |success, failure|
|
25
|
+
success.html {
|
26
|
+
flash[:notice] = "Account updated!"
|
27
|
+
redirect_to my_account_url
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
def resource
|
34
|
+
@user = current_user
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class Postman < ActionMailer::Base
|
2
|
+
default_url_options[:host] = configatron.emails.host
|
3
|
+
|
4
|
+
def welcome_email(user)
|
5
|
+
subject 'Welcome to MyWebSite.com!'
|
6
|
+
from configatron.emails.welcome.from
|
7
|
+
recipients user.email
|
8
|
+
sent_on Time.now
|
9
|
+
body :user => user
|
10
|
+
end
|
11
|
+
|
12
|
+
def password_reset_instructions(user)
|
13
|
+
subject 'Password Reset Instructions'
|
14
|
+
from configatron.emails.password_reset_instructions.from
|
15
|
+
recipients user.email
|
16
|
+
sent_on Time.now
|
17
|
+
body :password_reset_url => password_reset_url(user.perishable_token)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
+
<title>MyWebSite.com</title>
|
6
|
+
<%= stylesheet_link_tag 'web_app_theme', "themes/djime-cerulean/style" %>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div id="container">
|
10
|
+
<div id="header">
|
11
|
+
<h1><a href="/">MyWebSite.com</a></h1>
|
12
|
+
<div id="user-navigation">
|
13
|
+
<ul>
|
14
|
+
<!--
|
15
|
+
<li><a href="#">Profile</a></li>
|
16
|
+
<li><a href="#">Settings</a></li>
|
17
|
+
-->
|
18
|
+
<% if current_user -%>
|
19
|
+
<li><%= link_to('Profile', user_path(current_user)) %></li>
|
20
|
+
<li><%= link_to('Logout', logout_path, :method => :delete) %></li>
|
21
|
+
<% else -%>
|
22
|
+
<li><%= link_to('Login', login_path) %> / <%= link_to('Signup', new_user_path) %></li>
|
23
|
+
<% end -%>
|
24
|
+
</ul>
|
25
|
+
<div class="clear"></div>
|
26
|
+
</div>
|
27
|
+
<div id="main-navigation">
|
28
|
+
<ul>
|
29
|
+
<li class=""><a href="#">#####</a></li>
|
30
|
+
</ul>
|
31
|
+
<div class="clear"></div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<div id="wrapper">
|
35
|
+
<div class="flash">
|
36
|
+
<% flash.each do |type, message| -%>
|
37
|
+
<div class="message <%= type %>">
|
38
|
+
<p><%= message %></p>
|
39
|
+
</div>
|
40
|
+
<% end -%>
|
41
|
+
</div>
|
42
|
+
<div id="main">
|
43
|
+
<%= yield %>
|
44
|
+
<div id="footer">
|
45
|
+
<div class="block">
|
46
|
+
<p>Copyright © 2009 MyWebSite.com.</p>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
<div id="sidebar">
|
51
|
+
<%= yield :sidebar %>
|
52
|
+
</div>
|
53
|
+
<div class="clear"></div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</body>
|
57
|
+
</html>
|
File without changes
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<h1>Change My Password</h1>
|
2
|
+
|
3
|
+
<div class="block">
|
4
|
+
<div class="secondary-navigation">
|
5
|
+
<div class="clear"></div>
|
6
|
+
</div>
|
7
|
+
<div class="content">
|
8
|
+
<div class="inner">
|
9
|
+
<% form_for @user, :url => password_reset_path, :method => :put, :html => { :class => :form } do |f| -%>
|
10
|
+
|
11
|
+
|
12
|
+
<div class="group">
|
13
|
+
<%= f.label :password, "Password", :class => :label %>
|
14
|
+
<%= f.password_field :password, :class => 'text_field' %>
|
15
|
+
<span class="description">Ex: a simple text</span>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="group">
|
19
|
+
<%= f.label :password_confirmation, "Password Confirmation", :class => :label %>
|
20
|
+
<%= f.password_field :password_confirmation, :class => 'text_field' %>
|
21
|
+
<span class="description">Ex: a simple text</span>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="group navform">
|
25
|
+
<input type="submit" class="button" value="Update my password and log me in →" /> or <%= link_to 'Cancel', login_path %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<% end -%>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<div class="block">
|
2
|
+
<div class="secondary-navigation">
|
3
|
+
<div class="clear"></div>
|
4
|
+
</div>
|
5
|
+
<div class="content">
|
6
|
+
<h2 class="title">Forgot Your Password?</h2>
|
7
|
+
<div class="inner">
|
8
|
+
<p>Fill out the form below and instructions to reset your password will be emailed to you:<br /></p>
|
9
|
+
<% form_tag(password_resets_path, :class => :form) do |f| -%>
|
10
|
+
|
11
|
+
<div class="group">
|
12
|
+
<label class='label' for='email'>Email</label>
|
13
|
+
<%= text_field_tag "email" %>
|
14
|
+
<span class="description">Ex: a simple text</span>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="group navform">
|
18
|
+
<input type="submit" class="button" value="Reset my password →" /> or <%= link_to 'Cancel', login_path %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<% end -%>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
<div class="group">
|
3
|
+
<%= f.label :login, "Login", :class => :label %>
|
4
|
+
<%= f.text_field :login, :class => 'text_field' %>
|
5
|
+
<span class="description">Ex: a simple text</span>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="group">
|
9
|
+
<%= f.label :password, "Password", :class => :label %>
|
10
|
+
<%= f.password_field :password, :class => 'text_field' %>
|
11
|
+
<span class="description">Ex: a simple text</span>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="group navform">
|
15
|
+
<input type="submit" class="button" value="Login →" /> or <%= link_to 'Register', new_user_path %>
|
16
|
+
</div>
|
17
|
+
<div class="group navform">
|
18
|
+
<%= link_to 'Forgot Your Password?', new_password_reset_path %>
|
19
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="block">
|
2
|
+
<h3>Simple Block</h3>
|
3
|
+
<div class="content">
|
4
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
5
|
+
</div>
|
6
|
+
</div>
|
7
|
+
<div class="block">
|
8
|
+
<h3>Links</h3>
|
9
|
+
<ul class="navigation">
|
10
|
+
<li><a href="#">Link 1</a></li>
|
11
|
+
<li><a href="#">Link 2</a></li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="block">
|
2
|
+
<div class="secondary-navigation">
|
3
|
+
<div class="clear"></div>
|
4
|
+
</div>
|
5
|
+
<div class="content">
|
6
|
+
<h2 class="title">Login</h2>
|
7
|
+
<div class="inner">
|
8
|
+
<% form_for :user_session, :url => user_session_path, :html => { :class => :form } do |f| -%>
|
9
|
+
<%= render :partial => "form", :locals => {:f => f} %>
|
10
|
+
<% end -%>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
<div class="group">
|
3
|
+
<%= f.label :login, "Login", :class => :label %>
|
4
|
+
<%= f.text_field :login, :class => 'text_field' %>
|
5
|
+
<span class="description">Ex: a simple text</span>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="group">
|
9
|
+
<%= f.label :email, "Email", :class => :label %>
|
10
|
+
<%= f.text_field :email, :class => 'text_field' %>
|
11
|
+
<span class="description">Ex: a simple text</span>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="group">
|
15
|
+
<%= f.label :password, "Password", :class => :label %>
|
16
|
+
<%= f.password_field :password, :class => 'text_field' %>
|
17
|
+
<span class="description">Ex: a simple text</span>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="group">
|
21
|
+
<%= f.label :password_confirmation, "Password Confirmation", :class => :label %>
|
22
|
+
<%= f.password_field :password_confirmation, :class => 'text_field' %>
|
23
|
+
<span class="description">Ex: a simple text</span>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="group navform">
|
27
|
+
<input type="submit" class="button" value="Save →" /> or <%= link_to 'Cancel', users_path %>
|
28
|
+
</div>
|