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