From 0e31b424fb9a07ea5ba8f6d864ff726533e8ba85 Mon Sep 17 00:00:00 2001 From: Ash McKenzie Date: Thu, 27 Dec 2018 17:46:38 +1100 Subject: Add Secret support for 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. --- app/views/snippets/_snippets_scope_menu.html.haml | 7 +++++++ app/views/snippets/show.html.haml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'app/views/snippets') 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 -- cgit v1.2.1