Merge branch 'dm-blob-header-content' into 'master'

Extract common parts of snippet and blob pages into partial

See merge request !11049
This commit is contained in:
Robert Speicher 2017-05-03 14:30:34 +00:00
commit f30ab49433
3 changed files with 12 additions and 20 deletions

View File

@ -1,15 +1,6 @@
- blame = local_assigns.fetch(:blame, false)
.js-file-title.file-title-flex-parent
.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)
= render 'projects/blob/header_content', blob: blob
.file-actions.hidden-xs
= render 'projects/blob/viewer_switcher', blob: blob unless blame

View File

@ -0,0 +1,10 @@
.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)

View File

@ -1,15 +1,6 @@
- blob = @snippet.blob
.js-file-title.file-title-flex-parent
.file-header-content
= 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)
= render 'projects/blob/header_content', blob: blob
.file-actions.hidden-xs
= render 'projects/blob/viewer_switcher', blob: blob