Commit 27e36998143adca9427750fc90caec1271a4e3d0
1 parent
2d00f2df
Exists in
master
and in
4 other branches
Links +upvote buttons directly to the notes section
Showing
2 changed files
with
8 additions
and
6 deletions
Show diff stats
app/views/issues/show.html.haml
| ... | ... | @@ -15,7 +15,8 @@ |
| 15 | 15 | Edit |
| 16 | 16 | |
| 17 | 17 | - if @issue.upvotes > 0 |
| 18 | - %button.btn.success= "+#{@issue.upvotes}" | |
| 18 | + = link_to "#notes", :class => "btn success" do | |
| 19 | + +#{@issue.upvotes} | |
| 19 | 20 | |
| 20 | 21 | |
| 21 | 22 | .back_link |
| ... | ... | @@ -45,4 +46,4 @@ |
| 45 | 46 | %div= simple_format @issue.title |
| 46 | 47 | |
| 47 | 48 | |
| 48 | -.issue_notes= render "notes/notes", :tid => @issue.id, :tt => "issue" | |
| 49 | +.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue" | ... | ... |
app/views/merge_requests/show.html.haml
| ... | ... | @@ -15,11 +15,12 @@ |
| 15 | 15 | = link_to 'Reopen', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => false }, :status_only => true), :method => :put, :class => "btn" |
| 16 | 16 | - else |
| 17 | 17 | = 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" |
| 18 | - = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small" do | |
| 18 | + = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn" do | |
| 19 | 19 | Edit |
| 20 | 20 | |
| 21 | 21 | - if @merge_request.upvotes > 0 |
| 22 | - %button.btn.success= "+#{@merge_request.upvotes}" | |
| 22 | + = link_to "#notes", :class => "btn success" do | |
| 23 | + +#{@merge_request.upvotes} | |
| 23 | 24 | |
| 24 | 25 | .back_link |
| 25 | 26 | = link_to project_merge_requests_path(@project) do |
| ... | ... | @@ -65,8 +66,7 @@ |
| 65 | 66 | |
| 66 | 67 | %img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"} |
| 67 | 68 | |
| 68 | -.merge-request-notes | |
| 69 | - .merge_request_notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request" | |
| 69 | +.merge_request_notes#notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request" | |
| 70 | 70 | |
| 71 | 71 | .merge-request-diffs |
| 72 | 72 | |
| ... | ... | @@ -77,6 +77,7 @@ |
| 77 | 77 | }) |
| 78 | 78 | |
| 79 | 79 | = render "notes/per_line_form" |
| 80 | + | |
| 80 | 81 | :javascript |
| 81 | 82 | $(document).ready(function(){ |
| 82 | 83 | $(".line_note_link, .line_note_reply_link").live("click", function(e) { | ... | ... |