debian-mirror-gitlab/app/views/projects/issues/show.html.haml

91 lines
4.7 KiB
Text
Raw Normal View History

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