diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2018-12-27 17:46:38 +1100 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-09-11 14:53:13 +1000 |
commit | 0e31b424fb9a07ea5ba8f6d864ff726533e8ba85 (patch) | |
tree | ac192e1c9f50ed114e332f81303621a1134af49b /app/views/snippets | |
parent | bd7e1e554b3d68f31bc1f8b23e568a9950d597e0 (diff) | |
download | gitlab-ce-13235-secret-snippets.tar.gz |
Add Secret support for Snippets13235-secret-snippets
Snippets can now be created as type Secret which
are non-searched Snippets that can accessed
publicly if the correct secret_word is known.
Diffstat (limited to 'app/views/snippets')
-rw-r--r-- | app/views/snippets/_snippets_scope_menu.html.haml | 7 | ||||
-rw-r--r-- | app/views/snippets/show.html.haml | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/views/snippets/_snippets_scope_menu.html.haml b/app/views/snippets/_snippets_scope_menu.html.haml index c312226dd6c..1eb34842881 100644 --- a/app/views/snippets/_snippets_scope_menu.html.haml +++ b/app/views/snippets/_snippets_scope_menu.html.haml @@ -24,6 +24,13 @@ %span.badge.badge-pill = subject.snippets.are_internal.count + - if include_secret + %li{ class: active_when(params[:scope] == "are_secret") } + = link_to subject_snippets_path(subject, scope: 'are_secret') do + Secret + %span.badge.badge-pill + = subject.snippets.are_secret.count + %li{ class: active_when(params[:scope] == "are_public") } = link_to subject_snippets_path(subject, scope: 'are_public') do = _("Public") diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 36b4e00e8d5..afa56465258 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -10,7 +10,7 @@ %article.file-holder.snippet-file-content = render 'shared/snippets/blob' - .row-content-block.top-block.content-component-block + .row-content-block.top-block.content-component-block.append-bottom-10 = render 'award_emoji/awards_block', awardable: @snippet, inline: true #notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => false |