Updated mobile settings with /mobile and /mobile/app separate
This commit is contained in:
parent
3b489789ac
commit
9fecdd9739
|
@ -468,9 +468,10 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def prepare_for_mobile
|
def prepare_for_mobile
|
||||||
if (@site.mobile_on.eql?(true) && mobile_device?)
|
if (@site.mobile_on.eql?(true) && mobile_device?)
|
||||||
|
mobile_app_path = "/mobile/app"
|
||||||
mobile_path = "/mobile"
|
mobile_path = "/mobile"
|
||||||
session[:mobile_param] = if request.path.eql?(mobile_path)
|
session[:mobile_param] = if request.path.eql?(mobile_path)
|
||||||
'1'
|
'1'
|
||||||
elsif params[:mobile]
|
elsif params[:mobile]
|
||||||
params[:mobile]
|
params[:mobile]
|
||||||
else
|
else
|
||||||
|
@ -478,9 +479,12 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
request.format = :mobile if mobile_device?
|
request.format = :mobile if mobile_device?
|
||||||
elsif (@site.mobile_on.eql?(false) && mobile_device?)
|
elsif (@site.mobile_on.eql?(false) && mobile_device?)
|
||||||
mobile_path = "/mobile/app"
|
mobile_app_path = "/mobile/app"
|
||||||
session[:mobile_param] = if request.path.eql?(mobile_path)
|
mobile_path = "/mobile"
|
||||||
|
session[:mobile_param] = if request.path.eql?(mobile_app_path)
|
||||||
'1'
|
'1'
|
||||||
|
elsif request.path.eql?(mobile_path)
|
||||||
|
'0'
|
||||||
elsif params[:mobile]
|
elsif params[:mobile]
|
||||||
params[:mobile]
|
params[:mobile]
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue