_issue.html.haml 1.9 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
    - if issue.closed?
      %small.pull-right
12
        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|
D
Dmitriy Zaporozhets 已提交
34 35
        = link_to project_issues_path(issue.project, label_name: label.name) do
          = render_colored_label(label)
D
Dmitriy Zaporozhets 已提交
36 37

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

R
randx 已提交
47