gitlab-org--gitlab-foss/app/views/shared/snippets/_blob.html.haml
2017-03-16 09:37:22 -06:00

29 lines
918 B
Text

.js-file-title.file-title-flex-parent
.file-header-content
= blob_icon @snippet.mode, @snippet.path
%strong.file-title-name
= @snippet.path
= copy_file_path_button(@snippet.path)
.file-actions.hidden-xs
.btn-group{ role: "group" }<
= copy_blob_content_button(@snippet)
= open_raw_file_button(raw_path)
- if defined?(download_path) && download_path
= link_to icon('download'), download_path, class: "btn btn-sm has-tooltip", title: 'Download', data: { container: 'body' }
- if @snippet.content.empty?
.file-content.code
.nothing-here-block Empty file
- else
- if markup?(@snippet.file_name)
.file-content.wiki
- if gitlab_markdown?(@snippet.file_name)
= preserve(markdown_field(@snippet, :content))
- else
= render_markup(@snippet.file_name, @snippet.content)
- else
= render 'shared/file_highlight', blob: @snippet