_todo.html.haml 1.1 KB
Newer Older
1
%li{class: "todo todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo), data:{url: todo_target_path(todo)} }
2
  .todo-item.todo-block
3
    = image_tag avatar_icon(todo.author_email, 40), class: 'avatar s40', alt:''
D
Dmitriy Zaporozhets 已提交
4
    .todo-title.title
5
      - unless todo.build_failed?
6 7 8 9
        - if (todo.target.is_a?(MergeRequest) || todo.target.is_a?(Issue)) && ['closed', 'merged'].include?(todo.target.state)
          %span.target-status
            = todo_target_state_pill(todo)

10 11 12 13 14
        %span.author-name
          - if todo.author
            = link_to_author(todo)
          - else
            (removed)
15
      %span.todo-label
16
        = todo_action_name(todo)
17 18 19 20
        - if todo.target
          = todo_target_link(todo)
        - else
          (removed)
21 22 23 24 25

      · #{time_ago_with_tooltip(todo.created_at)}

    - if todo.pending?
      .todo-actions.pull-right
P
Phil Hughes 已提交
26 27
        = link_to [:dashboard, todo], method: :delete, class: 'btn btn-loading done-todo' do
          Done
P
Phil Hughes 已提交
28
          = icon('spinner spin')
29 30 31 32 33

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