_issue.html.haml 1.98 KB
Newer Older
1
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue) }
2
  - if controller.controller_name == 'issues' && can?(current_user, :admin_issue, @project)
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 10
      = link_to_gfm issue.title, issue_path(issue)
    %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
Zeger-Jan van de Weg's avatar
Zeger-Jan van de Weg committed
31 32 33 34
      %li
        = link_to issue_path(issue, anchor: 'notes'), class: ('issue-no-comments' if note_count.zero?) do
          = 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')}