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

62 lines
2.6 KiB
Text
Raw Normal View History

2022-10-11 01:57:18 +05:30
%li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo), data: { url: todo_target_path(todo) } }
2021-06-08 01:23:25 +05:30
.gl-display-flex.gl-flex-direction-row
.todo-avatar.gl-display-none.gl-sm-display-inline-block
= author_avatar(todo, size: 40)
2021-09-04 01:27:46 +05:30
.todo-item.flex-fill.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center{ data: { qa_selector: "todo_item_container" } }
2021-06-08 01:23:25 +05:30
.todo-title.gl-mb-3.gl-md-mb-0
- if todo_author_display?(todo)
= todo_target_state_pill(todo)
%span.title-item.author-name.bold
- if todo.author
= link_to_author(todo, self_added: todo.self_added?)
- else
2022-08-13 15:12:31 +05:30
= _('(removed)')
2021-06-08 01:23:25 +05:30
%span.title-item.action-name{ data: { qa_selector: "todo_action_name_content" } }
= todo_action_name(todo)
%span.title-item.todo-label.todo-target-link
- if todo.target
= todo_target_link(todo)
2016-06-02 11:05:42 +05:30
- else
2021-06-08 01:23:25 +05:30
= _("(removed)")
%span.title-item.todo-target-title{ data: { qa_selector: "todo_target_title_content" } }
= todo_target_title(todo)
%span.title-item.todo-project.todo-label
at
= todo_parent_path(todo)
- if todo.self_assigned?
%span.title-item.action-name
= todo_self_addressing(todo)
%span.title-item
·
%span.title-item.todo-timestamp
#{time_ago_with_tooltip(todo.created_at)}
= todo_due_date(todo)
- if todo.note.present?
.todo-body
.todo-note.break-word
.md
2022-08-13 15:12:31 +05:30
= first_line_in_markdown(todo, :body, 150, project: todo.project, group: todo.group)
2021-06-08 01:23:25 +05:30
.todo-actions.gl-ml-3
- if todo.pending?
2022-10-11 01:57:18 +05:30
= link_to dashboard_todo_path(todo), method: :delete, class: 'gl-button gl-bg-gray-50 btn btn-default btn-loading d-flex align-items-center js-done-todo', data: { href: dashboard_todo_path(todo) } do
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2022-08-13 15:12:31 +05:30
= _('Done')
2022-10-11 01:57:18 +05:30
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'gl-button gl-bg-gray-50 btn btn-default btn-loading d-flex align-items-center js-undo-todo hidden', data: { href: restore_dashboard_todo_path(todo) } do
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2022-08-13 15:12:31 +05:30
= _('Undo')
2021-06-08 01:23:25 +05:30
- else
2022-10-11 01:57:18 +05:30
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'gl-button gl-bg-gray-50 btn btn-default btn-loading d-flex align-items-center js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2022-08-13 15:12:31 +05:30
= _('Add a to do')