From 5e0696890a6eebd625581b2cf60a5c01e982c8dd Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Mon, 11 Nov 2013 17:21:18 +0800 Subject: [PATCH] Updated Remember me, and Homepage widget more link --- app/mailer/user_mailer.rb | 10 ++++ app/views/devise/passwords/new.html.erb | 56 ++++++++++++------- app/views/devise/sessions/new.html.erb | 31 +++++----- app/views/layouts/_right_menu.html.erb | 6 +- config/environments/development.rb | 2 +- config/initializers/devise.rb | 6 +- config/mongoid.yml | 4 +- lib/parsers/parser_front_end.rb | 1 - .../widget/bulletins/_index.html.erb | 9 +-- 9 files changed, 70 insertions(+), 55 deletions(-) create mode 100644 app/mailer/user_mailer.rb diff --git a/app/mailer/user_mailer.rb b/app/mailer/user_mailer.rb new file mode 100644 index 00000000..7f70ecd1 --- /dev/null +++ b/app/mailer/user_mailer.rb @@ -0,0 +1,10 @@ +class UserMailer < Devise::Mailer + default :from => "noreply@rulingcom.com" + + def password_reset(user, password) + @user = user + @password = password + mail(:to => user.email, + :subject => 'Password Reset Notification') + end +end \ No newline at end of file diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 91ad0047..2785f9b3 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,22 +1,36 @@ +
+ +
\ No newline at end of file diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 83c9b10a..1b77fce2 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,5 +1,3 @@ - -
- + <%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
diff --git a/config/environments/development.rb b/config/environments/development.rb index 1dbaf4bf..987d74bb 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -15,7 +15,7 @@ Orbit::Application.configure do config.action_controller.perform_caching = true # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false + config.action_mailer.raise_delivery_errors = true # Print deprecation notices to the Rails logger config.active_support.deprecation = :log diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index b7b92e9f..d1085c2e 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -3,10 +3,10 @@ Devise.setup do |config| # ==> Mailer Configuration # Configure the e-mail address which will be shown in DeviseMailer. - config.mailer_sender = "please-change-me@config-initializers-devise.com" + config.mailer_sender = "UserMailer" # Configure the class responsible to send e-mails. - # config.mailer = "Devise::Mailer" + config.mailer = "Devise::Mailer" # ==> ORM configuration # Load and configure the ORM. Supports :active_record (default) and @@ -61,7 +61,7 @@ Devise.setup do |config| # ==> Configuration for :rememberable # The time the user will be remembered without asking for credentials again. - # config.remember_for = 2.weeks + config.remember_for = 2.weeks # If true, a valid remember token can be re-used between multiple browsers. # config.remember_across_browsers = true diff --git a/config/mongoid.yml b/config/mongoid.yml index d20c4727..af221521 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -8,7 +8,7 @@ defaults: &defaults development: <<: *defaults - database: orbit_site_new + database: test_site @@ -24,4 +24,4 @@ production: # password: <%= ENV['MONGOID_PASSWORD'] %> # database: <%= ENV['MONGOID_DATABASE'] %> <<: *defaults - database: orbit_site_new + database: orbit_test_new diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index c7be59b1..22c8b51e 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -23,7 +23,6 @@ module ParserFrontEnd args["tag_id"] = args["tag_id"].gsub(/\"|\[|\]/,'').split(",").each(&:strip!) if !args["tag_id"].blank? and args["tag_id"].is_a? String # tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id] # category = params[:category_id].blank? ? page[:category] : params[:category_id] - body = Nokogiri::HTML(page.content) if @edit diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb index 410d35e2..0276b853 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb @@ -53,7 +53,7 @@ <% end %> - + <% if !@category_id.blank? %>
<%= link_to t('more'), panel_announcement_front_end_bulletins_path( :category_id => @category_id ) %>
<% else %> @@ -100,7 +100,7 @@ <% end %> - + <% if !@category_id.blank? %>
<%= link_to t('more'), panel_announcement_front_end_bulletins_path( :category_id => @category_id ) %>
<% else %> @@ -149,7 +149,6 @@ <% end %> - <% if !@category_id.blank? %>
<%= link_to t('more'), panel_announcement_front_end_bulletins_path( :category_id => @category_id ) %>
<% else %> @@ -198,8 +197,7 @@
<% end %> - - + <% if !@category_id.blank? %>
<%= link_to t('more'), panel_announcement_front_end_bulletins_path( :category_id => @category_id ) %>
<% else %> @@ -246,7 +244,6 @@ <% end %> - <% if !@category_id.blank? %>
<%= link_to t('more'), panel_announcement_front_end_bulletins_path( :category_id => @category_id ) %>
<% else %>