2016-12-02 16:13:04 +00:00
|
|
|
- @content_class = "limit-container-width"
|
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
|
|
|
|
- page_card_attributes @issue.card_attributes
|
2015-12-23 21:56:27 +00:00
|
|
|
|
2016-04-01 10:55:26 +00:00
|
|
|
.clearfix.detail-page-header
|
|
|
|
.issuable-header
|
2016-04-12 15:27:16 +00:00
|
|
|
.issuable-status-box.status-box.status-box-closed{ class: issue_button_visibility(@issue, false) }
|
2016-04-01 10:55:26 +00:00
|
|
|
= icon('check', class: "hidden-sm hidden-md hidden-lg")
|
|
|
|
%span.hidden-xs
|
|
|
|
Closed
|
2016-04-12 15:27:16 +00:00
|
|
|
.issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) }
|
2016-04-01 10:55:26 +00:00
|
|
|
= icon('circle-o', class: "hidden-sm hidden-md hidden-lg")
|
|
|
|
%span.hidden-xs Open
|
2015-09-17 10:16:24 +00:00
|
|
|
|
2016-04-01 10:55:26 +00:00
|
|
|
%a.btn.btn-default.pull-right.visible-xs-block.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
|
2016-03-04 18:24:24 +00:00
|
|
|
= icon('angle-double-left')
|
2016-02-29 23:04:40 +00:00
|
|
|
|
2016-04-01 10:55:26 +00:00
|
|
|
.issuable-meta
|
2016-03-17 21:00:03 +00:00
|
|
|
= confidential_icon(@issue)
|
2016-04-01 11:20:54 +00:00
|
|
|
= issuable_meta(@issue, @project, "Issue")
|
2016-02-29 20:13:00 +00:00
|
|
|
|
2016-04-14 13:04:06 +00:00
|
|
|
- if can?(current_user, :create_issue, @project) || can?(current_user, :update_issue, @issue)
|
|
|
|
.issuable-actions
|
|
|
|
.clearfix.issue-btn-group.dropdown
|
2016-08-08 15:41:15 +00:00
|
|
|
%button.btn.btn-default.pull-left.hidden-md.hidden-lg{ type: "button", data: { toggle: "dropdown" } }
|
2016-04-14 13:04:06 +00:00
|
|
|
Options
|
2016-09-15 16:45:16 +00:00
|
|
|
= icon('caret-down')
|
2016-04-14 13:04:06 +00:00
|
|
|
.dropdown-menu.dropdown-menu-align-right.hidden-lg
|
|
|
|
%ul
|
|
|
|
- if can?(current_user, :create_issue, @project)
|
|
|
|
%li
|
|
|
|
= link_to 'New issue', new_namespace_project_issue_path(@project.namespace, @project), title: 'New issue', id: 'new_issue_link'
|
|
|
|
- if can?(current_user, :update_issue, @issue)
|
|
|
|
%li
|
|
|
|
= link_to 'Reopen issue', issue_path(@issue, issue: { state_event: :reopen }, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
|
|
|
|
%li
|
|
|
|
= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
|
|
|
|
%li
|
|
|
|
= link_to 'Edit', edit_namespace_project_issue_path(@project.namespace, @project, @issue)
|
2016-08-09 17:43:47 +00:00
|
|
|
- if @issue.submittable_as_spam? && current_user.admin?
|
|
|
|
%li
|
|
|
|
= link_to 'Submit as spam', mark_as_spam_namespace_project_issue_path(@project.namespace, @project, @issue), method: :post, class: 'btn-spam', title: 'Submit as spam'
|
2016-08-02 21:21:57 +00:00
|
|
|
|
2016-04-14 13:04:06 +00:00
|
|
|
- if can?(current_user, :create_issue, @project)
|
2016-07-24 05:32:47 +00:00
|
|
|
= link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'hidden-xs hidden-sm btn btn-grouped new-issue-link btn-new btn-inverted', title: 'New issue', id: 'new_issue_link' do
|
2016-04-14 13:04:06 +00:00
|
|
|
New issue
|
|
|
|
- if can?(current_user, :update_issue, @issue)
|
2016-06-08 14:20:07 +00:00
|
|
|
= link_to 'Reopen issue', issue_path(@issue, issue: { state_event: :reopen }, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "hidden-xs hidden-sm btn btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
|
2016-06-08 13:38:18 +00:00
|
|
|
= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "hidden-xs hidden-sm btn btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
|
2016-08-09 17:43:47 +00:00
|
|
|
- if @issue.submittable_as_spam? && current_user.admin?
|
2016-08-02 21:21:57 +00:00
|
|
|
= link_to 'Submit as spam', mark_as_spam_namespace_project_issue_path(@project.namespace, @project, @issue), method: :post, class: 'hidden-xs hidden-sm btn btn-grouped btn-spam', title: 'Submit as spam'
|
2016-08-09 17:43:47 +00:00
|
|
|
= link_to 'Edit', edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'hidden-xs hidden-sm btn btn-grouped issuable-edit'
|
2013-12-19 17:36:27 +00:00
|
|
|
|
2016-02-15 21:29:22 +00:00
|
|
|
|
2016-04-01 10:55:26 +00:00
|
|
|
.issue-details.issuable-details
|
2016-10-24 07:02:15 +00:00
|
|
|
.detail-page-description.content-block{ class: ('hide-bottom-border' unless @issue.description.present? ) }
|
2016-04-01 10:55:26 +00:00
|
|
|
%h2.title
|
2016-10-06 22:01:42 +00:00
|
|
|
= markdown_field(@issue, :title)
|
2016-04-01 10:55:26 +00:00
|
|
|
- if @issue.description.present?
|
2016-04-14 13:04:06 +00:00
|
|
|
.description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' }
|
2016-04-01 10:55:26 +00:00
|
|
|
.wiki
|
|
|
|
= preserve do
|
2016-10-06 22:01:42 +00:00
|
|
|
= markdown_field(@issue, :description)
|
2016-04-01 10:55:26 +00:00
|
|
|
%textarea.hidden.js-task-list-field
|
|
|
|
= @issue.description
|
|
|
|
= edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue_edited_ago')
|
2015-12-17 09:34:15 +00:00
|
|
|
|
2016-04-14 09:14:12 +00:00
|
|
|
#merge-requests{ data: { url: referenced_merge_requests_namespace_project_issue_url(@project.namespace, @project, @issue) } }
|
|
|
|
// This element is filled in using JavaScript.
|
2016-04-12 13:55:54 +00:00
|
|
|
|
2016-04-14 09:14:12 +00:00
|
|
|
#related-branches{ data: { url: related_branches_namespace_project_issue_url(@project.namespace, @project, @issue) } }
|
|
|
|
// This element is filled in using JavaScript.
|
2015-12-17 09:34:15 +00:00
|
|
|
|
2016-05-30 16:33:43 +00:00
|
|
|
.content-block.content-block-small
|
|
|
|
= render 'new_branch'
|
|
|
|
= render 'award_emoji/awards_block', awardable: @issue, inline: true
|
2015-12-17 09:34:15 +00:00
|
|
|
|
2016-04-01 10:55:26 +00:00
|
|
|
%section.issuable-discussion
|
|
|
|
= render 'projects/issues/discussion'
|
2016-01-27 22:38:19 +00:00
|
|
|
|
2016-02-11 16:17:45 +00:00
|
|
|
= render 'shared/issuable/sidebar', issuable: @issue
|