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

62 lines
2.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
2021-01-03 14:25:43 +05:30
.todo-item.todo-block.align-self-center{ data: { qa_selector: "todo_item_container" } }
2019-12-04 20:38:33 +05:30
.todo-title
2020-07-28 23:09:34 +05:30
- if todo_author_display?(todo)
= 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
2021-01-03 14:25:43 +05:30
%span.title-item.action-name{ data: { qa_selector: "todo_action_name_content" } }
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)")
2021-01-03 14:25:43 +05:30
%span.title-item.todo-target-title{ data: { qa_selector: "todo_target_title_content" } }
2019-12-04 20:38:33 +05:30
= 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
2021-01-03 14:25:43 +05:30
= todo_self_addressing(todo)
2017-08-17 22:00:37 +05:30
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
2021-01-29 00:20:46 +05:30
= link_to dashboard_todo_path(todo), method: :delete, class: 'gl-button 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
2021-01-29 00:20:46 +05:30
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'gl-button 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
2021-01-29 00:20:46 +05:30
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'gl-button btn btn-loading d-flex align-items-center js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do
2021-01-03 14:25:43 +05:30
Add a to do
2020-04-08 14:13:33 +05:30
%span.spinner.ml-1