summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-08 17:06:04 -0600
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-08 20:52:08 -0600
commit2352a392e5fc5a0a8e7461a9920f5b3c89d819c8 (patch)
tree621d32264701ebe4c52c7a86c59a97afd9c70c22
parentb57027f2a5e3b5b5c786ed72ad8d2c8d16725b17 (diff)
downloadgitlab-ce-2352a392e5fc5a0a8e7461a9920f5b3c89d819c8.tar.gz
Align file header items while keeping collapse functionality
-rw-r--r--app/assets/stylesheets/framework/files.scss14
-rw-r--r--app/assets/stylesheets/pages/diff.scss3
-rw-r--r--app/views/projects/diffs/_file.html.haml3
3 files changed, 16 insertions, 4 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index db1c8da06d0..c2dfa55b511 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -236,17 +236,27 @@ span.idiff {
.file-title-flex-parent {
display: flex;
align-items: center;
+ justify-content:space-between;
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;
+ .file-header-content {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+ padding-right: 30px;
+ position: relative;
+ }
+
+ .btn-clipboard {
+ position: absolute;
+ right: 0;
+ }
+
+ a {
color: $gl-text-color;
}
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 8b784c2a439..92d7772da57 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -34,7 +34,8 @@
}
}
- .file-title {
+ .file-title,
+ .file-title-flex-parent {
cursor: pointer;
a:hover {
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index cb5a83ae843..0232a09b4a8 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -1,7 +1,8 @@
- 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) }
.js-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}"
+ .file-header-content
+ = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "##{file_hash}"
- unless diff_file.submodule?
.file-actions.hidden-xs