summaryrefslogtreecommitdiff
path: root/app/views/projects/snippets
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:07:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:07:48 +0000
commite72386771751fb22245bc6604fef236a2ee130cb (patch)
tree7cf54bca933159cb177d3caa2f139f87d6d30391 /app/views/projects/snippets
parentc2b98d3dbd47ab92c79c702276fe9130d9a28036 (diff)
downloadgitlab-ce-e72386771751fb22245bc6604fef236a2ee130cb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/snippets')
-rw-r--r--app/views/projects/snippets/index.html.haml3
-rw-r--r--app/views/projects/snippets/show.html.haml17
2 files changed, 11 insertions, 9 deletions
diff --git a/app/views/projects/snippets/index.html.haml b/app/views/projects/snippets/index.html.haml
index 7682d01a5a1..0ce18d83d57 100644
--- a/app/views/projects/snippets/index.html.haml
+++ b/app/views/projects/snippets/index.html.haml
@@ -8,8 +8,7 @@
- if can?(current_user, :create_project_snippet, @project)
.nav-controls
- - if can?(current_user, :create_project_snippet, @project)
- = link_to _("New snippet"), new_project_snippet_path(@project), class: "btn btn-success", title: _("New snippet")
+ = link_to _("New snippet"), new_project_snippet_path(@project), class: "btn btn-success", title: _("New snippet")
= render 'shared/snippets/list'
- else
diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml
index f495b4eaf30..768e4422206 100644
--- a/app/views/projects/snippets/show.html.haml
+++ b/app/views/projects/snippets/show.html.haml
@@ -3,13 +3,16 @@
- breadcrumb_title @snippet.to_reference
- page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
-= render 'shared/snippets/header'
+- if Feature.enabled?(:snippets_vue)
+ #js-snippet-view{ data: {'qa-selector': 'snippet_view', 'snippet-gid': @snippet.to_global_id} }
+- else
+ = render 'shared/snippets/header'
-.project-snippets
- %article.file-holder.snippet-file-content
- = render 'shared/snippets/blob'
+ .project-snippets
+ %article.file-holder.snippet-file-content
+ = render 'shared/snippets/blob'
- .row-content-block.top-block.content-component-block
- = render 'award_emoji/awards_block', awardable: @snippet, inline: true
+ .row-content-block.top-block.content-component-block
+ = render 'award_emoji/awards_block', awardable: @snippet, inline: true
- #notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => true
+ #notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => true