From 27e36998143adca9427750fc90caec1271a4e3d0 Mon Sep 17 00:00:00 2001
From: Ariejan de Vroom <ariejan@ariejan.net>
Date: Thu, 15 Mar 2012 00:56:42 +0200
Subject: [PATCH] Links +upvote buttons directly to the notes section

---
 app/views/issues/show.html.haml         | 5 +++--
 app/views/merge_requests/show.html.haml | 9 +++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml
index 4769c07507..7399697198 100644
--- a/app/views/issues/show.html.haml
+++ b/app/views/issues/show.html.haml
@@ -15,7 +15,8 @@
         Edit
 
     - if @issue.upvotes > 0
-      %button.btn.success= "+#{@issue.upvotes}"
+      = link_to "#notes", :class => "btn success" do
+        +#{@issue.upvotes}
       
 
 .back_link
@@ -45,4 +46,4 @@
   %div= simple_format @issue.title
 
 
-.issue_notes= render "notes/notes", :tid => @issue.id, :tt => "issue"
+.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue"
diff --git a/app/views/merge_requests/show.html.haml b/app/views/merge_requests/show.html.haml
index 9c60196235..77bb6120ec 100644
--- a/app/views/merge_requests/show.html.haml
+++ b/app/views/merge_requests/show.html.haml
@@ -15,11 +15,12 @@
         = link_to 'Reopen', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => false }, :status_only => true), :method => :put,  :class => "btn"
       - else
         = link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn", :title => "Close merge request"
-      = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small" do 
+      = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn" do 
         Edit
 
     - if @merge_request.upvotes > 0
-      %button.btn.success= "+#{@merge_request.upvotes}"
+      = link_to "#notes", :class => "btn success" do
+        +#{@merge_request.upvotes}
 
 .back_link
   = link_to project_merge_requests_path(@project) do 
@@ -65,8 +66,7 @@
 
     %img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
 
-.merge-request-notes
-  .merge_request_notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request"
+.merge_request_notes#notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request"
 
 .merge-request-diffs
 
@@ -77,6 +77,7 @@
   })
 
 = render "notes/per_line_form"
+
 :javascript
   $(document).ready(function(){
     $(".line_note_link, .line_note_reply_link").live("click", function(e) { 
-- 
2.30.9