summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-04-08 00:27:38 +0000
committerDouwe Maan <douwe@gitlab.com>2017-04-08 00:27:38 +0000
commit7d3f37b0b879af562dc7c499bdbfcb230ed718a4 (patch)
treed7ff1fc179830da6e9c042ee48c699938fa59113 /app/views
parenta4eeb96d31dda05fc26b5b5532d78223f1430fa5 (diff)
parent4caa9b63cc8b28000d62d4bef0d25f6996a7c5b5 (diff)
downloadgitlab-ce-7d3f37b0b879af562dc7c499bdbfcb230ed718a4.tar.gz
Merge branch 'dm-remove-copy-link-on-blame-page' into 'master'
Don't show Copy contents button on Blame page See merge request !10560
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/blame/show.html.haml2
-rw-r--r--app/views/projects/blob/_header.html.haml5
2 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index 4ad77b6266d..35885b2c7b4 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -7,7 +7,7 @@
#blob-content-holder.tree-holder
.file-holder
- = render "projects/blob/header", blob: @blob
+ = render "projects/blob/header", blob: @blob, blame: true
.table-responsive.file-content.blame.code.js-syntax-highlight
%table
diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml
index 828f8e073a9..6c7d389e707 100644
--- a/app/views/projects/blob/_header.html.haml
+++ b/app/views/projects/blob/_header.html.haml
@@ -1,3 +1,4 @@
+- blame = local_assigns.fetch(:blame, false)
.js-file-title.file-title-flex-parent
.file-header-content
= blob_icon blob.mode, blob.name
@@ -12,14 +13,14 @@
.file-actions.hidden-xs
.btn-group{ role: "group" }<
- = copy_blob_content_button(blob) if blob_text_viewable?(blob)
+ = copy_blob_content_button(blob) if !blame && blob_text_viewable?(blob)
= open_raw_file_button(namespace_project_raw_path(@project.namespace, @project, @id))
= view_on_environment_button(@commit.sha, @path, @environment) if @environment
.btn-group{ role: "group" }<
-# only show normal/blame view links for text files
- if blob_text_viewable?(blob)
- - if current_page? namespace_project_blame_path(@project.namespace, @project, @id)
+ - if blame
= link_to 'Normal view', namespace_project_blob_path(@project.namespace, @project, @id),
class: 'btn btn-sm'
- else