view for git blobs

This commit is contained in:
Timothy N. Tsvetkov 2011-03-10 16:47:42 +03:00
parent d3e701f4ad
commit d564e4b145
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,25 @@
= render :partial => "commits/commit", :locals => { :commit => @commit }
= link_to "Raw", raw_commit_path(@platform.name, @project.name, @commit.id, @path)
= link_to "Normal", blob_commit_path(@platform.name, @project.name, @commit.id, @path)
= link_to "History", commits_path(@platform.name, @project.name, @treeish, @path)
.row
%table{ :class => "blame" }
%thead
%tr
%td
%td
%td
%tbody
- @blame.each_with_index do |elem, index|
%tr
%td.message
.row= link_to elem[0].id, commit_path(@platform.name, @project.name, elem[0].id)
.row= elem[0].committer
.row= commit_date(elem[0].committed_date)
.row!= format_commit_message(elem[0].message)
%td.line_numbers= index
%td.code= elem[1]

View File

@ -0,0 +1,10 @@
%h2= @blob.name
.row
= link_to "Raw", raw_commit_path(@platform.name, @project.name, @commit_hash, @path)
= link_to "Blame", blame_commit_path(@platform.name, @project.name, @commit_hash, @path)
= link_to "History", commits_path(@platform.name, @project.name, @treeish, @path)
%pre
%code
= @blob.data