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
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
Show 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
...
@@ -126,6 +126,10 @@ module ApplicationHelper
Gitlab
::
Theme
.
css_class_by_id
(
current_user
.
try
(
:theme_id
))
Gitlab
::
Theme
.
css_class_by_id
(
current_user
.
try
(
:theme_id
))
end
end
def
user_color_scheme_class
current_user
.
dark_scheme
?
:black
:
:white
end
def
show_last_push_widget?
(
event
)
def
show_last_push_widget?
(
event
)
event
&&
event
&&
event
.
last_push_to_non_root?
&&
event
.
last_push_to_non_root?
&&
...
...
app/views/snippets/_blob.html.haml
View file @
184a9eca
...
@@ -6,8 +6,7 @@
...
@@ -6,8 +6,7 @@
=
link_to
"raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn very_small"
,
target:
"_blank"
=
link_to
"raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn very_small"
,
target:
"_blank"
.file_content.code
.file_content.code
-
unless
@snippet
.
content
.
empty?
-
unless
@snippet
.
content
.
empty?
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
"white"
}
%div
{
class:
user_color_scheme_class
}
:preserve
=
raw
@snippet
.
colorize
(
formatter: :gitlab
)
#{
raw
@snippet
.
colorize
(
formatter: :gitlab
)
}
-
else
-
else
%p
.nothing_here_message
Empty file
%p
.nothing_here_message
Empty file
app/views/tree/blob/_text.html.haml
View file @
184a9eca
...
@@ -8,8 +8,7 @@
...
@@ -8,8 +8,7 @@
-
else
-
else
.file_content.code
.file_content.code
-
unless
blob
.
empty?
-
unless
blob
.
empty?
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
"white"
}
%div
{
class:
user_color_scheme_class
}
=
preserve
do
=
raw
blob
.
colorize
(
formatter: :gitlab
)
=
raw
blob
.
colorize
(
formatter: :gitlab
)
-
else
-
else
%p
.nothing_here_message
Empty file
%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