_issue.html.haml 1.94 KB
Newer Older
Alfredo Sumaran's avatar
Alfredo Sumaran committed
1
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue), data: { labels: issue.label_ids, id: issue.id } }
2
  - if @bulk_edit
3
    .issue-check
4
      = check_box_tag dom_id(issue, "selected"), nil, false, 'data-id' => issue.id, class: "selected_issue"
5

6
  .issue-title.title
Valery Sizov's avatar
Valery Sizov committed
7
    %span.issue-title-text
8
      = confidential_icon(issue)
9
      = link_to issue.title, issue_path(issue)
10
    %ul.controls
Valery Sizov's avatar
Valery Sizov committed
11
      - if issue.closed?
12
        %li
Valery Sizov's avatar
Valery Sizov committed
13
          CLOSED
14

Valery Sizov's avatar
Valery Sizov committed
15
      - if issue.assignee
16 17 18
        %li
          = link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name")

19
      - upvotes, downvotes = issue.upvotes, issue.downvotes
20
      - if upvotes > 0
21 22 23 24
        %li
          = icon('thumbs-up')
          = upvotes

25
      - if downvotes > 0
26 27 28 29
        %li
          = icon('thumbs-down')
          = downvotes

30
      - note_count = issue.notes.user.count
31
      %li
Luke Bennett's avatar
Luke Bennett committed
32
        = link_to issue_path(issue, anchor: 'notes'), class: ('no-comments' if note_count.zero?) do
33 34
          = icon('comments')
          = note_count
Valery Sizov's avatar
Valery Sizov committed
35 36

  .issue-info
37 38 39
    #{issue.to_reference} ·
    opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')}
    by #{link_to_member(@project, issue.author, avatar: false)}
Valery Sizov's avatar
Valery Sizov committed
40 41
    - if issue.milestone
       
42 43
      = link_to namespace_project_issues_path(issue.project.namespace, issue.project, milestone_title: issue.milestone.title) do
        = icon('clock-o')
Valery Sizov's avatar
Valery Sizov committed
44
        = issue.milestone.title
45
    - if issue.due_date
46 47 48 49
      %span{class: "#{'cred' if issue.overdue?}"}
         
        = icon('calendar')
        = issue.due_date.to_s(:medium)
50 51 52 53
    - if issue.labels.any?
       
      - issue.labels.each do |label|
        = link_to_label(label, project: issue.project)
Valery Sizov's avatar
Valery Sizov committed
54
    - if issue.tasks?
55
       
Valery Sizov's avatar
Valery Sizov committed
56 57
      %span.task-status
        = issue.task_status
58

Valery Sizov's avatar
Valery Sizov committed
59
    .pull-right.issue-updated-at
60
      %span updated #{time_ago_with_tooltip(issue.updated_at, placement: 'bottom', html_class: 'issue_update_ago')}