summaryrefslogtreecommitdiff
path: root/app/views/issues/show.html.haml
blob: 474955cc665c78d6620b25b329a40c52235bb800 (plain)
1
2
3
4
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%h3.page_title
  Issue ##{@issue.id}

  %small
    created at
    = @issue.created_at.stamp("Aug 21, 2011")

  %span.pull-right
    - if can?(current_user, :admin_project, @project) || @issue.author == current_user
      - if @issue.closed
        = link_to 'Reopen', project_issue_path(@project, @issue, issue: {closed: false }, status_only: true), method: :put,  class: "btn grouped reopen_issue"
      - else
        = link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
    - if can?(current_user, :admin_project, @project) || @issue.author == current_user
      = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
        %i.icon-edit
        Edit

.pull-right
  .span3#votes= render 'votes/votes_block', votable: @issue

.back_link
  = link_to project_issues_path(@project) do
    ← To issues list


.ui-box.ui-box-show
  .ui-box-head
    %h4.box-title
      - if @issue.closed
        .error.status_info Closed
      = gfm escape_once(@issue.title)

  .ui-box-body
    %cite.cgray
      Created by #{link_to_member(@project, @issue.author)}
      - if @issue.assignee
        \ and currently assigned to #{link_to_member(@project, @issue.assignee)}

    - if @issue.milestone
      - milestone = @issue.milestone
      %cite.cgray and attached to milestone
      %strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)

    .pull-right
      - @issue.labels.each do |label|
        %span.label
          %i.icon-tag
          = label.name
         

  - if @issue.description.present?
    .ui-box-bottom
      .wiki
        = preserve do
          = markdown @issue.description


.voting_notes#notes= render "notes/notes_with_form"