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
6d43308b
Commit
6d43308b
authored
Aug 26, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `Gitlab::Themes.for_user`
parent
d6a145d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
lib/gitlab/themes.rb
lib/gitlab/themes.rb
+13
-0
No files found.
lib/gitlab/themes.rb
View file @
6d43308b
...
@@ -51,6 +51,19 @@ module Gitlab
...
@@ -51,6 +51,19 @@ module Gitlab
THEMES
.
each
(
&
block
)
THEMES
.
each
(
&
block
)
end
end
# Get the Theme for the specified user, or the default
#
# user - User record
#
# Returns a Theme
def
self
.
for_user
(
user
)
if
user
by_id
(
user
.
theme_id
)
else
default
end
end
private
private
def
self
.
default_id
def
self
.
default_id
...
...
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