BigW Consortium Gitlab

show.html.haml 1.92 KB
Newer Older
1
%h3
2
  Issue ##{@issue.id}
3
  %small
4
    created at
5
    = @issue.created_at.stamp("Aug 21, 2011")
6 7 8 9

  %span.right
    - if can?(current_user, :admin_project, @project) || @issue.author == current_user
      - if @issue.closed
10
        = link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put,  :class => "btn small"
11
      - else
12
        = link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue"
13
    - if can?(current_user, :admin_project, @project) || @issue.author == current_user
14
      = link_to edit_project_issue_path(@project, @issue), :class => "btn small" do
15
        %i.icon-edit
16 17
        Edit

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

22
.back_link
23
  = link_to project_issues_path(@project) do
24
    ← To issues list
25

26 27
.main_box
  .top_box_content
28
    %h4
29
      - if @issue.closed
30
        .alert-message.error.status_info Closed
31
      - else
32 33
        .alert-message.success.status_info Open
      = @issue.title
34

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

40
    %cite.cgray and currently assigned to
41 42
    = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av"
    %strong.author= link_to_issue_assignee(@issue)
43

44
    - if @issue.milestone
45
      - milestone = @issue.milestone
46
      %cite.cgray and attached to milestone
47 48 49
      = link_to project_milestone_path(milestone.project, milestone) do
        %strong
          = truncate(milestone.title, :length => 20)
50

51 52
  - if @issue.description.present?
    .bottom_box_content
53 54
      = preserve do
        = markdown @issue.description
55 56


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