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

Use navless layout when it makes sense

parent 96e8c6b7
......@@ -419,7 +419,7 @@ img.emoji {
height: 220px;
}
.search-container {
.navless-container {
margin-top: 30px;
}
......
......@@ -7,7 +7,8 @@ class ProjectsController < ProjectResourceController
before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer]
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
@project = Project.new
......@@ -105,4 +106,10 @@ class ProjectsController < ProjectResourceController
format.json { render :json => @suggestions }
end
end
private
def set_title
@title = 'New Project'
end
end
class UsersController < ApplicationController
layout 'navless'
def show
@user = User.find_by_username!(params[:username])
@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)
@title = @user.name
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 @@
%h1 GITLAB
%span.separator
%h1.project_name Public Projects
.container
.container.navless-container
.content
.prepend-top-20
= yield
= yield
......@@ -5,6 +5,6 @@
= render "layouts/head_panel", title: "Search"
= render "layouts/flash"
.container.search-container
.container.navless-container
.content
= yield
.project-edit-container
%h3.page_title New Project
%hr
.project-edit-errors
= render 'projects/errors'
.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