show.html.haml 2.35 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
  %span.pull-right
9
10
11
    = link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do
      %i.icon-plus
      New Issue
12
    - if can?(current_user, :modify_issue, @issue)
Andrew8xx8's avatar
Andrew8xx8 committed
13
      - if @issue.closed?
Andrew8xx8's avatar
Andrew8xx8 committed
14
        = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put,  class: "btn grouped reopen_issue"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
15
      - else
Andrew8xx8's avatar
Andrew8xx8 committed
16
        = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
17

18
      = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
19
        %i.icon-edit
20
        Edit
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21

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

25
.back_link
26
  = link_to project_issues_path(@project) do
27
    ← To issues list
28

Riyad Preukschas's avatar
Riyad Preukschas committed
29

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
30
31
.ui-box.ui-box-show
  .ui-box-head
32
    %h4.box-title
Andrew8xx8's avatar
Andrew8xx8 committed
33
      - if @issue.closed?
34
        .error.status_info Closed
35
      = gfm escape_once(@issue.title)
36

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
37
  .ui-box-body
38
39
40
41
    %cite.cgray
      Created by #{link_to_member(@project, @issue.author)}
      - if @issue.assignee
        \ and currently assigned to #{link_to_member(@project, @issue.assignee)}
42

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

48
    .pull-right
49
      - @issue.labels.each do |label|
50
        %span{class: "label #{label_css_class(label.name)}"}
51
52
53
          %i.icon-tag
          = label.name
         
54

55
  - if @issue.description.present?
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
56
    .ui-box-bottom
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
57
58
59
      .wiki
        = preserve do
          = markdown @issue.description
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
60

61
62
63
64
65
66
- content_for :note_actions do
  - if can?(current_user, :modify_issue, @issue)
    - if @issue.closed?
      = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put,  class: "btn grouped reopen_issue"
    - else
      = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
67

68
.voting_notes#notes= render "notes/notes_with_form"