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
Léo-Paul Géneau
gitlab-ce
Commits
2d72efcd
Commit
2d72efcd
authored
Aug 26, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `count` to Themes and ColorSchemes
parent
6d43308b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
lib/gitlab/color_schemes.rb
lib/gitlab/color_schemes.rb
+5
-0
lib/gitlab/themes.rb
lib/gitlab/themes.rb
+5
-0
No files found.
lib/gitlab/color_schemes.rb
View file @
2d72efcd
...
@@ -32,6 +32,11 @@ module Gitlab
...
@@ -32,6 +32,11 @@ module Gitlab
SCHEMES
.
detect
{
|
s
|
s
.
id
==
id
}
||
default
SCHEMES
.
detect
{
|
s
|
s
.
id
==
id
}
||
default
end
end
# Returns the number of defined Schemes
def
self
.
count
SCHEMES
.
size
end
# Get the default Scheme
# Get the default Scheme
#
#
# Returns a Scheme
# Returns a Scheme
...
...
lib/gitlab/themes.rb
View file @
2d72efcd
...
@@ -37,6 +37,11 @@ module Gitlab
...
@@ -37,6 +37,11 @@ module Gitlab
THEMES
.
detect
{
|
t
|
t
.
id
==
id
}
||
default
THEMES
.
detect
{
|
t
|
t
.
id
==
id
}
||
default
end
end
# Returns the number of defined Themes
def
self
.
count
THEMES
.
size
end
# Get the default Theme
# Get the default Theme
#
#
# Returns a Theme
# Returns a Theme
...
...
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