summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/pages/notes.scss38
-rw-r--r--app/views/projects/notes/_note.html.haml25
2 files changed, 41 insertions, 22 deletions
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index cb0a1e5129c..f57e3f7d7cf 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -575,18 +575,36 @@ ul.notes {
// Merge request notes in diffs
.diff-file {
- // Diff is side by side
- .notes_content.parallel .note-header .note-headline-light {
- display: block;
- position: relative;
- }
- // Diff is inline
- .notes_content .note-header .note-headline-light {
- display: inline-block;
- position: relative;
- @media (max-width: $screen-md-min) {
+ .note-header {
+ display: flex;
+
+ @media (max-width: $screen-xs-max) {
display: block;
}
+
+ .note-actions {
+ position: relative;
+
+ @media (max-width: $screen-xs-max) {
+ margin: 5px 0 0;
+ right: inherit;
+ }
+ }
+
+ .note-messages {
+ flex: 1;
+
+ @media (max-width: $screen-xs-max) {
+ flex-basis: 100%;
+ }
+ }
}
+
+ .note-body {
+ @media (max-width: $screen-xs-max) {
+ clear: both;
+ }
+ }
+
}
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 26473cf65e3..2928f041f68 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -9,19 +9,20 @@
= image_tag avatar_icon(note.author), alt: '', class: 'avatar s40'
.timeline-content
.note-header
- %a.visible-xs{ href: user_path(note.author) }
- = note.author.to_reference
- = link_to_member(note.project, note.author, avatar: false, extra_class: 'hidden-xs hidden-sm')
- .note-headline-light
- %span.hidden-xs
+ .note-messages
+ %a.visible-xs{ href: user_path(note.author) }
= note.author.to_reference
- - unless note.system
- commented
- - if note.system
- %span.system-note-message
- = note.redacted_note_html
- %a{ href: "##{dom_id(note)}" }
- = time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note-created-ago')
+ = link_to_member(note.project, note.author, avatar: false, extra_class: 'hidden-xs hidden-sm')
+ .note-headline-light
+ %span.hidden-xs
+ = note.author.to_reference
+ - unless note.system
+ commented
+ - if note.system
+ %span.system-note-message
+ = note.redacted_note_html
+ %a{ href: "##{dom_id(note)}" }
+ = time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note-created-ago')
- unless note.system?
.note-actions
- access = note_max_access_for_user(note)