2017-01-05 21:07:13 +00:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2017-08-17 09:42:04 +00:00
|
|
|
- add_to_breadcrumbs "Issues", project_issues_path(@project)
|
|
|
|
- breadcrumb_title @issue.to_reference
|
2016-10-19 10:23:51 +00:00
|
|
|
- page_title "#{@issue.title} (#{@issue.to_reference})", "Issues"
|
2015-12-24 22:03:54 +00:00
|
|
|
- page_description @issue.description
|
2018-04-16 15:09:19 +00:00
|
|
|
- page_card_attributes @issue.card_attributes
|
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)
|
2015-12-23 21:56:27 +00:00
|
|
|
|
2017-11-28 21:35:01 +00:00
|
|
|
.detail-page-header
|
|
|
|
.detail-page-header-body
|
2017-12-13 03:44:59 +00:00
|
|
|
.issuable-status-box.status-box.status-box-issue-closed{ class: issue_button_visibility(@issue, false) }
|
2018-04-09 21:30:33 +00:00
|
|
|
= sprite_icon('mobile-issue-close', size: 16, css_class: 'd-block d-sm-none')
|
2019-02-15 19:05:23 +00:00
|
|
|
.d-none.d-sm-block
|
2019-01-17 22:31:05 +00:00
|
|
|
- if @issue.moved?
|
2019-02-21 14:21:14 +00:00
|
|
|
- moved_link_start = "<a href=\"#{issue_path(@issue.moved_to)}\" class=\"text-white text-underline\">".html_safe
|
2019-02-15 19:05:23 +00:00
|
|
|
- moved_link_end = '</a>'.html_safe
|
|
|
|
= s_('IssuableStatus|Closed (%{moved_link_start}moved%{moved_link_end})').html_safe % {moved_link_start: moved_link_start,
|
|
|
|
moved_link_end: moved_link_end}
|
2019-01-17 22:31:05 +00:00
|
|
|
- else
|
|
|
|
= _("Closed")
|
2016-04-12 15:27:16 +00:00
|
|
|
.issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) }
|
2018-04-09 21:30:33 +00:00
|
|
|
= sprite_icon('issue-open-m', size: 16, 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
|
2017-08-07 23:56:16 +00:00
|
|
|
- if @issue.confidential
|
2017-11-16 16:44:16 +00:00
|
|
|
.issuable-warning-icon.inline= sprite_icon('eye-slash', size: 16, css_class: 'icon')
|
2017-09-14 11:01:07 +00:00
|
|
|
- if @issue.discussion_locked?
|
2017-11-16 16:44:16 +00:00
|
|
|
.issuable-warning-icon.inline= sprite_icon('lock', size: 16, css_class: 'icon')
|
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: "#" }
|
2017-11-28 21:35:01 +00:00
|
|
|
= icon('angle-double-left')
|
|
|
|
|
|
|
|
.detail-page-header-actions.js-issuable-actions
|
2017-03-06 20:18:39 +00:00
|
|
|
.clearfix.issue-btn-group.dropdown
|
2018-05-10 19:22:56 +00:00
|
|
|
%button.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
|
2017-03-06 20:18:39 +00:00
|
|
|
Options
|
|
|
|
= icon('caret-down')
|
2018-04-17 17:18:41 +00:00
|
|
|
.dropdown-menu.dropdown-menu-right.d-lg-none.d-xl-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
|
|
|
|
%li= link_to 'New issue', new_project_issue_path(@project), title: 'New issue', id: 'new_issue_link'
|
2017-03-06 20:18:39 +00:00
|
|
|
|
2018-08-19 19:43:41 +00:00
|
|
|
= render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue, can_reopen: can_reopen_issue
|
2017-06-07 10:18:35 +00:00
|
|
|
|
2017-05-24 10:00:27 +00:00
|
|
|
- if can_report_spam
|
2018-04-09 21:36:25 +00: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 17:49:26 +00:00
|
|
|
- if can_create_issue
|
2018-11-22 11:50:59 +00: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 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
|
2018-02-28 22:59:50 +00:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2018-02-23 14:45:32 +00:00
|
|
|
%script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue).to_json
|
2017-05-24 11:25:53 +00:00
|
|
|
#js-issuable-app
|
2017-05-10 11:29:33 +00:00
|
|
|
%h2.title= markdown_field(@issue, :title)
|
|
|
|
- if @issue.description.present?
|
|
|
|
.description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' }
|
2019-03-23 13:09:14 +00:00
|
|
|
.md= markdown_field(@issue, :description)
|
2017-05-10 11:29:33 +00:00
|
|
|
%textarea.hidden.js-task-list-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-04-18 04:12:18 +00:00
|
|
|
#js-related-merge-requests{ data: { endpoint: expose_url(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)
|
|
|
|
#related-branches{ data: { url: related_branches_project_issue_path(@project, @issue) } }
|
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
|
2017-05-04 08:09:21 +00:00
|
|
|
.row
|
2018-10-23 09:49:45 +00:00
|
|
|
.col-md-12.col-lg-6.js-noteable-awards
|
2017-05-04 08:09:21 +00:00
|
|
|
= render 'award_emoji/awards_block', awardable: @issue, inline: true
|
2018-10-23 09:49:45 +00:00
|
|
|
.col-md-12.col-lg-6.new-branch-col
|
|
|
|
#js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@issue), notes_filters: UserPreference.notes_filters.to_json } }
|
2017-05-04 08:09:21 +00:00
|
|
|
= render 'new_branch' unless @issue.confidential?
|
2015-12-17 09:34:15 +00:00
|
|
|
|
2019-02-20 14:51:06 +00:00
|
|
|
= render_if_exists '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
|