From 94af622c879681683c84b6537c2adea52c78b2a2 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 17 Sep 2012 13:32:17 -0400 Subject: [PATCH] Move refs/blame view to blame/show --- app/views/blame/show.html.haml | 40 ++++++++++++++++++++++++++++++++++++++++ app/views/refs/blame.html.haml | 40 ---------------------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 app/views/blame/show.html.haml delete mode 100644 app/views/refs/blame.html.haml diff --git a/app/views/blame/show.html.haml b/app/views/blame/show.html.haml new file mode 100644 index 0000000..75b8631 --- /dev/null +++ b/app/views/blame/show.html.haml @@ -0,0 +1,40 @@ += render "head" + +#tree-holder + %ul.breadcrumb + %li + %span.arrow + = link_to project_tree_path(@project, @ref) 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", project_tree_path(@project, tree_join(@ref, 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, commit) + = link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit), class: "row_title" rescue "--broken encoding" + %td.lines + = preserve do + %pre + = Gitlab::Encode.utf8 lines.join("\n") diff --git a/app/views/refs/blame.html.haml b/app/views/refs/blame.html.haml deleted file mode 100644 index 75b8631..0000000 --- a/app/views/refs/blame.html.haml +++ /dev/null @@ -1,40 +0,0 @@ -= render "head" - -#tree-holder - %ul.breadcrumb - %li - %span.arrow - = link_to project_tree_path(@project, @ref) 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", project_tree_path(@project, tree_join(@ref, 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, commit) - = link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit), class: "row_title" rescue "--broken encoding" - %td.lines - = preserve do - %pre - = Gitlab::Encode.utf8 lines.join("\n") -- libgit2 0.21.2