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