Commit 3c2b085b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use navless layout when it makes sense

parent 96e8c6b7
...@@ -419,7 +419,7 @@ img.emoji { ...@@ -419,7 +419,7 @@ img.emoji {
height: 220px; height: 220px;
} }
.search-container { .navless-container {
margin-top: 30px; margin-top: 30px;
} }
......
...@@ -7,7 +7,8 @@ class ProjectsController < ProjectResourceController ...@@ -7,7 +7,8 @@ class ProjectsController < ProjectResourceController
before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer] before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer]
before_filter :require_non_empty_project, only: [:blob, :tree, :graph] before_filter :require_non_empty_project, only: [:blob, :tree, :graph]
layout 'application', only: [:new, :create] layout 'navless', only: [:new, :create]
before_filter :set_title, only: [:new, :create]
def new def new
@project = Project.new @project = Project.new
...@@ -105,4 +106,10 @@ class ProjectsController < ProjectResourceController ...@@ -105,4 +106,10 @@ class ProjectsController < ProjectResourceController
format.json { render :json => @suggestions } format.json { render :json => @suggestions }
end end
end end
private
def set_title
@title = 'New Project'
end
end end
class UsersController < ApplicationController class UsersController < ApplicationController
layout 'navless'
def show def show
@user = User.find_by_username!(params[:username]) @user = User.find_by_username!(params[:username])
@projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id)) @projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id))
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20) @events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
@title = @user.name
end end
end end
!!! 5
%html{ lang: "en"}
= render "layouts/head", title: @title
%body{class: "#{app_theme} application"}
= render "layouts/head_panel", title: @title
= render "layouts/flash"
.container.navless-container
.content
= yield
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
%h1 GITLAB %h1 GITLAB
%span.separator %span.separator
%h1.project_name Public Projects %h1.project_name Public Projects
.container .container.navless-container
.content .content
.prepend-top-20 = yield
= yield
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
= render "layouts/head_panel", title: "Search" = render "layouts/head_panel", title: "Search"
= render "layouts/flash" = render "layouts/flash"
.container.search-container .container.navless-container
.content .content
= yield = yield
.project-edit-container .project-edit-container
%h3.page_title New Project
%hr
.project-edit-errors .project-edit-errors
= render 'projects/errors' = render 'projects/errors'
.project-edit-content .project-edit-content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment