Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_close_reopen_button.html.haml « issuable « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2eb96a7bc9bb35ffa3960c447ca0b87d7e469823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- is_current_user = issuable_author_is_current_user(issuable)
- display_issuable_type = issuable_display_type(issuable)
- button_method = issuable_close_reopen_button_method(issuable)
- are_close_and_open_buttons_hidden = issuable_button_hidden?(issuable, true) && issuable_button_hidden?(issuable, false)

- if is_current_user
  - if can_update
    = link_to "Close #{display_issuable_type}", close_issuable_path(issuable), method: button_method,
              class: "d-none d-sm-none d-md-block btn btn-grouped btn-close js-btn-issue-action #{issuable_button_visibility(issuable, true)}", title: "Close #{display_issuable_type}", data: { qa_selector: 'close_issue_button' }
  - if can_reopen
    = link_to "Reopen #{display_issuable_type}", reopen_issuable_path(issuable), method: button_method,
              class: "d-none d-sm-none d-md-block btn btn-grouped btn-reopen js-btn-issue-action #{issuable_button_visibility(issuable, false)}", title: "Reopen #{display_issuable_type}", data: { qa_selector: 'reopen_issue_button' }
- else
  - if can_update && !are_close_and_open_buttons_hidden
    = render 'shared/issuable/close_reopen_report_toggle', issuable: issuable
  - else
    = link_to 'Report abuse', new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)),
              class: 'd-none d-sm-none d-md-block btn btn-grouped btn-close-color', title: 'Report abuse'