diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /app/views/shared/issuable/_close_reopen_draft_report_toggle.html.haml | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'app/views/shared/issuable/_close_reopen_draft_report_toggle.html.haml')
-rw-r--r-- | app/views/shared/issuable/_close_reopen_draft_report_toggle.html.haml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/views/shared/issuable/_close_reopen_draft_report_toggle.html.haml b/app/views/shared/issuable/_close_reopen_draft_report_toggle.html.haml new file mode 100644 index 00000000000..bdb53dfe323 --- /dev/null +++ b/app/views/shared/issuable/_close_reopen_draft_report_toggle.html.haml @@ -0,0 +1,37 @@ +- display_issuable_type = issuable_display_type(issuable) +- button_action_class = issuable.closed? ? 'btn-default' : 'btn-warning btn-warning-secondary' +- button_class = "btn gl-button #{!issuable.closed? && 'js-draft-toggle-button'}" +- toggle_class = "btn gl-button dropdown-toggle" + +.float-left.btn-group.gl-ml-3.issuable-close-dropdown.d-none.d-md-inline-flex.js-issuable-close-dropdown + = link_to issuable.closed? ? reopen_issuable_path(issuable) : toggle_draft_issuable_path(issuable), method: :put, class: "#{button_class} #{button_action_class}" do + - if issuable.closed? + = _('Reopen') + = display_issuable_type + - else + = issuable.work_in_progress? ? _('Mark as ready') : _('Mark as draft') + + - if !issuable.closed? || !issuable_author_is_current_user(issuable) + = button_tag type: 'button', class: "#{toggle_class} #{button_action_class}", data: { 'toggle' => 'dropdown' } do + %span.sr-only= _('Toggle dropdown') + = sprite_icon "angle-down", size: 12 + + %ul.js-issuable-close-menu.dropdown-menu.dropdown-menu-right + - if issuable.open? + %li + = link_to close_issuable_path(issuable), method: :put do + .description + %strong.title + = _('Close') + = display_issuable_type + + - unless issuable_author_is_current_user(issuable) + - unless issuable.closed? + %li.divider.droplab-item-ignore + + %li.report-item + %a.report-abuse-link{ href: new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)) } + .description + %strong.title= _('Report abuse') + %p.text + = _('Report %{display_issuable_type} that are abusive, inappropriate or spam.') % { display_issuable_type: display_issuable_type.pluralize } |