_show.html.haml 1.64 KB
Newer Older
1
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) }
2 3
  - if controller.controller_name == 'issues'
    .issue_check
4
      = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
5
  .pull-right
6
    - if issue.notes.any?
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7
      %span.btn.btn-small.disabled.grouped
randx's avatar
randx committed
8 9
        %i.icon-comment
        = issue.notes.count
10
    - if can? current_user, :modify_issue, issue
Andrew8xx8's avatar
Andrew8xx8 committed
11 12
      - if issue.closed?
        = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state: :reopened }, status_only: true), method: :put,  class: "btn btn-small grouped reopen_issue", remote: true
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
13
      - else
Andrew8xx8's avatar
Andrew8xx8 committed
14
        = link_to 'Close', project_issue_path(issue.project, issue, issue: {state: :closed }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
15
      = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do
16 17 18
        %i.icon-edit
        Edit

randx's avatar
randx committed
19
  - if issue.assignee
20
    = image_tag gravatar_icon(issue.assignee_email), class: "avatar"
randx's avatar
randx committed
21
  - else
22
    = image_tag "no_avatar.png", class: "avatar"
randx's avatar
randx committed
23

24
  %p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
randx's avatar
randx committed
25 26

  %span.update-author
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
27
    %span.cdark= "##{issue.id}"
randx's avatar
randx committed
28 29 30 31 32
    - if issue.assignee
      assigned to #{issue.assignee_name}
    - else
       

Riyad Preukschas's avatar
Riyad Preukschas committed
33
    - if issue.votes_count > 0
34
      = render 'votes/votes_inline', votable: issue
35 36 37 38 39
    %span
      - issue.labels.each do |label|
        %span.label
          %i.icon-tag
          = label.name