2017-01-05 16:07:13 -05:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2017-08-17 05:42:04 -04:00
|
|
|
- add_to_breadcrumbs "Issues", project_issues_path(@project)
|
|
|
|
- breadcrumb_title @issue.to_reference
|
2016-10-19 06:23:51 -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
|
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)
|
|
|
|
- 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)
|
2015-12-23 16:56:27 -05:00
|
|
|
|
2017-11-28 16:35:01 -05:00
|
|
|
.detail-page-header
|
|
|
|
.detail-page-header-body
|
2017-12-12 22:44:59 -05:00
|
|
|
.issuable-status-box.status-box.status-box-issue-closed{ class: issue_button_visibility(@issue, false) }
|
2018-04-09 17:30:33 -04:00
|
|
|
= sprite_icon('mobile-issue-close', size: 16, css_class: 'd-block d-sm-none')
|
2018-04-09 17:50:40 -04:00
|
|
|
%span.d-none.d-sm-block
|
2016-04-01 06:55:26 -04:00
|
|
|
Closed
|
2016-04-12 11:27:16 -04:00
|
|
|
.issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) }
|
2018-04-09 17:30:33 -04:00
|
|
|
= sprite_icon('issue-open-m', size: 16, 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
|
2017-08-07 19:56:16 -04:00
|
|
|
- if @issue.confidential
|
2017-11-16 11:44:16 -05:00
|
|
|
.issuable-warning-icon.inline= sprite_icon('eye-slash', size: 16, css_class: 'icon')
|
2017-09-14 07:01:07 -04:00
|
|
|
- if @issue.discussion_locked?
|
2017-11-16 11:44:16 -05:00
|
|
|
.issuable-warning-icon.inline= sprite_icon('lock', size: 16, css_class: 'icon')
|
2017-09-18 07:15:00 -04:00
|
|
|
= issuable_meta(@issue, @project, "Issue")
|
2016-02-29 15:13:00 -05:00
|
|
|
|
2018-04-09 15:38:44 -04:00
|
|
|
%a.btn.btn-secondary.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
|
2017-11-28 16:35:01 -05:00
|
|
|
= icon('angle-double-left')
|
|
|
|
|
|
|
|
.detail-page-header-actions.js-issuable-actions
|
2017-03-06 15:18:39 -05:00
|
|
|
.clearfix.issue-btn-group.dropdown
|
2018-04-09 17:30:33 -04:00
|
|
|
%button.btn.btn-secondary.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-09 17:30:33 -04:00
|
|
|
.dropdown-menu.dropdown-menu-align-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'
|
|
|
|
%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
|
|
|
|
%li= link_to 'New issue', new_project_issue_path(@project), title: 'New issue', id: 'new_issue_link'
|
2017-03-06 15:18:39 -05:00
|
|
|
|
2017-06-07 06:18:35 -04:00
|
|
|
= render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue
|
|
|
|
|
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-04-12 14:47:30 -04:00
|
|
|
= link_to new_project_issue_path(@project), class: 'd-none d-sm-none d-md-block btn btn-grouped new-issue-link btn-new 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
|
2018-02-28 17:59:50 -05:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2018-02-23 09:45:32 -05:00
|
|
|
%script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue).to_json
|
2017-05-24 07:25:53 -04:00
|
|
|
#js-issuable-app
|
2017-05-10 07:29:33 -04:00
|
|
|
%h2.title= markdown_field(@issue, :title)
|
|
|
|
- if @issue.description.present?
|
|
|
|
.description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' }
|
|
|
|
.wiki= markdown_field(@issue, :description)
|
|
|
|
%textarea.hidden.js-task-list-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
|
|
|
|
2017-12-04 18:19:20 -05:00
|
|
|
#merge-requests{ data: { url: referenced_merge_requests_project_issue_path(@project, @issue) } }
|
2016-04-14 05:14:12 -04:00
|
|
|
// This element is filled in using JavaScript.
|
2016-04-12 09:55:54 -04:00
|
|
|
|
2017-12-04 18:19:20 -05:00
|
|
|
#related-branches{ data: { url: related_branches_project_issue_path(@project, @issue) } }
|
2016-04-14 05:14:12 -04:00
|
|
|
// This element is filled in using JavaScript.
|
2015-12-17 04:34:15 -05:00
|
|
|
|
2017-05-19 17:05:51 -04:00
|
|
|
.content-block.emoji-block
|
2017-05-04 04:09:21 -04:00
|
|
|
.row
|
2018-02-27 19:10:43 -05:00
|
|
|
.col-sm-8.js-noteable-awards
|
2017-05-04 04:09:21 -04:00
|
|
|
= render 'award_emoji/awards_block', awardable: @issue, inline: true
|
2017-05-19 17:05:51 -04:00
|
|
|
.col-sm-4.new-branch-col
|
2017-05-04 04:09:21 -04:00
|
|
|
= render 'new_branch' unless @issue.confidential?
|
2015-12-17 04:34:15 -05:00
|
|
|
|
2016-04-01 06:55:26 -04:00
|
|
|
%section.issuable-discussion
|
|
|
|
= render 'projects/issues/discussion'
|
2016-01-27 17:38:19 -05:00
|
|
|
|
2016-02-11 11:17:45 -05:00
|
|
|
= render 'shared/issuable/sidebar', issuable: @issue
|