From 3a202d8fa9df7b8bed43319000e9b255f2e17182 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem <svbergerem@online.de> Date: Thu, 26 Mar 2015 16:28:01 +0100 Subject: [PATCH] Remove footer from stream and profile pages --- app/controllers/people_controller.rb | 2 ++ app/controllers/photos_controller.rb | 2 ++ app/controllers/streams_controller.rb | 2 ++ app/controllers/tags_controller.rb | 2 ++ 4 files changed, 8 insertions(+) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index a1feaede60..ab2b6811f5 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -6,6 +6,8 @@ class PeopleController < ApplicationController before_action :authenticate_user!, except: [:show, :stream] before_action :find_person, only: [:show, :stream, :hovercard] + layout proc { request.format == :mobile ? "application" : "with_header" }, only: %i( show contacts ) + respond_to :html, :except => [:tag_index] respond_to :json, :only => [:index, :show] respond_to :js, :only => [:tag_index] diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 674d1ff4a2..c86c26ea68 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -6,6 +6,8 @@ class PhotosController < ApplicationController before_action :authenticate_user!, :except => :show respond_to :html, :json + layout proc { request.format == :mobile ? "application" : "with_header" }, only: :index + def show @photo = if user_signed_in? current_user.photos_from(Person.find_by_guid(params[:person_id])).where(id: params[:id]).first diff --git a/app/controllers/streams_controller.rb b/app/controllers/streams_controller.rb index 22c2ecc379..52edbe5ec2 100644 --- a/app/controllers/streams_controller.rb +++ b/app/controllers/streams_controller.rb @@ -7,6 +7,8 @@ class StreamsController < ApplicationController before_action :save_selected_aspects, :only => :aspects before_action :redirect_unless_admin, :only => :public + layout proc { request.format == :mobile ? "application" : "with_header" } + respond_to :html, :mobile, :json diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 9cea031126..e8d25dd731 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -8,6 +8,8 @@ class TagsController < ApplicationController helper_method :tag_followed? + layout proc { request.format == :mobile ? "application" : "with_header" }, only: :show + respond_to :html, :only => [:show] respond_to :json, :only => [:index, :show] -- GitLab