Add BlobController, remove Refs#blob

This commit is contained in:
Robert Speicher 2012-09-17 13:49:57 -04:00
parent 39c6579306
commit 576cec6c67
8 changed files with 83 additions and 65 deletions

View file

@ -18,7 +18,7 @@
= @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 "raw", project_blob_path(@project, @id), 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, @id), class: "btn very_small"
.file_content.blame

View file

@ -24,7 +24,7 @@
%i.icon-file
%span{id: "#{diff.old_path}"}= diff.old_path
- else
= link_to project_tree_path(@project, @commit, diff.new_path) do
= link_to project_tree_path(@project, tree_join(@commit.id, diff.new_path)) do
%i.icon-file
%span{id: "#{diff.new_path}"}= diff.new_path
%br/

View file

@ -5,8 +5,8 @@
= name.force_encoding('utf-8')
%small #{file.mode}
%span.options
= link_to "raw", blob_project_ref_path(@project, @ref, path: @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 "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank"
= link_to "history", project_commits_path(@project, path: @path, ref: @ref), class: "btn very_small"
= link_to "blame", project_blame_path(@project, @id), class: "btn very_small"
- if file.text?
- if gitlab_markdown?(name)
@ -32,7 +32,7 @@
- else
.file_content.blob_file
%center
= link_to blob_project_ref_path(@project, @ref, path: params[:path]) do
= link_to project_blob_path(@project, @id) do
%div.padded
%br
= image_tag "download.png", width: 64