Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4f7811b7
Commit
4f7811b7
authored
May 02, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract common parts of snippet and blob pages into partial
parent
185fd98f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
20 deletions
+12
-20
app/views/projects/blob/_header.html.haml
app/views/projects/blob/_header.html.haml
+1
-10
app/views/projects/blob/_header_content.html.haml
app/views/projects/blob/_header_content.html.haml
+10
-0
app/views/shared/snippets/_blob.html.haml
app/views/shared/snippets/_blob.html.haml
+1
-10
No files found.
app/views/projects/blob/_header.html.haml
View file @
4f7811b7
-
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
...
...
app/views/projects/blob/_header_content.html.haml
0 → 100644
View file @
4f7811b7
.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
)
app/views/shared/snippets/_blob.html.haml
View file @
4f7811b7
-
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment