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

62 lines
2 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
2019-12-04 20:38:33 +05:30
.todo-item.todo-block.align-self-center
.todo-title
2017-08-17 22:00:37 +05:30
- unless todo.build_failed? || todo.unmergeable?
= todo_target_state_pill(todo)
2019-12-04 20:38:33 +05:30
%span.title-item.author-name.bold
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
2019-12-04 20:38:33 +05:30
%span.title-item.action-name
2016-04-02 18:10:28 +05:30
= todo_action_name(todo)
2017-08-17 22:00:37 +05:30
2019-12-04 20:38:33 +05:30
%span.title-item.todo-label.todo-target-link
2016-06-02 11:05:42 +05:30
- if todo.target
= todo_target_link(todo)
- else
2019-12-04 20:38:33 +05:30
= _("(removed)")
%span.title-item.todo-target-title
= todo_target_title(todo)
%span.title-item.todo-project.todo-label
at
= todo_parent_path(todo)
2016-04-02 18:10:28 +05:30
2017-08-17 22:00:37 +05:30
- if todo.self_assigned?
2019-12-04 20:38:33 +05:30
%span.title-item.action-name
2017-08-17 22:00:37 +05:30
to yourself
2019-12-04 20:38:33 +05:30
%span.title-item
2017-08-17 22:00:37 +05:30
·
2019-12-04 20:38:33 +05:30
%span.title-item.todo-timestamp
2017-08-17 22:00:37 +05:30
#{time_ago_with_tooltip(todo.created_at)}
= todo_due_date(todo)
2016-04-02 18:10:28 +05:30
2019-12-04 20:38:33 +05:30
- if todo.note.present?
.todo-body
.todo-note.break-word
.md
= first_line_in_markdown(todo, :body, 150, project: todo.project)
2016-09-29 09:46:39 +05:30
- if todo.pending?
.todo-actions
2020-04-08 14:13:33 +05:30
= link_to dashboard_todo_path(todo), method: :delete, class: 'btn btn-loading d-flex align-items-center js-done-todo', data: { href: dashboard_todo_path(todo) } do
2016-09-29 09:46:39 +05:30
Done
2020-04-08 14:13:33 +05:30
%span.spinner.ml-1
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading d-flex align-items-center js-undo-todo hidden', data: { href: restore_dashboard_todo_path(todo) } do
2017-08-17 22:00:37 +05:30
Undo
2020-04-08 14:13:33 +05:30
%span.spinner.ml-1
2017-08-17 22:00:37 +05:30
- else
.todo-actions
2020-04-08 14:13:33 +05:30
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading d-flex align-items-center js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do
2019-09-30 21:07:59 +05:30
Add a To Do
2020-04-08 14:13:33 +05:30
%span.spinner.ml-1