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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
184a9eca
Commit
184a9eca
authored
Nov 27, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user_color_scheme_class helper
parent
c4f3c54e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/views/snippets/_blob.html.haml
app/views/snippets/_blob.html.haml
+2
-3
app/views/tree/blob/_text.html.haml
app/views/tree/blob/_text.html.haml
+2
-3
No files found.
app/helpers/application_helper.rb
View file @
184a9eca
...
...
@@ -126,6 +126,10 @@ module ApplicationHelper
Gitlab
::
Theme
.
css_class_by_id
(
current_user
.
try
(
:theme_id
))
end
def
user_color_scheme_class
current_user
.
dark_scheme
?
:black
:
:white
end
def
show_last_push_widget?
(
event
)
event
&&
event
.
last_push_to_non_root?
&&
...
...
app/views/snippets/_blob.html.haml
View file @
184a9eca
...
...
@@ -6,8 +6,7 @@
=
link_to
"raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn very_small"
,
target:
"_blank"
.file_content.code
-
unless
@snippet
.
content
.
empty?
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
"white"
}
:preserve
#{
raw
@snippet
.
colorize
(
formatter: :gitlab
)
}
%div
{
class:
user_color_scheme_class
}
=
raw
@snippet
.
colorize
(
formatter: :gitlab
)
-
else
%p
.nothing_here_message
Empty file
app/views/tree/blob/_text.html.haml
View file @
184a9eca
...
...
@@ -8,8 +8,7 @@
-
else
.file_content.code
-
unless
blob
.
empty?
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
"white"
}
=
preserve
do
=
raw
blob
.
colorize
(
formatter: :gitlab
)
%div
{
class:
user_color_scheme_class
}
=
raw
blob
.
colorize
(
formatter: :gitlab
)
-
else
%p
.nothing_here_message
Empty file
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