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

68 lines
3.5 KiB
Text
Raw Normal View History

2023-03-04 22:38:38 +05:30
%li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer.gl-relative{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo) }
.gl-display-flex.gl-flex-direction-column.gl-sm-flex-direction-row.gl-sm-align-items-center
.todo-item.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center.gl-w-full{ data: { qa_selector: "todo_item_container" } }
2023-03-17 16:20:25 +05:30
.todo-title.gl-pt-2.gl-pb-3.gl-px-2.gl-md-mb-1.gl-font-sm.gl-text-secondary
2023-03-04 22:38:38 +05:30
= todo_target_state_pill(todo)
%span.todo-target-title{ data: { qa_selector: "todo_target_title_content" }, :id => dom_id(todo) + "_describer" }
= todo_target_title(todo)
- if !todo.for_design? && !todo.member_access_requested?
·
%span
= todo_parent_path(todo)
%span.todo-label
2021-06-08 01:23:25 +05:30
- if todo.target
2023-03-17 16:20:25 +05:30
= link_to todo_target_name(todo), todo_target_path(todo), class: 'todo-target-link gl-text-secondary! gl-text-decoration-none!', :'aria-describedby' => dom_id(todo) + "_describer", :'aria-label' => todo_target_aria_label(todo)
2016-06-02 11:05:42 +05:30
- else
2021-06-08 01:23:25 +05:30
= _("(removed)")
2023-03-04 22:38:38 +05:30
.todo-body.gl-mb-2.gl-px-2.gl-display-flex.gl-align-items-flex-start.gl-lg-align-items-center
.todo-avatar.gl-display-none.gl-sm-display-inline-block
= author_avatar(todo, size: 24)
.todo-note
- if todo_author_display?(todo)
2023-03-17 16:20:25 +05:30
.author-name.bold.gl-display-inline<
2023-03-04 22:38:38 +05:30
- if todo.author
= link_to_author(todo, self_added: todo.self_added?)
- else
= _('(removed)')
2023-03-17 16:20:25 +05:30
- if todo.note.present?
\:
2021-06-08 01:23:25 +05:30
2023-03-04 22:38:38 +05:30
%span.action-name{ data: { qa_selector: "todo_action_name_content" } }<
2023-03-17 16:20:25 +05:30
- if !todo.note.present?
= todo_action_name(todo)
- unless todo.self_assigned?
\.
2021-06-08 01:23:25 +05:30
2023-03-04 22:38:38 +05:30
- if todo.self_assigned?
%span.action-name<
= todo_self_addressing(todo)
\.
- if todo.note.present?
2023-03-17 16:20:25 +05:30
%span.action-description<
= first_line_in_markdown(todo, :body, 125, is_todo: true, project: todo.project, group: todo.group)
2021-06-08 01:23:25 +05:30
2023-03-04 22:38:38 +05:30
.todo-timestamp.gl-white-space-nowrap.gl-sm-ml-3.gl-mt-2.gl-mb-2.gl-sm-my-0.gl-px-2.gl-sm-px-0
2023-03-17 16:20:25 +05:30
%span.todo-timestamp.gl-font-sm.gl-text-secondary
2023-03-04 22:38:38 +05:30
= todo_due_date(todo)
#{time_ago_with_tooltip(todo.created_at)}
2021-06-08 01:23:25 +05:30
2023-03-04 22:38:38 +05:30
.todo-actions.gl-mr-4.gl-px-2.gl-sm-px-0.gl-sm-mx-0
2021-06-08 01:23:25 +05:30
- if todo.pending?
2023-03-04 22:38:38 +05:30
= render Pajamas::ButtonComponent.new(button_options: { class: 'btn-loading btn-icon gl-display-flex js-done-todo has-tooltip', title: _('Mark as done')}, method: :delete, href: dashboard_todo_path(todo)), 'aria-label' => _('Mark as done') do
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2023-03-04 22:38:38 +05:30
= sprite_icon('check', css_class: 'js-todo-button-icon')
= render Pajamas::ButtonComponent.new(button_options: { class: 'btn-loading btn-icon gl-display-flex js-undo-todo hidden has-tooltip', title: _('Undo')}, method: :patch, href: restore_dashboard_todo_path(todo)), 'aria-label' => _('Undo') do
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2023-03-04 22:38:38 +05:30
= sprite_icon('redo', css_class: 'js-todo-button-icon')
2021-06-08 01:23:25 +05:30
- else
2023-03-04 22:38:38 +05:30
= render Pajamas::ButtonComponent.new(button_options: { class: 'btn-loading btn-icon gl-display-flex js-add-todo has-tooltip', title: _('Add a to do')}, method: :patch, href: restore_dashboard_todo_path(todo)), 'aria-label' => _('Add a to do') do
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2023-03-04 22:38:38 +05:30
= sprite_icon('todo-add', css_class: 'js-todo-button-icon')