Commit f0750b91 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add close button to MR comment form

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 555c25e6
...@@ -118,7 +118,6 @@ ...@@ -118,7 +118,6 @@
@extend .btn-primary; @extend .btn-primary;
} }
&.btn-close,
&.btn-remove { &.btn-remove {
@extend .btn-danger; @extend .btn-danger;
} }
...@@ -143,6 +142,22 @@ ...@@ -143,6 +142,22 @@
line-height: 16px; line-height: 16px;
margin: 2px; margin: 2px;
} }
&.btn-close {
color: #B94A48;
font-weight: bold;
&:hover {
color: #B94A48;
}
}
&.btn-reopen {
color: #468847;
font-weight: bold;
&:hover {
color: #468847;
}
}
} }
.btn-block { .btn-block {
......
...@@ -65,21 +65,6 @@ ...@@ -65,21 +65,6 @@
} }
} }
.btn.close_issue {
color: #B94A48;
font-weight: bold;
&:hover {
color: #B94A48;
}
}
.btn.reopen_issue {
color: #468847;
font-weight: bold;
&:hover {
color: #468847;
}
}
@media (min-width: 800px) { .issues_filters select { width: 160px; } } @media (min-width: 800px) { .issues_filters select { width: 160px; } }
@media (min-width: 1200px) { .issues_filters select { width: 220px; } } @media (min-width: 1200px) { .issues_filters select { width: 220px; } }
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
New Issue New Issue
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
= link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue" = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped btn-reopen"
- else - else
= link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue" = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped btn-close", title: "Close Issue"
= link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
%i.icon-edit %i.icon-edit
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
- content_for :note_actions do - content_for :note_actions do
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
= link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue" = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped btn-reopen"
- else - else
= link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue" = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped btn-close", title: "Close Issue"
.participants .participants
%cite.cgray #{@issue.participants.count} participants %cite.cgray #{@issue.participants.count} participants
......
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
%i.icon-list-alt %i.icon-list-alt
Diff Diff
- content_for :note_actions do
- if can?(current_user, :modify_merge_request, @merge_request)
- unless @merge_request.closed?
= link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn grouped btn-close", title: "Close merge request"
.notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
= render "projects/notes/notes_with_form" = render "projects/notes/notes_with_form"
.diffs.tab-content .diffs.tab-content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment