Commit 64e76a87aaddf76c3b3a487c5eb39e4490e4724f
1 parent
2aafd7cf
Exists in
master
and in
4 other branches
Notes votes: use icons instead of borders. Removed unnecessary padding
Showing
3 changed files
with
22 additions
and
10 deletions
Show diff stats
app/assets/stylesheets/common.scss
... | ... | @@ -158,6 +158,18 @@ span.update-author { |
158 | 158 | padding: 6px; |
159 | 159 | } |
160 | 160 | } |
161 | + | |
162 | + &.label-success { | |
163 | + background-color: #8D8; | |
164 | + color: #333; | |
165 | + text-shadow: 0 1px 1px white; | |
166 | + } | |
167 | + | |
168 | + &.label-error { | |
169 | + background-color: #D88; | |
170 | + color: #333; | |
171 | + text-shadow: 0 1px 1px white; | |
172 | + } | |
161 | 173 | } |
162 | 174 | |
163 | 175 | .event_label { | ... | ... |
app/assets/stylesheets/sections/notes.scss
... | ... | @@ -73,15 +73,7 @@ |
73 | 73 | |
74 | 74 | /* mark vote notes */ |
75 | 75 | .voting_notes .note { |
76 | - padding: 8px 0 8px 12px; | |
77 | - &.upvote { | |
78 | - padding-left: 8px; | |
79 | - border-left: 4px solid #468847; | |
80 | - } | |
81 | - &.downvote { | |
82 | - padding-left: 8px; | |
83 | - border-left: 4px solid #B94A48; | |
84 | - } | |
76 | + padding: 8px 0; | |
85 | 77 | } |
86 | 78 | |
87 | 79 | .notes-status { | ... | ... |
app/views/notes/_note.html.haml
... | ... | @@ -6,8 +6,16 @@ |
6 | 6 | %cite.cgray |
7 | 7 | = time_ago_in_words(note.updated_at) |
8 | 8 | ago |
9 | + - if note.upvote? | |
10 | + %span.label.label-success | |
11 | + %i.icon-thumbs-up | |
12 | + \+1 | |
13 | + - if note.downvote? | |
14 | + %span.label.label-error | |
15 | + %i.icon-thumbs-down | |
16 | + \-1 | |
9 | 17 | - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) |
10 | - = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do | |
18 | + = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do | |
11 | 19 | %i.icon-trash |
12 | 20 | Remove |
13 | 21 | ... | ... |