Skip to content
Snippets Groups Projects
Commit b8113334 authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Highlight voting notes for issues and merge requests

parent 0546b9c6
No related branches found
No related tags found
1 merge request!1468Update votes when adding notes
Loading
Loading
@@ -81,6 +81,19 @@
border-top: 1px solid #eee;
}
 
/* mark vote notes */
.voting_notes .note {
padding: 8px 0 8px 12px;
&.upvote {
padding-left: 8px;
border-left: 4px solid #468847;
}
&.downvote {
padding-left: 8px;
border-left: 4px solid #B94A48;
}
}
.notes-status {
margin: 18px;
}
Loading
Loading
Loading
Loading
@@ -6,4 +6,12 @@ module NotesHelper
def loading_new_notes?
params[:loading_new].present?
end
def note_vote_class(note)
if note.upvote?
"vote upvote"
elsif note.downvote?
"vote downvote"
end
end
end
Loading
Loading
@@ -61,4 +61,4 @@
= markdown @issue.description
 
 
.issue_notes#notes= render "notes/notes_with_form", tid: @issue.id, tt: "issue"
.issue_notes.voting_notes#notes= render "notes/notes_with_form", tid: @issue.id, tt: "issue"
Loading
Loading
@@ -15,7 +15,7 @@
%i.icon-list-alt
Diff
 
.merge_request_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
.merge_request_notes.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
= render("notes/notes_with_form", tid: @merge_request.id, tt: "merge_request")
.merge-request-diffs
= render "merge_requests/show/diffs" if @diffs
Loading
Loading
%li{id: dom_id(note), class: "note"}
%li{id: dom_id(note), class: "note #{note_vote_class(note)}"}
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
%div.note-author
%strong= note.author_name
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment