diff options
author | Filipa Lacerda <lacerda.filipa@gmail.com> | 2017-01-23 12:33:19 +0300 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-02-09 05:52:08 +0300 |
commit | af143b3f562aadc7f7cda68722be18224b24fa33 (patch) | |
tree | 73c0e102fb78324dc7b880fd67e28b0eecf85d93 /app | |
parent | 7524406189939a1e872251f6aac4bcb5038cad1f (diff) |
Revert "Merge branch 'revert-a91ff32b' into 'master'"
This reverts merge request !8688
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/framework/files.scss | 34 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/diff.scss | 4 | ||||
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/diffs/_file_header.html.haml | 6 |
4 files changed, 42 insertions, 4 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index c51912b4ac4..db1c8da06d0 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -231,3 +231,37 @@ span.idiff { } } } + + +.file-title-flex-parent { + display: flex; + align-items: center; + background-color: $gray-light; + border-bottom: 1px solid $border-color; + padding: 10px $gl-padding; + margin: 0; + border-radius: 3px 3px 0 0; + + > a { + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: $gl-text-color; + } + + small { + margin: 0 10px 0 0; + } + + .file-actions { + white-space: nowrap; + + .btn { + padding: 0 10px; + font-size: 13px; + line-height: 28px; + display: inline-block; + } + } +} diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss index 96ba7c40634..8b784c2a439 100644 --- a/app/assets/stylesheets/pages/diff.scss +++ b/app/assets/stylesheets/pages/diff.scss @@ -37,6 +37,10 @@ .file-title { cursor: pointer; + a:hover { + text-decoration: none; + } + &:hover { background-color: $gray-normal; } diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 75885badac9..4b65d3c44c4 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -1,6 +1,6 @@ - environment = local_assigns.fetch(:environment, nil) .diff-file.file-holder{ id: file_hash, data: diff_file_html_data(project, diff_file.file_path, diff_commit.id) } - .file-title + .file-title-flex-parent = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "##{file_hash}" - unless diff_file.submodule? diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml index ddec775b789..5b09b6907ab 100644 --- a/app/views/projects/diffs/_file_header.html.haml +++ b/app/views/projects/diffs/_file_header.html.haml @@ -10,13 +10,13 @@ - if diff_file.renamed_file - old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path) - %strong + %strong.file-title-name.has-tooltip{ data: { title: old_path } } = old_path → - %strong + %strong.file-title-name.has-tooltip{ data: { title: new_path } } = new_path - else - %strong + %strong.file-title-name.has-tooltip{ data: { title: diff_file.new_path } } = diff_file.new_path - if diff_file.deleted_file deleted |