summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-14 16:55:44 +0100
committerDouwe Maan <douwe@selenight.nl>2016-07-24 13:12:59 -0600
commit44cb5803a15ebbe322ac494ff03cfd5cfea2e9dd (patch)
tree3236f8f670429116a58fb3503b02bfe3f7f95d65 /app
parentc1fe066b4b0d822950ec67179c11ca19f3de5dd6 (diff)
downloadgitlab-ce-44cb5803a15ebbe322ac494ff03cfd5cfea2e9dd.tar.gz
Seperated resolve all button from reply button
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/pages/note_form.scss35
-rw-r--r--app/views/discussions/_diff_discussion.html.haml6
-rw-r--r--app/views/projects/notes/_note.html.haml2
-rw-r--r--app/views/projects/notes/discussions/_resolve_all.html.haml2
4 files changed, 25 insertions, 20 deletions
diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss
index a355d802973..bd875b9823f 100644
--- a/app/assets/stylesheets/pages/note_form.scss
+++ b/app/assets/stylesheets/pages/note_form.scss
@@ -156,28 +156,33 @@
.discussion-reply-holder {
background-color: $white-light;
padding: 10px 16px;
+ }
+}
- .btn-group-justified {
- table-layout: auto;
- }
+.discussion-with-resolve-btn {
+ display: table;
+ width: 100%;
+ border-collapse: separate;
+ table-layout: auto;
+
+ .btn-group {
+ display: table-cell;
+ float: none;
+ width: 1%;
- .btn-group:first-child {
+ &:first-child {
width: 100%;
+ padding-right: 5px;
}
- .discussion-with-resolve-btn {
- .btn-group:first-child .btn {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- }
-
- .btn-group:last-child .btn {
- margin-left: -1px;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
- }
+ &:last-child {
+ padding-left: 5px;
}
}
+
+ .btn {
+ width: 100%;
+ }
}
.discussion-notes-count {
diff --git a/app/views/discussions/_diff_discussion.html.haml b/app/views/discussions/_diff_discussion.html.haml
index b9bc8a6304e..e59f7e6373d 100644
--- a/app/views/discussions/_diff_discussion.html.haml
+++ b/app/views/discussions/_diff_discussion.html.haml
@@ -5,8 +5,8 @@
= render partial: "projects/notes/note", collection: discussion.notes, as: :note
.discussion-reply-holder
- .btn-group-justified.discussion-with-resolve-btn{ role: "group" }
- .btn-group{ role: "group" }
+ .discussion-with-resolve-btn{ role: "group" }
+ .btn-group
= link_to_reply_discussion(note)
- .btn-group{ role: "group" }
+ .btn-group
= render "projects/notes/discussions/resolve_all", note: note
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 5f9eecf27db..456d87c6103 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -20,7 +20,7 @@
- access = note_max_access_for_user(note)
- if access and not note.system
%span.note-role.hidden-xs= access
- - if !note.system && current_user
+ - if !note.system && note.discussion_id && current_user
%resolve-btn{ ":namespace" => "'#{note.project.namespace.path}/#{note.project.path}'", ":discussion-id" => "'#{note.discussion_id}'", ":note-id" => note.id, ":resolved" => "false", "inline-template" => true, "v-ref:note_#{note.id}" => true }
.note-action-button
= icon("spin spinner", "v-show" => "loading")
diff --git a/app/views/projects/notes/discussions/_resolve_all.html.haml b/app/views/projects/notes/discussions/_resolve_all.html.haml
index e94bb743241..2a787431850 100644
--- a/app/views/projects/notes/discussions/_resolve_all.html.haml
+++ b/app/views/projects/notes/discussions/_resolve_all.html.haml
@@ -1,4 +1,4 @@
%resolve-all{ ":namespace" => "'#{note.project.namespace.path}/#{note.project.path}'", ":discussion-id" => "'#{note.discussion_id}'", "inline-template" => true, "v-cloak" => true }
- %button.btn.btn-success{ type: "button", "@click" => "resolve", ":disabled" => "loading" }
+ %button.btn.btn-default{ type: "button", "@click" => "resolve", ":disabled" => "loading" }
= icon("spinner spin", "v-show" => "loading")
{{ buttonText }}