diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-12-23 14:29:50 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-12-23 14:29:50 +0300 |
commit | a84ecf0e2eac113bfb30290f6869b12f65e0b0d3 (patch) | |
tree | 19d86ee8bc8f4667169ae6709c32a815d20fb3ab /app | |
parent | 7a519bc1e2e904d46b5d6de824f1421ab8c3b0f3 (diff) |
Fix close/reopen buttons
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/framework/buttons.scss | 19 | ||||
-rw-r--r-- | app/views/projects/issues/_discussion.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/issues/show.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/notes/_form.html.haml | 2 |
4 files changed, 11 insertions, 22 deletions
diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index 9b7463c9476..97a94638847 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -77,7 +77,7 @@ &.btn-sm { padding: 5px 10px; } - + &.btn-nr { padding: 7px 10px; } @@ -101,11 +101,12 @@ &.btn-primary { @include btn-blue-medium; } - + &.btn-info { @include btn-blue; } + &.btn-close, &.btn-warning { @include btn-orange; } @@ -120,20 +121,8 @@ float: right; } - &.btn-close { - color: $gl-danger; - border-color: $gl-danger; - &:hover { - color: #B94A48; - } - } - &.btn-reopen { - color: $gl-success; - border-color: $gl-success; - &:hover { - color: #468847; - } + /* should be same as parent class for now */ } &.btn-grouped { diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 82322ba1549..86d3dc546ba 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,9 +1,9 @@ - content_for :note_actions do - if can?(current_user, :update_issue, @issue) - if @issue.closed? - = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-nr btn-success js-note-target-reopen', title: 'Reopen Issue' + = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue' - else - = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-nr btn-warning js-note-target-close', title: 'Close Issue' + = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close js-note-target-close', title: 'Close Issue' #notes = render 'projects/notes/notes_with_form' diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index b0e0fd6b838..e0fba46c732 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -23,16 +23,16 @@ .pull-right - if can?(current_user, :create_issue, @project) - = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped btn-success', title: 'New Issue', id: 'new_issue_link' do + = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-grouped new-issue-link btn-success', title: 'New Issue', id: 'new_issue_link' do = icon('plus') New Issue - if can?(current_user, :update_issue, @issue) - if @issue.closed? - = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-success' + = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen' - else - = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-warning', title: 'Close Issue' + = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close', title: 'Close Issue' - = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-nr btn-grouped btn-default' do + = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do = icon('pencil-square-o') Edit diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index df4f5ebb0f8..88e711ab534 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -13,6 +13,6 @@ .error-alert .note-form-actions.clearfix - = f.submit 'Add Comment', class: "btn btn-nr btn-success comment-btn btn-grouped js-comment-button" + = f.submit 'Add Comment', class: "btn btn-create comment-btn btn-grouped js-comment-button" = yield(:note_actions) %a.btn.btn-cancel.js-close-discussion-note-form Cancel |