gitlabhq/app/views/refs/blame.html.haml
Robert Speicher d6c384c20f Reduce the amount of JavaScript written in views
Seeing `:javascript` all over Views feels like a code smell. This goes a
long way towards reducing the amount of JS in views, but there's still
plenty to be done on that front.
2012-09-10 02:12:36 -04:00

40 lines
1.4 KiB
Text

= render "head"
#tree-holder
%ul.breadcrumb
%li
%span.arrow
= link_to tree_project_ref_path(@project, @ref, path: nil) do
= @project.name
- @tree.breadcrumbs(6) do |link|
\/
%li= link
.clear
.file_holder
.file_title
%i.icon-file
%span.file_name
= @tree.name
%small blame
%span.options
= link_to "raw", blob_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small", target: "_blank"
= link_to "history", project_commits_path(@project, path: params[:path], ref: @ref), class: "btn very_small"
= link_to "source", tree_file_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small"
.file_content.blame
%table
- @blame.each do |commit, lines|
- commit = Commit.new(commit)
- commit = CommitDecorator.decorate(commit)
%tr
%td.author
= image_tag gravatar_icon(commit.author_email, 16)
= commit.author_name
%td.blame_commit
 
%code= link_to commit.short_id, project_commit_path(@project, id: commit.id)
= link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, id: commit.id), class: "row_title" rescue "--broken encoding"
%td.lines
= preserve do
%pre
= Gitlab::Encode.utf8 lines.join("\n")