show.html.haml 1.83 KB
Newer Older
randx's avatar
randx committed
1
%h3.page_title
2
  Issue ##{@issue.id}
3

4
  %small
5
    created at
6
    = @issue.created_at.stamp("Aug 21, 2011")
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7 8 9 10

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

Riyad Preukschas's avatar
Riyad Preukschas committed
19
.right
20
  .span3#votes= render 'votes/votes_block', votable: @issue
21

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

Riyad Preukschas's avatar
Riyad Preukschas committed
26

27 28
.main_box
  .top_box_content
29
    %h4.box-title
30
      - if @issue.closed
31
        .error.status_info Closed
32
      = gfm escape_once(@issue.title)
33

34
  .middle_box_content
35 36 37 38
    %cite.cgray
      Created by #{link_to_member(@project, @issue.author)}
      - if @issue.assignee
        \ and currently assigned to #{link_to_member(@project, @issue.assignee)}
39

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

45
    .right
46 47 48 49 50
      - @issue.labels.each do |label|
        %span.label.label-issue
          %i.icon-tag
          = label.name
         
51

52 53
  - if @issue.description.present?
    .bottom_box_content
54 55
      = preserve do
        = markdown @issue.description
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
56 57


58
.issue_notes.voting_notes#notes= render "notes/notes_with_form", tid: @issue.id, tt: "issue"