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:
commit
f30ab49433
3 changed files with 12 additions and 20 deletions
|
@ -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
|
||||
|
|
10
app/views/projects/blob/_header_content.html.haml
Normal file
10
app/views/projects/blob/_header_content.html.haml
Normal 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)
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue