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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
590c84c7
Commit
590c84c7
authored
Jun 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix determine of layout for group/team
parent
08e52a56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+10
-3
app/controllers/teams_controller.rb
app/controllers/teams_controller.rb
+10
-2
No files found.
app/controllers/groups_controller.rb
View file @
590c84c7
class
GroupsController
<
ApplicationController
respond_to
:html
layout
'group'
,
except:
[
:new
,
:create
]
before_filter
:group
,
except:
[
:new
,
:create
]
# Authorize
...
...
@@ -12,7 +10,8 @@ class GroupsController < ApplicationController
# Load group projects
before_filter
:projects
,
except:
[
:new
,
:create
]
layout
'navless'
,
only:
[
:new
,
:create
]
layout
:determine_layout
before_filter
:set_title
,
only:
[
:new
,
:create
]
def
new
...
...
@@ -141,4 +140,12 @@ class GroupsController < ApplicationController
def
set_title
@title
=
'New Group'
end
def
determine_layout
if
[
:new
,
:create
].
include?
(
action_name
.
to_sym
)
'navless'
else
'group'
end
end
end
app/controllers/teams_controller.rb
View file @
590c84c7
...
...
@@ -6,8 +6,8 @@ class TeamsController < ApplicationController
before_filter
:user_team
,
except:
[
:new
,
:create
]
layout
'user_team'
,
except:
[
:new
,
:create
]
layout
'navless'
,
only:
[
:new
,
:create
]
layout
:determine_layout
before_filter
:set_title
,
only:
[
:new
,
:create
]
def
show
...
...
@@ -82,4 +82,12 @@ class TeamsController < ApplicationController
def
set_title
@title
=
'New Team'
end
def
determine_layout
if
[
:new
,
:create
].
include?
(
action_name
.
to_sym
)
'navless'
else
'user_team'
end
end
end
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