show.html.haml 2.59 KB
Newer Older
1
- page_title "#{@issue.title} (##{@issue.iid})", "Issues"
2 3
= render "header_title"

4
.issue
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  .detail-page-header
    .status-box{ class: status_box_class(@issue) }
      - if @issue.closed?
        Closed
      - else
        Open
    %span.identifier
      Issue ##{@issue.iid}
    %span.creator
      ·
      opened by #{link_to_member(@project, @issue.author, size: 24)}
      ·
      = time_ago_with_tooltip(@issue.created_at, placement: 'bottom', html_class: 'issue_created_ago')
      - if @issue.updated_at != @issue.created_at
        %span
          ·
          = icon('edit', title: 'edited')
          = time_ago_with_tooltip(@issue.updated_at, placement: 'bottom', html_class: 'issue_edited_ago')

    .pull-right
      - if can?(current_user, :create_issue, @project)
        = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-grouped new-issue-link', title: 'New Issue', id: 'new_issue_link' do
          = icon('plus')
          New Issue
      - if can?(current_user, :update_issue, @issue)
30
        - if @issue.closed?
31
          = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen'
32
        - else
33
          = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close', title: 'Close Issue'
34

35 36 37
        = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do
          = icon('pencil-square-o')
          Edit
38

39
  .issue-details.issuable-details
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    .detail-page-description.gray-content-block.second-block
      %h2.title
        = markdown escape_once(@issue.title), pipeline: :single_line
      %div
        - if @issue.description.present?
          .description{class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : ''}
            .wiki
              = preserve do
                = markdown(@issue.description, cache_key: [@issue, "description"])
            %textarea.hidden.js-task-list-field
              = @issue.description

        .merge-requests
          = render 'merge_requests'

    .gray-content-block.second-block.oneline-block
      = render 'votes/votes_block', votable: @issue

    - if @closed_by_merge_requests.present?
      = render 'projects/issues/closed_by_box'

61 62
    .row
      %section.col-md-9
63
        .issuable-discussion
64 65 66 67 68 69
          = render 'projects/issues/discussion'

      %aside.col-md-3
        = render 'shared/issuable/sidebar', issuable: @issue

      = render 'shared/show_aside'