Commit 3ec81bfa authored by Douwe Maan's avatar Douwe Maan

Don't show Copy contents button on Blame page

# Conflicts:
#	app/views/projects/blob/_header.html.haml
parent 453cc447
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#blob-content-holder.tree-holder #blob-content-holder.tree-holder
.file-holder .file-holder
= render "projects/blob/header", blob: @blob = render "projects/blob/header", blob: @blob, displaying_blame: true
.table-responsive.file-content.blame.code.js-syntax-highlight .table-responsive.file-content.blame.code.js-syntax-highlight
%table %table
......
- displaying_blame = local_assigns.fetch(:displaying_blame, false)
.js-file-title.file-title-flex-parent .js-file-title.file-title-flex-parent
.file-header-content .file-header-content
= blob_icon blob.mode, blob.name = blob_icon blob.mode, blob.name
...@@ -12,15 +13,15 @@ ...@@ -12,15 +13,15 @@
.file-actions.hidden-xs .file-actions.hidden-xs
.btn-group{ role: "group" }< .btn-group{ role: "group" }<
= copy_blob_content_button(blob) if blob_text_viewable?(blob) = copy_blob_content_button(blob) if !displaying_blame && blob_text_viewable?(blob)
= open_raw_file_button(namespace_project_raw_path(@project.namespace, @project, @id)) = open_raw_file_button(namespace_project_raw_path(@project.namespace, @project, @id))
= view_on_environment_button(@commit.sha, @path, @environment) if @environment = view_on_environment_button(@commit.sha, @path, @environment) if @environment
.btn-group{ role: "group" }< .btn-group{ role: "group" }<
-# only show normal/blame view links for text files -# only show normal/blame view links for text files
- if blob_text_viewable?(blob) - if blob_text_viewable?(blob)
- if current_page? namespace_project_blame_path(@project.namespace, @project, @id) - if displaying_blame
= link_to 'Normal View', namespace_project_blob_path(@project.namespace, @project, @id), = link_to 'Normal view', namespace_project_blob_path(@project.namespace, @project, @id),
class: 'btn btn-sm' class: 'btn btn-sm'
- else - else
= link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id), = link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment