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