Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-23 20:47:22 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-23 20:47:22 +0400
commit2ed7cbfba4ff3c6a4cf3e72515a0375544998de0 (patch)
treeae6d7530745c80633cd993c99f7820e1452f3e1b /app/views/projects/blame
parent95791316f4037273af7b747ce1851d5f4e46933f (diff)
Move projects controllers/views in Projects module
Diffstat (limited to 'app/views/projects/blame')
-rw-r--r--app/views/projects/blame/_head.html.haml2
-rw-r--r--app/views/projects/blame/show.html.haml49
2 files changed, 51 insertions, 0 deletions
diff --git a/app/views/projects/blame/_head.html.haml b/app/views/projects/blame/_head.html.haml
new file mode 100644
index 00000000000..3a883829562
--- /dev/null
+++ b/app/views/projects/blame/_head.html.haml
@@ -0,0 +1,2 @@
+%div.tree-ref-holder
+ = render 'shared/ref_switcher', destination: 'tree', path: params[:path]
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
new file mode 100644
index 00000000000..3f68db659fc
--- /dev/null
+++ b/app/views/projects/blame/show.html.haml
@@ -0,0 +1,49 @@
+= render "head"
+
+#tree-holder.tree-holder
+ %ul.breadcrumb
+ %li
+ %i.icon-angle-right
+ = link_to project_tree_path(@project, @ref) do
+ = @project.name
+ - tree_breadcrumbs(@tree, 6) do |link|
+ \/
+ %li= link
+ .clear
+
+ .file_holder
+ .file_title
+ %i.icon-file
+ %span.file_name
+ = @blob.name
+ %small= number_to_human_size @blob.size
+ %span.options= render "projects/blob/actions"
+ .file_content.blame
+ %table
+ - current_line = 1
+ - @blame.each do |commit, lines|
+ - commit = Commit.new(commit)
+ %tr
+ %td.blame-commit
+ %span.commit
+ = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
+ &nbsp;
+ = commit_author_link(commit, avatar: true, size: 16)
+ &nbsp;
+ = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
+ %td.lines.blame-numbers
+ %pre
+ - if lines.empty?
+ = current_line
+ - current_line += 1
+ - else
+ - lines.each do |line|
+ = current_line
+ \
+ - current_line += 1
+ %td.lines
+ %pre
+ :erb
+ <% lines.each do |line| %>
+ <%= line %>
+ <% end %>