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
2d1fcd80
Commit
2d1fcd80
authored
Nov 18, 2015
by
Valery Sizov
Committed by
Valery Sizov
Nov 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emoji: refactoring
parent
2f6f99d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+4
-0
app/views/votes/_votes_block.html.haml
app/views/votes/_votes_block.html.haml
+1
-1
lib/award_emoji.rb
lib/award_emoji.rb
+6
-0
No files found.
app/helpers/issues_helper.rb
View file @
2d1fcd80
...
...
@@ -100,6 +100,10 @@ module IssuesHelper
list
.
join
(
", "
)
end
def
emoji_list
::
AwardEmoji
::
EMOJI_LIST
end
# Required for Gitlab::Markdown::IssueReferenceFilter
module_function
:url_for_issue
end
app/views/votes/_votes_block.html.haml
View file @
2d1fcd80
...
...
@@ -9,7 +9,7 @@
.dropdown.awards-controls
%a
#add-award
{
"data-toggle"
=>
"dropdown"
,
"data-target"
=>
"#"
,
"href"
=>
"#"
}
+
%ul
.dropdown-menu.awards-menu
-
[
"100"
,
"blush"
,
"heart"
,
"smile"
,
"rage"
,
"beers"
,
"thumbsup"
,
"disappointed"
,
"ok_hand"
,
"helicopter"
]
.
each
do
|
emoji
|
-
emoji_list
.
each
do
|
emoji
|
%li
{
"data-emoji"
=>
"#{emoji}"
}=
image_tag
url_to_emoji
(
emoji
),
height:
"20px"
,
width:
"20px"
...
...
lib/award_emoji.rb
0 → 100644
View file @
2d1fcd80
class
AwardEmoji
EMOJI_LIST
=
[
"+1"
,
"-1"
,
"100"
,
"blush"
,
"heart"
,
"smile"
,
"rage"
,
"beers"
,
"disappointed"
,
"ok_hand"
,
"helicopter"
,
"shit"
,
"airplane"
,
"alarm_clock"
,
"ambulance"
,
"anguished"
,
"two_hearts"
,
"wink"
]
end
\ No newline at end of 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