views for commit

This commit is contained in:
Timothy N. Tsvetkov 2011-03-10 16:39:49 +03:00
parent 5d4ca333da
commit 11ab8c0f39
5 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,4 @@
.commit_row
= render :partial => "commit_pane", :locals => { :commit => commit }
.row= link_to commit.message, commit_path(@platform.name, @project.name, commit.id)

View File

@ -0,0 +1,7 @@
= render :partial => "committer_pane", :locals => { :commit => commit }
.row.tree Tree: #{link_to @commit.tree.id, tree_path(@platform.name, @project.name, commit.tree.id)}
.row.parents
- commit.parents.each do |parent|
Parent: #{link_to parent, commit_path(@platform.name, @project.name, parent)}

View File

@ -0,0 +1,5 @@
- if @commit.committer != @commit.author
.row.author Author: #{@commit.author}, #{commit_date(@commit.authored_date)}
.row.committer Committer: #{@commit.committer}, #{commit_date(@commit.committed_date)}
- else
.row.author #{@commit.author}, #{commit_date(@commit.committed_date)}

View File

@ -0,0 +1,4 @@
- if @path.present?
%h3 Commits for: #{@path}
= render :partial => "commit", :collection => @commits

View File

@ -0,0 +1,14 @@
%h3 Commit: #{@commit.id}
= render :partial => "commit_pane", :locals => { :commit => @commit}
#{link_to "raw diff", commit_path(@project.title, @repository.name, @commit.id, :diff)} | #{link_to "patch", commit_path(@project.title, @repository.name, @commit.id, :patch)}
.row.commit_message
%code!= format_commit_message(@commit.message)
.row.commit_stats
!= render_commit_stats(@commit.stats)
- @commit.diffs.each do |diff|
!= render_inline_diff(@commit, diff)