OSDN Git Service

Notes votes: use icons instead of borders. Removed unnecessary padding
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 18 Sep 2012 06:17:55 +0000 (09:17 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 18 Sep 2012 06:17:55 +0000 (09:17 +0300)
app/assets/stylesheets/common.scss
app/assets/stylesheets/sections/notes.scss
app/views/notes/_note.html.haml

index fda8d54..ffabdf8 100644 (file)
@@ -158,6 +158,18 @@ span.update-author {
       padding: 6px;
     }
   }
+
+  &.label-success {
+    background-color: #8D8;
+    color: #333;
+    text-shadow: 0 1px 1px white;
+  }
+
+  &.label-error {
+    background-color: #D88;
+    color: #333;
+    text-shadow: 0 1px 1px white;
+  }
 }
 
 .event_label {
index e14a082..267a9b4 100644 (file)
 
 /* 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;
-  }
+  padding: 8px 0;
 }
 
 .notes-status {
index 23145f1..5234e55 100644 (file)
@@ -6,8 +6,16 @@
       %cite.cgray
         = time_ago_in_words(note.updated_at)
         ago
+    - if note.upvote?
+      %span.label.label-success
+        %i.icon-thumbs-up
+        \+1
+    - if note.downvote?
+      %span.label.label-error
+        %i.icon-thumbs-down
+        \-1
     - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
-      = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do 
+      = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do
         %i.icon-trash
         Remove