show.html.haml 2.68 KB
Newer Older
1
%h3.page-title
2
  Issue ##{@issue.iid}
3

4
  %span.pull-right.issue-btn-group
5
    - if can?(current_user, :write_issue, @project)
6
      = link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do
7
        %i.fa.fa-plus
8
        New Issue
9
    - if can?(current_user, :modify_issue, @issue)
Andrew8xx8's avatar
Andrew8xx8 committed
10
      - if @issue.closed?
11
        = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put,  class: "btn btn-grouped btn-reopen"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12
      - else
13
        = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue"
14

15
      = link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped" do
16
        %i.fa.fa-pencil-square-o
17
        Edit
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
18

19 20 21
.clearfix
  .votes-holder
    #votes= render 'votes/votes_block', votable: @issue
22

23 24 25 26 27 28 29 30 31
  .back-link
    = link_to project_issues_path(@project) do
      ← To issues list
    %span.milestone-nav-link
      - if @issue.milestone
        |
        %span.light Milestone
        = link_to project_milestone_path(@project, @issue.milestone) do
          = @issue.milestone.title
Riyad Preukschas's avatar
Riyad Preukschas committed
32

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
33
.issue-box{ class: issue_box_class(@issue) }
34
  .state.clearfix
35
    .state-label
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
36 37 38 39
      - if @issue.closed?
        Closed
      - else
        Open
40

41
    .creator
42
      Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
43

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
44 45
  %h4.title
    = gfm escape_once(@issue.title)
46

47
  - if @issue.description.present?
48 49 50 51
    .description
      .wiki
        = preserve do
          = markdown @issue.description
52 53 54 55
  .context
    %cite.cgray
      = render partial: 'issue_context', locals: { issue: @issue }

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
56

57 58 59
- content_for :note_actions do
  - if can?(current_user, :modify_issue, @issue)
    - if @issue.closed?
60
      = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen js-note-target-reopen", title: 'Reopen Issue'
61
    - else
62
      = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
63

64 65 66 67 68
.participants
  %cite.cgray #{@issue.participants.count} participants
  - @issue.participants.each do |participant|
    = link_to_member(@project, participant, name: false, size: 24)

69
  .issue-show-labels.pull-right
70
    - @issue.labels.each do |label|
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
71 72
      = link_to project_issues_path(@project, label_name: label.name) do
        = render_colored_label(label)
73

74
.voting_notes#notes= render "projects/notes/notes_with_form"