diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb index e6a9e6f7..44e4ac77 100644 --- a/app/controllers/admin/sites_controller.rb +++ b/app/controllers/admin/sites_controller.rb @@ -22,7 +22,7 @@ class Admin::SitesController < OrbitBackendController def update if params[:site][:default_locale] && @site.enable_language_detection.eql?(true) - Site.update_all({:enable_language_detection => false}) + Site.update_all({:enable_language_detection => false}) elsif params[:site][:enable_language_detection] && @site.default_locale.present? Site.update_all({:default_locale => nil}) end diff --git a/app/controllers/mobile_controller.rb b/app/controllers/mobile_controller.rb index 0106e5da..546000ac 100644 --- a/app/controllers/mobile_controller.rb +++ b/app/controllers/mobile_controller.rb @@ -5,6 +5,7 @@ class MobileController < ApplicationController before_filter :no_footer_for_app def index + @site = Site.first date_now = Time.now @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15) @ad_banner = AdBanner.find(:all, :conditions => {:title => /Home/i})[0] diff --git a/app/mailer/user_mailer.rb b/app/mailer/user_mailer.rb index 7f70ecd1..8a5a6e6b 100644 --- a/app/mailer/user_mailer.rb +++ b/app/mailer/user_mailer.rb @@ -1,10 +1,3 @@ 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/models/site.rb b/app/models/site.rb index e93e9a87..e7f8db64 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -19,6 +19,7 @@ class Site field :sitemap_menu_in_header, :type => Boolean, :default => false field :enable_terms_of_use, :type => Boolean, :default => false field :enable_language_detection, :type => Boolean, :default => false + field :enable_announcement_mobile, :type => Boolean, :default => false field :title_always_on, :type => Boolean, :default => false field :dashbroad_allow_visitor, :type => Boolean, :default => false diff --git a/app/models/user/user.rb b/app/models/user/user.rb index ee5b08db..f1d80bb3 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -22,6 +22,11 @@ class User field :cache_dept,type: Hash field :status_record,type: Hash field :approved, type: Boolean, :default => false + field :reset_password_token, :type => String + field :reset_password_sent_at, :type => Time + field :remember_created_at, :type => Time + + attr_accessible :remember_me has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users' has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users' diff --git a/app/views/admin/sites/responsive_setting.html.erb b/app/views/admin/sites/responsive_setting.html.erb index 6513f846..a9e098f4 100644 --- a/app/views/admin/sites/responsive_setting.html.erb +++ b/app/views/admin/sites/responsive_setting.html.erb @@ -20,12 +20,20 @@
-
+
<%= f.check_box :mobile_on , :class=>"toggle-check", :data=> { disabled: true } %> Enable Mobile Website
+
+ +
+ <%= f.check_box :enable_announcement_mobile , :class=>"toggle-check", :data=> { disabled: true } %> + Enable Announcements +
+
+
diff --git a/app/views/mobile/index.mobile.erb b/app/views/mobile/index.mobile.erb index c0dcab98..e841b0cf 100644 --- a/app/views/mobile/index.mobile.erb +++ b/app/views/mobile/index.mobile.erb @@ -3,7 +3,8 @@ <%= image_tag image.file.url, width: @ad_banner.width, height: @ad_banner.height %> <% end %>
-
+<% if @site.enable_announcement_mobile %> +
<% @bulletins.each do |bulletin| %>
@@ -16,8 +17,8 @@
<%= bulletin.subtitle %>
<% end %> -
- +
+<% end %>