Changed Mobile App, fixed announcement default widget
This commit is contained in:
parent
2725aefb71
commit
c0105e7cb8
|
@ -467,8 +467,9 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def prepare_for_mobile
|
||||
if @site.mobile_on
|
||||
session[:mobile_param] = if request.path =~ /mobile/
|
||||
if (@site.mobile_on.eql?(true) && mobile_device?)
|
||||
mobile_path = "/mobile"
|
||||
session[:mobile_param] = if request.path.eql?(mobile_path)
|
||||
'1'
|
||||
elsif params[:mobile]
|
||||
params[:mobile]
|
||||
|
@ -476,8 +477,9 @@ class ApplicationController < ActionController::Base
|
|||
session[:mobile_param]
|
||||
end
|
||||
request.format = :mobile if mobile_device?
|
||||
else
|
||||
session[:mobile_param] = if request.path =~ /app/
|
||||
elsif (@site.mobile_on.eql?(false) && mobile_device?)
|
||||
mobile_path = "/mobile/app"
|
||||
session[:mobile_param] = if request.path.eql?(mobile_path)
|
||||
'1'
|
||||
elsif params[:mobile]
|
||||
params[:mobile]
|
||||
|
|
Loading…
Reference in New Issue