From 233aa2ab2f2942f2e1c33338ea4f0868f32b6f53 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 16 Mar 2016 14:35:58 -0400 Subject: [PATCH] FIX: If we're using the crawler layout, don't skip on mobile --- app/helpers/application_helper.rb | 4 ++++ app/views/list/list.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 43acc6ddf5b..c007b461dfc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -169,6 +169,10 @@ module ApplicationHelper MobileDetection.resolve_mobile_view!(request.user_agent,params,session) end + def include_crawler_content? + controller.try(:use_crawler_layout?) || !mobile_view? + end + def mobile_device? MobileDetection.mobile_device?(request.user_agent) end diff --git a/app/views/list/list.erb b/app/views/list/list.erb index cf6cebed844..386a74f3480 100644 --- a/app/views/list/list.erb +++ b/app/views/list/list.erb @@ -1,4 +1,4 @@ -<%- unless mobile_view? %> +<%- if include_crawler_content? %> <% if @category %>