2017-01-05 16:07:13 -05:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2019-04-23 05:32:48 -04:00
|
|
|
- add_to_breadcrumbs _("Issues"), project_issues_path(@project)
|
2017-08-17 05:42:04 -04:00
|
|
|
- breadcrumb_title @issue.to_reference
|
2019-04-23 05:32:48 -04:00
|
|
|
- page_title "#{@issue.title} (#{@issue.to_reference})", _("Issues")
|
2015-12-24 17:03:54 -05:00
|
|
|
- page_description @issue.description
|
2018-04-16 11:09:19 -04:00
|
|
|
- page_card_attributes @issue.card_attributes
|
2020-09-25 11:09:36 -04:00
|
|
|
- if @issue.relocation_target
|
|
|
|
- page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url
|
2017-08-17 13:27:11 -04:00
|
|
|
|
2017-05-24 06:00:27 -04:00
|
|
|
- can_update_issue = can?(current_user, :update_issue, @issue)
|
2018-08-19 15:43:41 -04:00
|
|
|
- can_reopen_issue = can?(current_user, :reopen_issue, @issue)
|
2017-05-24 06:00:27 -04:00
|
|
|
- can_report_spam = @issue.submittable_as_spam_by?(current_user)
|
2018-04-10 13:49:26 -04:00
|
|
|
- can_create_issue = show_new_issue_link?(@project)
|
2020-07-27 14:09:54 -04:00
|
|
|
- related_branches_path = related_branches_project_issue_path(@project, @issue)
|
2020-09-30 05:10:11 -04:00
|
|
|
- add_page_specific_style 'page_bundles/issues'
|
2015-12-23 16:56:27 -05:00
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
= render_if_exists "projects/issues/alert_blocked", issue: @issue, current_user: current_user
|
2020-07-15 17:09:26 -04:00
|
|
|
= render "projects/issues/alert_moved_from_service_desk", issue: @issue
|
2020-04-21 11:21:10 -04:00
|
|
|
|
2017-11-28 16:35:01 -05:00
|
|
|
.detail-page-header
|
|
|
|
.detail-page-header-body
|
2019-09-18 10:18:51 -04:00
|
|
|
.issuable-status-box.status-box.status-box-issue-closed{ class: issue_status_visibility(@issue, status_box: :closed) }
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon('mobile-issue-close', css_class: 'd-block d-sm-none')
|
2019-02-15 14:05:23 -05:00
|
|
|
.d-none.d-sm-block
|
2019-09-13 09:26:31 -04:00
|
|
|
= issue_closed_text(@issue, current_user)
|
2019-09-18 10:18:51 -04:00
|
|
|
.issuable-status-box.status-box.status-box-open{ class: issue_status_visibility(@issue, status_box: :open) }
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon('issue-open-m', css_class: 'd-block d-sm-none')
|
2018-04-09 17:50:40 -04:00
|
|
|
%span.d-none.d-sm-block Open
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2016-04-01 06:55:26 -04:00
|
|
|
.issuable-meta
|
2020-07-01 14:08:50 -04:00
|
|
|
#js-issuable-header-warnings
|
2017-09-18 07:15:00 -04:00
|
|
|
= issuable_meta(@issue, @project, "Issue")
|
2016-02-29 15:13:00 -05:00
|
|
|
|
2018-05-10 15:22:56 -04:00
|
|
|
%a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
|
2020-06-22 14:08:47 -04:00
|
|
|
= sprite_icon('chevron-double-lg-left')
|
2017-11-28 16:35:01 -05:00
|
|
|
|
2020-05-29 02:08:16 -04:00
|
|
|
.detail-page-header-actions.js-issuable-actions.js-issuable-buttons{ data: { "action": "close-reopen" } }
|
2017-03-06 15:18:39 -05:00
|
|
|
.clearfix.issue-btn-group.dropdown
|
2018-05-10 15:22:56 -04:00
|
|
|
%button.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
|
2017-03-06 15:18:39 -05:00
|
|
|
Options
|
|
|
|
= icon('caret-down')
|
2018-04-17 13:18:41 -04:00
|
|
|
.dropdown-menu.dropdown-menu-right.d-lg-none.d-xl-none
|
2017-03-06 15:18:39 -05:00
|
|
|
%ul
|
2017-09-05 10:25:40 -04:00
|
|
|
- unless current_user == @issue.author
|
2017-07-03 12:00:59 -04:00
|
|
|
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
|
2017-06-07 12:42:09 -04:00
|
|
|
- if can_update_issue
|
2017-06-29 07:47:59 -04:00
|
|
|
%li= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, format: 'json'), class: "btn-close js-btn-issue-action #{issue_button_visibility(@issue, true)}", title: 'Close issue'
|
2018-08-19 15:43:41 -04:00
|
|
|
- if can_reopen_issue
|
2017-06-29 07:47:59 -04:00
|
|
|
%li= link_to 'Reopen issue', issue_path(@issue, issue: { state_event: :reopen }, format: 'json'), class: "btn-reopen js-btn-issue-action #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
|
2017-05-24 06:00:27 -04:00
|
|
|
- if can_report_spam
|
2017-06-07 12:42:09 -04:00
|
|
|
%li= link_to 'Submit as spam', mark_as_spam_project_issue_path(@project, @issue), method: :post, class: 'btn-spam', title: 'Submit as spam'
|
2018-04-10 13:49:26 -04:00
|
|
|
- if can_create_issue
|
|
|
|
- if can_update_issue || can_report_spam
|
|
|
|
%li.divider
|
2020-03-30 05:07:58 -04:00
|
|
|
%li= link_to 'New issue', new_project_issue_path(@project), id: 'new_issue_link'
|
2017-03-06 15:18:39 -05:00
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
= render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue, can_reopen: can_reopen_issue, warn_before_close: defined?(@issue.blocked?) && @issue.blocked?
|
2017-06-07 06:18:35 -04:00
|
|
|
|
2017-05-24 06:00:27 -04:00
|
|
|
- if can_report_spam
|
2018-04-09 17:36:25 -04:00
|
|
|
= link_to 'Submit as spam', mark_as_spam_project_issue_path(@project, @issue), method: :post, class: 'd-none d-sm-none d-md-block btn btn-grouped btn-spam', title: 'Submit as spam'
|
2018-04-10 13:49:26 -04:00
|
|
|
- if can_create_issue
|
2018-11-22 06:50:59 -05:00
|
|
|
= link_to new_project_issue_path(@project), class: 'd-none d-sm-none d-md-block btn btn-grouped btn-success btn-inverted', title: 'New issue', id: 'new_issue_link' do
|
2018-04-10 13:49:26 -04:00
|
|
|
New issue
|
2013-12-19 12:36:27 -05:00
|
|
|
|
2016-04-01 06:55:26 -04:00
|
|
|
.issue-details.issuable-details
|
2017-04-25 13:13:59 -04:00
|
|
|
.detail-page-description.content-block
|
2020-09-25 02:09:42 -04:00
|
|
|
#js-issuable-app{ data: { initial: issuable_initial_data(@issue).to_json} }
|
2020-09-02 08:10:35 -04:00
|
|
|
.title-container
|
|
|
|
%h2.title= markdown_field(@issue, :title)
|
2017-05-10 07:29:33 -04:00
|
|
|
- if @issue.description.present?
|
2020-09-25 08:10:00 -04:00
|
|
|
.description
|
2019-03-23 09:09:14 -04:00
|
|
|
.md= markdown_field(@issue, :description)
|
2017-04-21 16:34:11 -04:00
|
|
|
|
2017-05-18 08:24:34 -04:00
|
|
|
= edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago')
|
2015-12-17 04:34:15 -05:00
|
|
|
|
2019-12-20 16:08:00 -05:00
|
|
|
- if @issue.sentry_issue.present?
|
|
|
|
#js-sentry-error-stack-trace{ data: error_details_data(@project, @issue.sentry_issue.sentry_issue_identifier) }
|
|
|
|
|
2020-09-02 17:10:43 -04:00
|
|
|
= render 'projects/issues/design_management'
|
2020-06-30 11:08:48 -04:00
|
|
|
|
2019-04-24 04:51:43 -04:00
|
|
|
= render_if_exists 'projects/issues/related_issues'
|
|
|
|
|
2019-05-07 03:28:35 -04:00
|
|
|
#js-related-merge-requests{ data: { endpoint: expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid)), project_namespace: @project.namespace.path, project_path: @project.path } }
|
2016-04-12 09:55:54 -04:00
|
|
|
|
2019-03-11 04:52:40 -04:00
|
|
|
- if can?(current_user, :download_code, @project)
|
2020-07-27 14:09:54 -04:00
|
|
|
- add_page_startup_api_call related_branches_path
|
|
|
|
#related-branches{ data: { url: related_branches_path } }
|
2019-04-04 20:15:56 -04:00
|
|
|
-# This element is filled in using JavaScript.
|
2015-12-17 04:34:15 -05:00
|
|
|
|
2018-10-23 05:49:45 -04:00
|
|
|
.content-block.emoji-block.emoji-block-sticky
|
2020-07-09 02:09:37 -04:00
|
|
|
.row.gl-m-0.gl-justify-content-space-between
|
|
|
|
.js-noteable-awards
|
2017-05-04 04:09:21 -04:00
|
|
|
= render 'award_emoji/awards_block', awardable: @issue, inline: true
|
2020-07-09 02:09:37 -04:00
|
|
|
.new-branch-col
|
2020-04-14 20:09:27 -04:00
|
|
|
#js-vue-sort-issue-discussions
|
2018-10-23 05:49:45 -04:00
|
|
|
#js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@issue), notes_filters: UserPreference.notes_filters.to_json } }
|
2019-06-20 13:59:02 -04:00
|
|
|
= render 'new_branch' if show_new_branch_button?
|
2015-12-17 04:34:15 -05:00
|
|
|
|
2020-09-02 17:10:43 -04:00
|
|
|
= render 'projects/issues/discussion'
|
2016-01-27 17:38:19 -05:00
|
|
|
|
2018-11-29 21:33:02 -05:00
|
|
|
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @issue.assignees
|