show.html.haml 1.71 KB
Newer Older
1
- page_title "#{@issue.title} (##{@issue.iid})", "Issues"
2
.issue
3
  .issue-details.issuable-details
4 5 6 7 8 9 10 11 12
    %h4.page-title
      .issue-box{ class: issue_box_class(@issue) }
        - if @issue.closed?
          Closed
        - else
          Open
      Issue ##{@issue.iid}
      %small.creator
        · created by #{link_to_member(@project, @issue.author)} #{issue_timestamp(@issue)}
13

14 15
      .pull-right
        - if can?(current_user, :write_issue, @project)
16 17
          = 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')
18 19 20
            New Issue
        - if can?(current_user, :modify_issue, @issue)
          - if @issue.closed?
21
            = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen'
22
          - else
23
            = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close', title: 'Close Issue'
24

25 26
          = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do
            = icon('pencil-square-o')
27
            Edit
28

29
    %hr
30
    %h2.issue-title
31 32 33
      = gfm escape_once(@issue.title)
    %div
      - if @issue.description.present?
34
        .description{class: can?(current_user, :modify_issue, @issue) ? 'js-task-list-container' : ''}
35 36
          .wiki
            = preserve do
37
              = markdown(@issue.description)
38 39
          %textarea.hidden.js-task-list-field
            = @issue.description
40

41 42
    %hr
  .issue-discussion
43
    = render 'projects/issues/discussion'