summaryrefslogtreecommitdiff
path: root/app/views/issues/show.html.haml
blob: 8ffc9c2b6629e6e6de01a930e4e96aed9b07c76c (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
60
61
62
63
64
65
66
%h3.page_title
  Issue ##{@issue.id}

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

  %span.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 small"
      - else
        = link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue"
    - if can?(current_user, :admin_project, @project) || @issue.author == current_user
      = link_to edit_project_issue_path(@project, @issue), :class => "btn small" do
        %i.icon-edit
        Edit

    %br
    - if @issue.upvotes > 0
      .upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}"

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

.main_box
  .top_box_content
    %h4
      - if @issue.closed
        .alert-message.error.status_info Closed
      - else
        .alert-message.success.status_info Open
      = @issue.title

  .middle_box_content
    %cite.cgray Created by
    = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av"
    %strong.author= link_to_issue_author(@issue)

    - if @issue.assignee
      %cite.cgray and currently assigned to
      = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av"
      %strong.author= link_to_issue_assignee(@issue)

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

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

  - if @issue.description.present?
    .bottom_box_content
      = preserve do
        = markdown @issue.description


.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue"