Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
3c2b085b
Commit
3c2b085b
authored
Jun 07, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use navless layout when it makes sense
parent
96e8c6b7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
8 deletions
+26
-8
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+1
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+8
-1
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+4
-0
app/views/layouts/navless.html.haml
app/views/layouts/navless.html.haml
+10
-0
app/views/layouts/public.html.haml
app/views/layouts/public.html.haml
+2
-3
app/views/layouts/search.html.haml
app/views/layouts/search.html.haml
+1
-1
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+0
-2
No files found.
app/assets/stylesheets/common.scss
View file @
3c2b085b
...
...
@@ -419,7 +419,7 @@ img.emoji {
height
:
220px
;
}
.
search
-container
{
.
navless
-container
{
margin-top
:
30px
;
}
...
...
app/controllers/projects_controller.rb
View file @
3c2b085b
...
...
@@ -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
app/controllers/users_controller.rb
View file @
3c2b085b
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
app/views/layouts/navless.html.haml
0 → 100644
View file @
3c2b085b
!!! 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
app/views/layouts/public.html.haml
View file @
3c2b085b
...
...
@@ -11,7 +11,6 @@
%h1
GITLAB
%span
.separator
%h1
.project_name
Public Projects
.container
.container
.navless-container
.content
.prepend-top-20
=
yield
app/views/layouts/search.html.haml
View file @
3c2b085b
...
...
@@ -5,6 +5,6 @@
=
render
"layouts/head_panel"
,
title:
"Search"
=
render
"layouts/flash"
.container.
search
-container
.container.
navless
-container
.content
=
yield
app/views/projects/new.html.haml
View file @
3c2b085b
.project-edit-container
%h3
.page_title
New Project
%hr
.project-edit-errors
=
render
'projects/errors'
.project-edit-content
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment