BigW Consortium Gitlab

show.html.haml 4.43 KB
Newer Older
1
- @content_class = "limit-container-width" unless fluid_layout
2
- page_title           "#{@issue.title} (#{@issue.to_reference})", "Issues"
3 4
- page_description     @issue.description
- page_card_attributes @issue.card_attributes
5 6
- can_update_issue = can?(current_user, :update_issue, @issue)
- can_report_spam = @issue.submittable_as_spam_by?(current_user)
7

8 9
.clearfix.detail-page-header
  .issuable-header
10
    .issuable-status-box.status-box.status-box-closed{ class: issue_button_visibility(@issue, false) }
11 12 13
      = icon('check', class: "hidden-sm hidden-md hidden-lg")
      %span.hidden-xs
        Closed
14
    .issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) }
15 16
      = icon('circle-o', class: "hidden-sm hidden-md hidden-lg")
      %span.hidden-xs Open
17

18
    %a.btn.btn-default.pull-right.visible-xs-block.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
19
      = icon('angle-double-left')
20

21
    .issuable-meta
22 23
      - if @issue.confidential
        = icon('eye-slash', class: 'is-confidential')
24
      = issuable_meta(@issue, @project, "Issue")
25

26 27 28 29 30 31 32
  .issuable-actions
    .clearfix.issue-btn-group.dropdown
      %button.btn.btn-default.pull-left.hidden-md.hidden-lg{ type: "button", data: { toggle: "dropdown" } }
        Options
        = icon('caret-down')
      .dropdown-menu.dropdown-menu-align-right.hidden-lg
        %ul
33
          - if can_update_issue
34
            %li= link_to 'Edit', edit_project_issue_path(@project, @issue)
35 36
            / TODO: simplify condition back #36860
          - if @issue.author && current_user != @issue.author
37
            %li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
38 39 40
          - if can_update_issue
            %li= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, format: 'json'), class: "btn-close #{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 #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
41
          - if can_report_spam
42
            %li= link_to 'Submit as spam', mark_as_spam_project_issue_path(@project, @issue), method: :post, class: 'btn-spam', title: 'Submit as spam'
43 44
          - if can_update_issue || can_report_spam
            %li.divider
45
          %li= link_to 'New issue', new_project_issue_path(@project), title: 'New issue', id: 'new_issue_link'
46

47
    - if can_update_issue
48
      = link_to 'Edit', edit_project_issue_path(@project, @issue), class: 'hidden-xs hidden-sm btn btn-grouped issuable-edit'
49 50 51

    = render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue

52
    - if can_report_spam
53 54
      = link_to 'Submit as spam', mark_as_spam_project_issue_path(@project, @issue), method: :post, class: 'hidden-xs hidden-sm btn btn-grouped btn-spam', title: 'Submit as spam'
    = link_to new_project_issue_path(@project), class: 'hidden-xs hidden-sm btn btn-grouped new-issue-link btn-new btn-inverted', title: 'New issue', id: 'new_issue_link' do
55
      New issue
56

57
.issue-details.issuable-details
58
  .detail-page-description.content-block
59
    %script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue)
60
    #js-issuable-app
61 62 63 64 65
      %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
66

67
      = edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago')
68

69
    #merge-requests{ data: { url: referenced_merge_requests_project_issue_url(@project, @issue) } }
Phil Hughes committed
70
      // This element is filled in using JavaScript.
71

72
    #related-branches{ data: { url: related_branches_project_issue_url(@project, @issue) } }
Phil Hughes committed
73
      // This element is filled in using JavaScript.
74

75
  .content-block.emoji-block
76
    .row
77
      .col-sm-8
78
        = render 'award_emoji/awards_block', awardable: @issue, inline: true
79
      .col-sm-4.new-branch-col
80
        = render 'new_branch' unless @issue.confidential?
81

82 83
  %section.issuable-discussion
    = render 'projects/issues/discussion'
84

85
= render 'shared/issuable/sidebar', issuable: @issue
Regis Boudinot committed
86

87
= page_specific_javascript_bundle_tag('common_vue')
Regis Boudinot committed
88
= page_specific_javascript_bundle_tag('issue_show')