_issue.html.haml 1.8 KB
Newer Older
1
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) }
R
randx 已提交
2
  - if controller.controller_name == 'issues'
D
Dmitriy Zaporozhets 已提交
3
    .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)
D
Dmitriy Zaporozhets 已提交
5 6

  .issue-title
7
    %span.light= "##{issue.iid}"
8 9
    %span.str-truncated
      = link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title"
10 11 12
    - if issue.closed?
      %small.pull-right
        = "CLOSED"
D
Dmitriy Zaporozhets 已提交
13 14 15 16 17 18 19 20

  .issue-info
    - if issue.assignee
      assigned to #{link_to_member(@project, issue.assignee)}
    - else
      unassigned
    - if issue.votes_count > 0
      = render 'votes/votes_inline', votable: issue
21
    - if issue.notes.any?
D
Dmitriy Zaporozhets 已提交
22 23
      %span
        %i.icon-comments
R
randx 已提交
24
        = issue.notes.count
25
    - if issue.milestone
D
Dmitriy Zaporozhets 已提交
26 27 28 29
      %span
        %i.icon-time
        = issue.milestone.title
    .pull-right
30
      %small updated #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_update_ago')}
D
Dmitriy Zaporozhets 已提交
31 32 33

    .issue-labels
      - issue.labels.each do |label|
34
        %span{class: "label #{label_css_class(label.name)}"}
D
Dmitriy Zaporozhets 已提交
35 36 37 38
          %i.icon-tag
          = label.name

  .issue-actions
39
    - if can? current_user, :modify_issue, issue
A
Andrew8xx8 已提交
40
      - if issue.closed?
A
Andrew8xx8 已提交
41
        = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put,  class: "btn btn-small grouped reopen_issue", remote: true
D
Dmitriy Zaporozhets 已提交
42
      - else
A
Andrew8xx8 已提交
43
        = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
D
Dmitriy Zaporozhets 已提交
44
      = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do
45 46 47
        %i.icon-edit
        Edit

R
randx 已提交
48