Remove layout 'centered_with_header_with_footer'
This commit is contained in:
parent
efa2f43f72
commit
d9bf4a2fa6
25 changed files with 35 additions and 65 deletions
|
|
@ -24,7 +24,7 @@ class ApplicationController < ActionController::Base
|
|||
:tags,
|
||||
:open_publisher
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "centered_with_header_with_footer" }
|
||||
layout proc { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
private
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
class ContactsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
class HelpController < ApplicationController
|
||||
layout -> (c) { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
def faq
|
||||
gon.chatEnabled = AppConfig.chat.enabled?
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
class NotificationsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
def update
|
||||
note = Notification.where(:recipient_id => current_user.id, :id => params[:id]).first
|
||||
if note
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
class PasswordsController < Devise::PasswordsController
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
end
|
||||
|
|
@ -6,8 +6,6 @@ class PeopleController < ApplicationController
|
|||
before_action :authenticate_user!, except: [:show, :stream]
|
||||
before_action :find_person, only: [:show, :stream, :hovercard]
|
||||
|
||||
layout ->(c){ request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
respond_to :html, :except => [:tag_index]
|
||||
respond_to :json, :only => [:index, :show]
|
||||
respond_to :js, :only => [:tag_index]
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
class PhotosController < ApplicationController
|
||||
before_action :authenticate_user!, :except => :show
|
||||
|
||||
layout ->(c){ request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
respond_to :html, :json
|
||||
|
||||
def show
|
||||
|
|
|
|||
|
|
@ -24,10 +24,13 @@ class PostsController < ApplicationController
|
|||
mark_corresponding_notifications_read if user_signed_in?
|
||||
|
||||
respond_to do |format|
|
||||
format.html{ gon.post = PostPresenter.new(@post, current_user); render 'posts/show', layout: 'with_header_with_footer' }
|
||||
format.xml{ render :xml => @post.to_diaspora_xml }
|
||||
format.mobile{render 'posts/show' }
|
||||
format.json{ render :json => PostPresenter.new(@post, current_user) }
|
||||
format.html {
|
||||
gon.post = PostPresenter.new(@post, current_user)
|
||||
render "posts/show"
|
||||
}
|
||||
format.xml { render xml: @post.to_diaspora_xml }
|
||||
format.mobile { render "posts/show" }
|
||||
format.json { render json: PostPresenter.new(@post, current_user) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
class ProfilesController < ApplicationController
|
||||
before_action :authenticate_user!, :except => ['show']
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }, only: [:show, :edit]
|
||||
|
||||
respond_to :html, :except => [:show]
|
||||
respond_to :js, :only => :update
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ class ServicesController < ApplicationController
|
|||
before_action :authenticate_user!
|
||||
before_action :abort_if_already_authorized, :abort_if_read_only_access, :only => :create
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }, only: [:index]
|
||||
|
||||
respond_to :html
|
||||
respond_to :json, :only => :inviter
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
class SessionsController < Devise::SessionsController
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }, :only => [:new]
|
||||
|
||||
after_filter :reset_authentication_token, :only => [:create]
|
||||
before_filter :reset_authentication_token, :only => [:destroy]
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ class StatisticsController < ApplicationController
|
|||
@statistics = StatisticsPresenter.new
|
||||
respond_to do |format|
|
||||
format.json { render json: @statistics }
|
||||
format.mobile { render layout: 'application' }
|
||||
format.html { render layout: 'with_header_with_footer' }
|
||||
format.all
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ class StreamsController < ApplicationController
|
|||
before_action :save_selected_aspects, :only => :aspects
|
||||
before_action :redirect_unless_admin, :only => :public
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
respond_to :html,
|
||||
:mobile,
|
||||
:json
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ class TagsController < ApplicationController
|
|||
skip_before_action :set_grammatical_gender
|
||||
before_action :ensure_page, :only => :show
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }, :only => [:show]
|
||||
|
||||
helper_method :tag_followed?
|
||||
|
||||
respond_to :html, :only => [:show]
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
class UsersController < ApplicationController
|
||||
before_action :authenticate_user!, :except => [:new, :create, :public, :user_photo]
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" },
|
||||
only: [:privacy_settings, :edit, :update]
|
||||
|
||||
respond_to :html
|
||||
|
||||
def edit
|
||||
|
|
@ -127,10 +123,7 @@ class UsersController < ApplicationController
|
|||
@person = @user.person
|
||||
@profile = @user.profile
|
||||
|
||||
respond_to do |format|
|
||||
format.mobile { render "users/getting_started" }
|
||||
format.all { render "users/getting_started", layout: "with_header_with_footer" }
|
||||
end
|
||||
render "users/getting_started"
|
||||
end
|
||||
|
||||
def getting_started_completed
|
||||
|
|
@ -159,7 +152,7 @@ class UsersController < ApplicationController
|
|||
def download_photos
|
||||
redirect_to current_user.exported_photos_file.url
|
||||
end
|
||||
|
||||
|
||||
def user_photo
|
||||
username = params[:username].split('@')[0]
|
||||
user = User.find_by_username(username)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
= link_to content_tag(:div, nil, class: 'diaspora_header_logo branding-header-logo'), root_path
|
||||
|
||||
%ul#landing_nav
|
||||
- if AppConfig.settings.enable_registrations? && !current_page?(controller: :registrations, action: :new)
|
||||
- if AppConfig.settings.enable_registrations? && !current_page?(controller: '/registrations', action: :new)
|
||||
%li= link_to t('devise.shared.links.sign_up'), new_user_registration_path, class: 'login'
|
||||
%li= link_to t('devise.shared.links.sign_in'), new_user_session_path, class: 'login'
|
||||
#lightbox
|
||||
|
|
|
|||
|
|
@ -52,11 +52,7 @@
|
|||
|
||||
= yield :before_content
|
||||
|
||||
- if content_for?(:container_content)
|
||||
.container
|
||||
= yield(:container_content)
|
||||
- else
|
||||
= content_for?(:content) ? yield(:content) : yield
|
||||
= content_for?(:content) ? yield(:content) : yield
|
||||
|
||||
= yield :after_content
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
- content_for :container_content do
|
||||
= yield
|
||||
|
||||
= render template: "layouts/with_header_with_footer"
|
||||
|
|
@ -120,7 +120,6 @@ Diaspora::Application.routes.draw do
|
|||
get 'users/edit' => redirect('/user/edit')
|
||||
|
||||
devise_for :users, :controllers => {:registrations => "registrations",
|
||||
:passwords => "passwords",
|
||||
:sessions => "sessions"}
|
||||
|
||||
#legacy routes to support old invite routes
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
require 'spec_helper'
|
||||
require "spec_helper"
|
||||
|
||||
describe PasswordsController, :type => :controller do
|
||||
describe Devise::PasswordsController, type: :controller do
|
||||
include Devise::TestHelpers
|
||||
|
||||
before do
|
||||
|
|
|
|||
|
|
@ -2,22 +2,29 @@
|
|||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
require 'spec_helper'
|
||||
require "spec_helper"
|
||||
|
||||
describe StatisticsController, :type => :controller do
|
||||
|
||||
describe '#statistics' do
|
||||
|
||||
it 'responds to format json' do
|
||||
get :statistics, :format => 'json'
|
||||
expect(response.code).to eq('200')
|
||||
describe StatisticsController, type: :controller do
|
||||
describe "#statistics" do
|
||||
it "responds to format json" do
|
||||
get :statistics, format: "json"
|
||||
expect(response.code).to eq("200")
|
||||
end
|
||||
|
||||
it 'contains json' do
|
||||
get :statistics, :format => 'json'
|
||||
|
||||
it "contains json" do
|
||||
get :statistics, format: "json"
|
||||
json = JSON.parse(response.body)
|
||||
expect(json['name']).to be_present
|
||||
expect(json["name"]).to be_present
|
||||
end
|
||||
|
||||
it "responds to html" do
|
||||
get :statistics, format: "html"
|
||||
expect(response.code).to eq("200")
|
||||
end
|
||||
|
||||
it "responds to mobile" do
|
||||
get :statistics, format: "mobile"
|
||||
expect(response.code).to eq("200")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue