Commit 9aaf478f10993ac134bf86546c95dbb4284f9f5f
Exists in
master
and in
4 other branches
Merge branch 'improve/preview_button' of /home/git/repositories/gitlab/gitlabhq
Showing
4 changed files
with
12 additions
and
9 deletions
Show diff stats
app/assets/stylesheets/sections/notes.scss
| @@ -130,6 +130,7 @@ ul.notes { | @@ -130,6 +130,7 @@ ul.notes { | ||
| 130 | &.notes_line { | 130 | &.notes_line { |
| 131 | text-align: center; | 131 | text-align: center; |
| 132 | padding: 10px 0; | 132 | padding: 10px 0; |
| 133 | + background: #eee; | ||
| 133 | } | 134 | } |
| 134 | &.notes_line2 { | 135 | &.notes_line2 { |
| 135 | text-align: center; | 136 | text-align: center; |
| @@ -275,10 +276,9 @@ ul.notes { | @@ -275,10 +276,9 @@ ul.notes { | ||
| 275 | 276 | ||
| 276 | // preview/edit buttons | 277 | // preview/edit buttons |
| 277 | > a { | 278 | > a { |
| 278 | - font-size: 24px; | ||
| 279 | - padding: 4px; | ||
| 280 | position: absolute; | 279 | position: absolute; |
| 281 | - right: 10px; | 280 | + right: 5px; |
| 281 | + top: 116px; | ||
| 282 | } | 282 | } |
| 283 | .note_preview { | 283 | .note_preview { |
| 284 | background: #f5f5f5; | 284 | background: #f5f5f5; |
| @@ -325,7 +325,7 @@ ul.notes { | @@ -325,7 +325,7 @@ ul.notes { | ||
| 325 | padding: 0 5px; | 325 | padding: 0 5px; |
| 326 | 326 | ||
| 327 | .note-form-option { | 327 | .note-form-option { |
| 328 | - margin-top: 10px; | 328 | + margin-top: 8px; |
| 329 | margin-left: 30px; | 329 | margin-left: 30px; |
| 330 | @extend .pull-left; | 330 | @extend .pull-left; |
| 331 | } | 331 | } |
| @@ -366,4 +366,4 @@ ul.notes { | @@ -366,4 +366,4 @@ ul.notes { | ||
| 366 | 366 | ||
| 367 | .parallel-comment { | 367 | .parallel-comment { |
| 368 | padding: 6px; | 368 | padding: 6px; |
| 369 | -} | ||
| 370 | \ No newline at end of file | 369 | \ No newline at end of file |
| 370 | +} |
app/views/projects/commits/_commit.html.haml
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | .notes_count | 7 | .notes_count |
| 8 | - notes = project.notes.for_commit_id(commit.id) | 8 | - notes = project.notes.for_commit_id(commit.id) |
| 9 | - if notes.any? | 9 | - if notes.any? |
| 10 | - %span.badge.badge-info | 10 | + %span.label.label-gray |
| 11 | %i.icon-comment | 11 | %i.icon-comment |
| 12 | = notes.count | 12 | = notes.count |
| 13 | 13 |
app/views/projects/notes/_form.html.haml
| @@ -7,10 +7,12 @@ | @@ -7,10 +7,12 @@ | ||
| 7 | = f.hidden_field :noteable_type | 7 | = f.hidden_field :noteable_type |
| 8 | 8 | ||
| 9 | .note_text_and_preview.js-toggler-container | 9 | .note_text_and_preview.js-toggler-container |
| 10 | - %a.js-note-preview-button.js-toggler-target.turn-off{ href: "javascript:;", title: "Preview", data: {url: preview_project_notes_path(@project)} } | 10 | + %a.btn.btn-primary.js-note-preview-button.js-toggler-target.turn-off{ href: "javascript:;", data: {url: preview_project_notes_path(@project)} } |
| 11 | %i.icon-eye-open | 11 | %i.icon-eye-open |
| 12 | - %a.js-note-edit-button.js-toggler-target.turn-off{ href: "javascript:;", title: "Edit" } | 12 | + Preview |
| 13 | + %a.btn.btn-primary.js-note-edit-button.js-toggler-target.turn-off{ href: "javascript:;" } | ||
| 13 | %i.icon-edit | 14 | %i.icon-edit |
| 15 | + Write | ||
| 14 | 16 | ||
| 15 | = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on' | 17 | = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on' |
| 16 | .note_preview.js-note-preview.turn-off | 18 | .note_preview.js-note-preview.turn-off |
| @@ -27,7 +29,7 @@ | @@ -27,7 +29,7 @@ | ||
| 27 | %a.btn.grouped.js-close-discussion-note-form Cancel | 29 | %a.btn.grouped.js-close-discussion-note-form Cancel |
| 28 | 30 | ||
| 29 | .note-form-option | 31 | .note-form-option |
| 30 | - %a.choose-btn.btn.btn-small.js-choose-note-attachment-button | 32 | + %a.choose-btn.btn.js-choose-note-attachment-button |
| 31 | %i.icon-paper-clip | 33 | %i.icon-paper-clip |
| 32 | %span Choose File ... | 34 | %span Choose File ... |
| 33 | | 35 | |
app/views/shared/_merge_requests.html.haml
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | - project = group[0] | 4 | - project = group[0] |
| 5 | .title | 5 | .title |
| 6 | = link_to_project project | 6 | = link_to_project project |
| 7 | + = link_to 'show all', project_merge_requests_path(project), class: 'pull-right' | ||
| 7 | %ul.well-list.mr-list | 8 | %ul.well-list.mr-list |
| 8 | - group[1].each do |merge_request| | 9 | - group[1].each do |merge_request| |
| 9 | = render 'projects/merge_requests/merge_request', merge_request: merge_request | 10 | = render 'projects/merge_requests/merge_request', merge_request: merge_request |