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
7 years ago
by
Tim Zallmann
Committed by
Phil Hughes
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Profile Events Helper to use SVG Sprite Icons
parent
88959e87
Changes
1
Hide 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
ICON_NAMES_BY_EVENT_TYPE
=
{
'pushed to'
=>
'icon_commit'
,
'pushed new'
=>
'icon_commit'
,
'created'
=>
'icon_status_open'
,
'opened'
=>
'icon_status_open'
,
'closed'
=>
'icon_status_closed'
,
'accepted'
=>
'icon_code_fork'
,
'commented on'
=>
'icon_comment_o'
,
'deleted'
=>
'icon_trash_o'
'pushed to'
=>
'commit'
,
'pushed new'
=>
'commit'
,
'created'
=>
'status_open'
,
'opened'
=>
'status_open'
,
'closed'
=>
'status_closed'
,
'accepted'
=>
'fork'
,
'commented on'
=>
'comment'
,
'deleted'
=>
'remove'
,
'imported'
=>
'import'
,
'joined'
=>
'users'
}.
freeze
def
link_to_author
(
event
,
self_added:
false
)
...
...
@@ -197,7 +199,7 @@ module EventsHelper
def
icon_for_event
(
note
)
icon_name
=
ICON_NAMES_BY_EVENT_TYPE
[
note
]
custom
_icon
(
icon_name
)
if
icon_name
sprite
_icon
(
icon_name
)
if
icon_name
end
def
icon_for_profile_event
(
event
)
...
...
This diff is collapsed.
Click to expand it.
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