debian-mirror-gitlab/app/views/snippets/show.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
1.3 KiB
Text
Raw Normal View History

2021-01-29 00:20:46 +05:30
- add_page_startup_graphql_call('snippet/snippet', { ids: [@snippet.to_global_id.uri] })
- add_page_startup_graphql_call('snippet/snippet_blob_content', { ids: [@snippet.to_global_id.uri], rich: false, paths: [@snippet.file_name] })
- if @snippet.project_id?
- add_page_startup_graphql_call('snippet/project_permissions', { fullPath: @snippet.project_id })
- else
- add_page_startup_graphql_call('snippet/user_permissions')
2023-05-27 22:25:52 +05:30
- if @snippet.author != current_user
2023-06-20 00:43:36 +05:30
-# If current user is not the snippet author, then it renders with the Explore layout which doesn't have this breadcrumb.
2023-05-27 22:25:52 +05:30
- add_to_breadcrumbs _("Snippets"), explore_snippets_path
2018-03-17 18:26:18 +05:30
- breadcrumb_title @snippet.to_reference
2019-02-15 15:39:39 +05:30
- page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
2021-06-08 01:23:25 +05:30
- content_for :prefetch_asset_tags do
- webpack_preload_asset_tag('monaco', prefetch: true)
2014-09-02 18:07:02 +05:30
2023-01-13 00:05:48 +05:30
#js-snippet-view{ data: { 'snippet-gid': @snippet.to_global_id, 'report-abuse-path': snippet_report_abuse_path(@snippet), 'can-report-spam': @snippet.submittable_as_spam_by?(current_user).to_s } }
2017-08-17 22:00:37 +05:30
2022-11-25 23:54:43 +05:30
.row-content-block.top-block.content-component-block.gl-px-0.gl-py-2
2020-03-13 15:44:24 +05:30
= render 'award_emoji/awards_block', awardable: @snippet, inline: true
2017-08-17 22:00:37 +05:30
2020-03-13 15:44:24 +05:30
#notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => false