File: show.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (22 lines) | stat: -rw-r--r-- 1,360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- 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')
- if @snippet.author != current_user
  -# If current user is not the snippet author, then it renders with the Explore layout which doesn't have this breadcrumb.
  - add_to_breadcrumbs _("Snippets"), explore_snippets_path
- else
  - add_to_breadcrumbs _("Snippets"), dashboard_snippets_path
- breadcrumb_title @snippet.to_reference
- page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
- content_for :prefetch_asset_tags do
  - webpack_preload_asset_tag('monaco', prefetch: true)

#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 } }

.row-content-block.top-block.content-component-block.gl-px-0.gl-py-2
  = render 'award_emoji/awards_block', awardable: @snippet, inline: true

#notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => false