2017-07-06 10:35:07 -04:00
|
|
|
- is_current_user = issuable_author_is_current_user(issuable)
|
|
|
|
- display_issuable_type = issuable_display_type(issuable)
|
2017-07-04 09:41:26 -04:00
|
|
|
- button_method = issuable_close_reopen_button_method(issuable)
|
2017-07-03 12:00:59 -04:00
|
|
|
|
|
|
|
- if can_update && is_current_user
|
2017-09-28 07:37:29 -04:00
|
|
|
= link_to "Close #{display_issuable_type}", close_issuable_path(issuable), method: button_method,
|
2017-07-10 17:53:52 -04:00
|
|
|
class: "hidden-xs hidden-sm btn btn-grouped btn-close js-btn-issue-action #{issuable_button_visibility(issuable, true)}", title: "Close #{display_issuable_type}"
|
2017-09-28 07:37:29 -04:00
|
|
|
= link_to "Reopen #{display_issuable_type}", reopen_issuable_path(issuable), method: button_method,
|
2017-07-10 17:53:52 -04:00
|
|
|
class: "hidden-xs hidden-sm btn btn-grouped btn-reopen js-btn-issue-action #{issuable_button_visibility(issuable, false)}", title: "Reopen #{display_issuable_type}"
|
2017-07-03 12:00:59 -04:00
|
|
|
- elsif can_update && !is_current_user
|
2017-06-07 06:18:35 -04:00
|
|
|
= render 'shared/issuable/close_reopen_report_toggle', issuable: issuable
|
2017-09-05 10:25:40 -04:00
|
|
|
- else
|
2017-07-04 09:41:26 -04:00
|
|
|
= link_to 'Report abuse', new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)),
|
|
|
|
class: 'hidden-xs hidden-sm btn btn-grouped btn-close-color', title: 'Report abuse'
|