diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-31 17:19:38 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-05-19 22:12:37 +0300 |
commit | 3d4d8e59077ebd491741bb737b1e2af8f8335e4a (patch) | |
tree | 51509eed2349f505370d9ff4d723c93faa769f3f /app | |
parent | 7d4f41efdee8aae424ed624a8702c9eb863ac43f (diff) |
Changed design of inline award picker to be similar to designs
# Conflicts:
# app/views/votes/_votes_block.html.haml
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/awards.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/notes.scss | 12 | ||||
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 3 | ||||
-rw-r--r-- | app/views/votes/_votes_block.html.haml | 30 |
4 files changed, 14 insertions, 33 deletions
diff --git a/app/assets/stylesheets/pages/awards.scss b/app/assets/stylesheets/pages/awards.scss index c7c8d2dda45..ef73e2f0a53 100644 --- a/app/assets/stylesheets/pages/awards.scss +++ b/app/assets/stylesheets/pages/awards.scss @@ -1,6 +1,4 @@ .awards { - line-height: 34px; - .emoji-icon { width: 20px; height: 20px; diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 411cd3cd230..012799b2265 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -309,3 +309,15 @@ ul.notes { } } } + +.note-awards { + .awards { + padding-top: 10px; + } + + .award-control { + padding-top: 2px; + padding-bottom: 2px; + font-size: 13px; + } +} diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index e11a7c52a9b..ae5aae34326 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -38,7 +38,8 @@ = markdown(note.note, pipeline: :note, cache_key: [note, "note"]) - if note_editable = render 'projects/notes/edit_form', note: note - = render 'emoji_awards/awards_block', awardable: note, inline: false + .note-awards + = render 'emoji_awards/awards_block', awardable: note, inline: false = edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true) - if note.attachment.url diff --git a/app/views/votes/_votes_block.html.haml b/app/views/votes/_votes_block.html.haml deleted file mode 100644 index ab8bb949862..00000000000 --- a/app/views/votes/_votes_block.html.haml +++ /dev/null @@ -1,30 +0,0 @@ -.awards.votes-block{data: { toggle_url: url_for([:toggle_award_emoji, @project.namespace.becomes(Namespace), @project, awardable]) }} - - awards_sort(awardable.grouped_awards).each do |emoji, awards| - %button.btn.award-control.js-emoji-btn.has-tooltip{class: (note_active_class(awards, current_user)), data: {placement: "top", original_title: emoji_author_list(awards, current_user)}} - = emoji_icon(emoji, sprite: false) - %span.award-control-text.js-counter - = awards.count - - - if current_user - %div.award-menu-holder.js-award-holder - %a.btn.award-control.js-add-award{"href" => "#"} - = icon('smile-o', {class: "award-control-icon"}) - = icon('spinner spin', {class: "award-control-icon award-control-icon-loading"}) - %span.award-control-text - Add - -- if current_user - :javascript - var getEmojisUrl = "#{emojis_path}"; - var postEmojiUrl = "#{award_toggle_namespace_project_notes_path(@project.namespace, @project)}"; - var noteableType = "#{votable.class.name.underscore}"; - var noteableId = "#{votable.id}"; - var unicodes = #{AwardEmoji.unicode.to_json}; - - window.awardsHandler = new AwardsHandler( - getEmojisUrl, - postEmojiUrl, - noteableType, - noteableId, - unicodes - ); |