debian-mirror-gitlab/app/views/dashboard/todos/_todo.html.haml

54 lines
1.6 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
%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)
2016-09-29 09:46:39 +05:30
2016-06-02 11:05:42 +05:30
.todo-item.todo-block
.todo-title.title
2017-08-17 22:00:37 +05:30
- unless todo.build_failed? || todo.unmergeable?
= todo_target_state_pill(todo)
2017-08-17 22:00:37 +05:30
.title-item.author-name
2016-06-02 11:05:42 +05:30
- if todo.author
2017-08-17 22:00:37 +05:30
= link_to_author(todo, self_added: todo.self_added?)
2016-06-02 11:05:42 +05:30
- else
(removed)
2017-08-17 22:00:37 +05:30
.title-item.action-name
2016-04-02 18:10:28 +05:30
= todo_action_name(todo)
2017-08-17 22:00:37 +05:30
.title-item.todo-label
2016-06-02 11:05:42 +05:30
- if todo.target
= todo_target_link(todo)
- else
(removed)
2016-04-02 18:10:28 +05:30
2017-08-17 22:00:37 +05:30
- if todo.self_assigned?
.title-item.action-name
to yourself
.title-item
·
.title-item
#{time_ago_with_tooltip(todo.created_at)}
= todo_due_date(todo)
2016-04-02 18:10:28 +05:30
.todo-body
.todo-note
.md
= event_note(todo.body, project: todo.project)
2016-09-29 09:46:39 +05:30
- if todo.pending?
.todo-actions
2017-08-17 22:00:37 +05:30
= link_to dashboard_todo_path(todo), method: :delete, class: 'btn btn-loading js-done-todo', data: { href: dashboard_todo_path(todo) } do
2016-09-29 09:46:39 +05:30
Done
= icon('spinner spin')
2017-08-17 22:00:37 +05:30
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading js-undo-todo hidden', data: { href: restore_dashboard_todo_path(todo) } do
Undo
= icon('spinner spin')
- else
.todo-actions
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do
Add todo
= icon('spinner spin')