summaryrefslogtreecommitdiff
path: root/app/views/dashboard/todos/_todo.html.haml
blob: a3993d5ef16709162ffb39e2b40f48bf821c1f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
%li{ class: "todo todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo), data: { url: todo_target_path(todo) } }
  .todo-avatar
    = author_avatar(todo, size: 40)

  .todo-item.todo-block
    .todo-title.title
      - unless todo.build_failed? || todo.unmergeable?
        = todo_target_state_pill(todo)

        .title-item.author-name
          - if todo.author
            = link_to_author(todo)
          - else
            (removed)

      .title-item.action-name
        = todo_action_name(todo)

      .title-item.todo-label
        - if todo.target
          = todo_target_link(todo)
        - else
          (removed)

      .title-item
        ·

      .title-item
        #{time_ago_with_tooltip(todo.created_at)}
        = todo_due_date(todo)

    .todo-body
      .todo-note
        .md
          = event_note(todo.body, project: todo.project)

  - if todo.pending?
    .todo-actions
      = link_to [:dashboard, todo], method: :delete, class: 'btn btn-loading js-done-todo' do
        Done
        = icon('spinner spin')
      = link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading js-undo-todo hidden'  do
        Undo
        = icon('spinner spin')