Commit 4f7811b7 authored by Douwe Maan's avatar Douwe Maan

Extract common parts of snippet and blob pages into partial

parent 185fd98f
- blame = local_assigns.fetch(:blame, false) - blame = local_assigns.fetch(:blame, false)
.js-file-title.file-title-flex-parent .js-file-title.file-title-flex-parent
.file-header-content = render 'projects/blob/header_content', blob: blob
= blob_icon blob.mode, blob.name
%strong.file-title-name
= blob.name
= copy_file_path_button(blob.path)
%small
= number_to_human_size(blob.raw_size)
.file-actions.hidden-xs .file-actions.hidden-xs
= render 'projects/blob/viewer_switcher', blob: blob unless blame = render 'projects/blob/viewer_switcher', blob: blob unless blame
......
.file-header-content
= blob_icon blob.mode, blob.name
%strong.file-title-name
= blob.name
= copy_file_path_button(blob.path)
%small
= number_to_human_size(blob.raw_size)
- blob = @snippet.blob - blob = @snippet.blob
.js-file-title.file-title-flex-parent .js-file-title.file-title-flex-parent
.file-header-content = render 'projects/blob/header_content', blob: blob
= blob_icon blob.mode, blob.path
%strong.file-title-name
= blob.path
= copy_file_path_button(blob.path)
%small
= number_to_human_size(blob.raw_size)
.file-actions.hidden-xs .file-actions.hidden-xs
= render 'projects/blob/viewer_switcher', blob: blob = render 'projects/blob/viewer_switcher', blob: blob
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment