Seperated resolve all button from reply button

This commit is contained in:
Phil Hughes 2016-07-14 16:55:44 +01:00 committed by Douwe Maan
parent c1fe066b4b
commit 44cb5803a1
4 changed files with 25 additions and 20 deletions

View file

@ -156,28 +156,33 @@
.discussion-reply-holder { .discussion-reply-holder {
background-color: $white-light; background-color: $white-light;
padding: 10px 16px; padding: 10px 16px;
}
}
.btn-group-justified { .discussion-with-resolve-btn {
table-layout: auto; display: table;
} width: 100%;
border-collapse: separate;
table-layout: auto;
.btn-group:first-child { .btn-group {
display: table-cell;
float: none;
width: 1%;
&:first-child {
width: 100%; width: 100%;
padding-right: 5px;
} }
.discussion-with-resolve-btn { &:last-child {
.btn-group:first-child .btn { padding-left: 5px;
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;
}
} }
} }
.btn {
width: 100%;
}
} }
.discussion-notes-count { .discussion-notes-count {

View file

@ -5,8 +5,8 @@
= render partial: "projects/notes/note", collection: discussion.notes, as: :note = render partial: "projects/notes/note", collection: discussion.notes, as: :note
.discussion-reply-holder .discussion-reply-holder
.btn-group-justified.discussion-with-resolve-btn{ role: "group" } .discussion-with-resolve-btn{ role: "group" }
.btn-group{ role: "group" } .btn-group
= link_to_reply_discussion(note) = link_to_reply_discussion(note)
.btn-group{ role: "group" } .btn-group
= render "projects/notes/discussions/resolve_all", note: note = render "projects/notes/discussions/resolve_all", note: note

View file

@ -20,7 +20,7 @@
- access = note_max_access_for_user(note) - access = note_max_access_for_user(note)
- if access and not note.system - if access and not note.system
%span.note-role.hidden-xs= access %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 } %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 .note-action-button
= icon("spin spinner", "v-show" => "loading") = icon("spin spinner", "v-show" => "loading")

View file

@ -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 } %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") = icon("spinner spin", "v-show" => "loading")
{{ buttonText }} {{ buttonText }}