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
2b12520d
Commit
2b12520d
authored
Oct 04, 2017
by
Tim Zallmann
Committed by
Phil Hughes
Oct 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Profile Events Helper to use SVG Sprite Icons
parent
88959e87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+11
-9
No files found.
app/helpers/events_helper.rb
View file @
2b12520d
module
EventsHelper
module
EventsHelper
ICON_NAMES_BY_EVENT_TYPE
=
{
ICON_NAMES_BY_EVENT_TYPE
=
{
'pushed to'
=>
'icon_commit'
,
'pushed to'
=>
'commit'
,
'pushed new'
=>
'icon_commit'
,
'pushed new'
=>
'commit'
,
'created'
=>
'icon_status_open'
,
'created'
=>
'status_open'
,
'opened'
=>
'icon_status_open'
,
'opened'
=>
'status_open'
,
'closed'
=>
'icon_status_closed'
,
'closed'
=>
'status_closed'
,
'accepted'
=>
'icon_code_fork'
,
'accepted'
=>
'fork'
,
'commented on'
=>
'icon_comment_o'
,
'commented on'
=>
'comment'
,
'deleted'
=>
'icon_trash_o'
'deleted'
=>
'remove'
,
'imported'
=>
'import'
,
'joined'
=>
'users'
}.
freeze
}.
freeze
def
link_to_author
(
event
,
self_added:
false
)
def
link_to_author
(
event
,
self_added:
false
)
...
@@ -197,7 +199,7 @@ module EventsHelper
...
@@ -197,7 +199,7 @@ module EventsHelper
def
icon_for_event
(
note
)
def
icon_for_event
(
note
)
icon_name
=
ICON_NAMES_BY_EVENT_TYPE
[
note
]
icon_name
=
ICON_NAMES_BY_EVENT_TYPE
[
note
]
custom
_icon
(
icon_name
)
if
icon_name
sprite
_icon
(
icon_name
)
if
icon_name
end
end
def
icon_for_profile_event
(
event
)
def
icon_for_profile_event
(
event
)
...
...
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