_issue.html.haml 1.94 KB
Newer Older
1
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) }
2
  - if controller.controller_name == 'issues'
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)
5 6

  .issue-title
7 8
    %span.str-truncated
      = link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title"
9 10
    - if issue.closed?
      %small.pull-right
11
        CLOSED
12 13

  .issue-info
14
    %span.light= "##{issue.iid}"
15 16 17 18
    - if issue.assignee
      assigned to #{link_to_member(@project, issue.assignee)}
    - if issue.votes_count > 0
      = render 'votes/votes_inline', votable: issue
19
    - if issue.notes.any?
20
      %span
21
        %i.fa.fa-comments
randx's avatar
randx committed
22
        = issue.notes.count
23
    - if issue.milestone
24
      %span
25
        %i.fa.fa-clock-o
26
        = issue.milestone.title
27 28 29 30
    - if issue.tasks?
      %span.task-status
        = issue.task_status

31
    .pull-right.issue-updated-at
32
      %small updated #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_update_ago')}
33 34 35

    .issue-labels
      - issue.labels.each do |label|
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
36 37
        = link_to project_issues_path(issue.project, label_name: label.name) do
          = render_colored_label(label)
38 39

  .issue-actions
40
    - if can? current_user, :modify_issue, issue
Andrew8xx8's avatar
Andrew8xx8 committed
41
      - if issue.closed?
42
        = 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
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
43
      - else
44
        = 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
45
      = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link btn-grouped" do
46
        %i.fa.fa-pencil-square-o
47 48
        Edit

randx's avatar
randx committed
49