BigW Consortium Gitlab

show.html.haml 4.37 KB
Newer Older
1 2 3
- page_title           "#{@issue.title} (##{@issue.iid})", "Issues"
- page_description     @issue.description
- page_card_attributes @issue.card_attributes
4

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

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

18
    .issuable-meta
19
      = confidential_icon(@issue)
20
      = issuable_meta(@issue, @project, "Issue")
21

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
  - if can?(current_user, :create_issue, @project) || can?(current_user, :update_issue, @issue)
    .issuable-actions
      .clearfix.issue-btn-group.dropdown
        %button.btn.btn-default.pull-left.hidden-md.hidden-lg{ data: { toggle: "dropdown" } }
          %span.caret
          Options
        .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)
        - if can?(current_user, :create_issue, @project)
          = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'hidden-xs hidden-sm btn btn-nr btn-grouped new-issue-link btn-success', title: 'New issue', id: 'new_issue_link' do
            = icon('plus')
            New issue
        - if can?(current_user, :update_issue, @issue)
          = 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-nr btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
          = 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-nr btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
          = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'hidden-xs hidden-sm btn btn-nr btn-grouped issuable-edit' do
            = icon('pencil-square-o')
            Edit
50

51

52 53 54 55 56
.issue-details.issuable-details
  .detail-page-description.content-block
    %h2.title
      = markdown escape_once(@issue.title), pipeline: :single_line
    - if @issue.description.present?
57
      .description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' }
58 59 60 61 62 63
        .wiki
          = preserve do
            = markdown(@issue.description, cache_key: [@issue, "description"])
        %textarea.hidden.js-task-list-field
          = @issue.description
    = edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue_edited_ago')
64

Phil Hughes committed
65 66
    #merge-requests{ data: { url: referenced_merge_requests_namespace_project_issue_url(@project.namespace, @project, @issue) } }
      // This element is filled in using JavaScript.
67

Phil Hughes committed
68 69
    #related-branches{ data: { url: related_branches_namespace_project_issue_url(@project.namespace, @project, @issue) } }
      // This element is filled in using JavaScript.
70

71 72 73
  .content-block.content-block-small
    = render 'new_branch'
    = render 'votes/votes_block', votable: @issue
74

75 76
  %section.issuable-discussion
    = render 'projects/issues/discussion'
77

78
= render 'shared/issuable/sidebar', issuable: @issue