Skip to content
Extraits de code Groupes Projets
Valider d9bf4a2f rédigé par Steffen van Bergerem's avatar Steffen van Bergerem
Parcourir les fichiers

Remove layout 'centered_with_header_with_footer'

parent efa2f43f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 12 ajouts et 40 suppressions
......@@ -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|
......
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
......
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)
......
Fichier déplacé
Fichier déplacé
......@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter