2017-08-17 22:00:37 +05:30
|
|
|
- is_collapsed = local_assigns.fetch(:is_collapsed, false)
|
2018-03-17 18:26:18 +05:30
|
|
|
- mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : _('Mark done')
|
|
|
|
- todo_content = is_collapsed ? icon('plus-square') : _('Add todo')
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
%button.issuable-todo-btn.js-issuable-todo{ type: 'button',
|
|
|
|
class: (is_collapsed ? 'btn-blank sidebar-collapsed-icon dont-change-state has-tooltip' : 'btn btn-default issuable-header-btn pull-right'),
|
2018-03-17 18:26:18 +05:30
|
|
|
title: (todo.nil? ? _('Add todo') : _('Mark done')),
|
|
|
|
'aria-label' => (todo.nil? ? _('Add todo') : _('Mark done')),
|
2017-08-17 22:00:37 +05:30
|
|
|
data: issuable_todo_button_data(issuable, todo, is_collapsed) }
|
|
|
|
%span.issuable-todo-inner.js-issuable-todo-inner<
|
|
|
|
- if todo
|
|
|
|
= mark_content
|
|
|
|
- else
|
|
|
|
= todo_content
|
|
|
|
= icon('spin spinner', 'aria-hidden': 'true')
|