summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-01 13:54:55 +0100
committerDouwe Maan <douwe@selenight.nl>2016-07-24 13:10:38 -0600
commit70b46b280c07807c4df0a0c2c8b71d725a60f8c7 (patch)
tree3e3e60997034bedd77a0d1b64817563ebadce936 /app/views
parentaf5fc6e24ce3e2f5fa42d6764a780afe0d6471d9 (diff)
downloadgitlab-ce-70b46b280c07807c4df0a0c2c8b71d725a60f8c7.tar.gz
Resolve all comments button
Store that manages the state of each button
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/merge_requests/_show.html.haml10
-rw-r--r--app/views/projects/notes/_note.html.haml4
2 files changed, 11 insertions, 3 deletions
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index f7f7182b2a0..de6d3d52936 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -44,7 +44,15 @@
= succeed '.' do
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
- - if @commits_count.nonzero?
+ #resolve-all-app{ "v-cloak" => true }
+ %resolve-all{ "inline-template" => true }
+ .line-resolve-all{ "v-show" => "commentsCount > 0" }
+ %button.btn.btn-gray{ type: "button", "aria-label" => "Resolve all", "v-on:click" => "updateAll" }
+ {{ buttonText }}
+ %span.line-resolve-text
+ {{ resolved }}/{{ commentsCount }} comments resolved
+
+ - if @commits.nonzero?
%ul.merge-request-tabs.nav-links.no-top.no-bottom
%li.notes-tab
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: 'div#notes', action: 'notes', toggle: 'tab'} do
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 9b1eb8545e5..beaae53992d 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -21,8 +21,8 @@
- if access and not note.system
%span.note-role.hidden-xs= access
- unless note.system
- %line-btn{ ":note-id" => note.id, ":resolved" => "false", "inline-template" => true }
- %button.note-action-button.line-resolve-btn{ type: "button", "v-bind:class" => "{ 'is-active': resolved }", "v-bind:aria-label" => "buttonText", "v-on:click" => "resolve", "v-bind:title" => "buttonText" }
+ %resolve-btn{ ":note-id" => note.id, ":resolved" => "false", "inline-template" => true }
+ %button.note-action-button.line-resolve-btn{ type: "button", "v-bind:class" => "{ 'is-active': isResolved }", "v-bind:aria-label" => "buttonText", "v-on:click" => "resolve", "v-bind:title" => "buttonText" }
= icon("check")
- if current_user and not note.system
= link_to '#', title: 'Award Emoji', class: 'note-action-button note-emoji-button js-add-award js-note-emoji', data: { position: 'right' } do