summaryrefslogtreecommitdiff
path: root/app/views/commits/show.html.haml
blob: 0d0c629da7f0b934f1f638242a6aa5233ab2c7fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.commit
  = link_to tree_project_ref_path(@project, @commit.id), :class => "btn right small" do 
    Browse Code ยป
  = image_tag gravatar_icon(@commit.author_email), :class => "avatar"
  %code= @commit.id.to_s
  %h5
    = @commit.author_name
    %small= @commit.created_at.stamp("Aug 21, 2011 9:23pm")
    - if @commit.author_name != @commit.committer_name or @commit.author_email != @commit.committer_email or @commit.authored_date != @commit.committed_date 
      –
      %cite committed by
      = @commit.committer_name
      %small= @commit.committed_date.stamp("Aug 21, 2011 9:23pm")

%hr
%pre.commit_message
  = commit_msg_with_link_to_issues(@project, @commit.safe_message)
.clear
%br

%p.cgray
  Showing #{pluralize(@commit.diffs.count, "changed file")}
= render "commits/diffs", :diffs => @commit.diffs
= render "notes/notes"
= render "notes/per_line_form"


:javascript
  $(document).ready(function(){
    $(".line_note_link").live("click", function(e) { 
      var form = $(".per_line_form");
      $(this).parent().parent().after(form);
      form.find("#note_line_code").val($(this).attr("line_code"));
      form.show();  
      return false;
    });
  });