diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-03-16 14:29:10 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-03-16 14:29:10 +0300 |
commit | 774e0e3bfe2d35e8b7eb704ab856549559965dfe (patch) | |
tree | 71fcb583132741efaa3db2055d9962c2d175d338 /app/views/dashboard/todos/index.html.haml | |
parent | 9ce549b22ae453acf87b883afe8943123d0c48fe (diff) | |
parent | 5f9ace8eb1d71b35c92156177465b066ebbc4a3e (diff) |
Merge branch '27114-add-undo-mark-all-as-done-to-todos' into 'master'
Add 'Undo mark all as done' to Todos
Closes #27114
See merge request !9890
Diffstat (limited to 'app/views/dashboard/todos/index.html.haml')
-rw-r--r-- | app/views/dashboard/todos/index.html.haml | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 3ed67d9258c..d31ced004a0 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -19,9 +19,12 @@ .nav-controls - if @todos.any?(&:pending?) - = link_to destroy_all_dashboard_todos_path(todos_filter_params), class: 'btn btn-loading js-todos-mark-all', method: :delete do + = link_to destroy_all_dashboard_todos_path(todos_filter_params), class: 'btn btn-loading js-todos-mark-all', method: :delete, data: { href: destroy_all_dashboard_todos_path(todos_filter_params) } do Mark all as done = icon('spinner spin') + = link_to bulk_restore_dashboard_todos_path, class: 'btn btn-loading js-todos-undo-all hidden', method: :patch , data: { href: bulk_restore_dashboard_todos_path(todos_filter_params) } do + Undo mark all as done + = icon('spinner spin') .todos-filters .row-content-block.second-block @@ -67,12 +70,16 @@ .js-todos-all - if @todos.any? - .js-todos-options{ data: {per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages} } - .panel.panel-default.panel-small.panel-without-border - %ul.content-list.todos-list - = render @todos - = paginate @todos, theme: "gitlab" - + .js-todos-list-container + .js-todos-options{ data: { per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages } } + .panel.panel-default.panel-small.panel-without-border + %ul.content-list.todos-list + = render @todos + = paginate @todos, theme: "gitlab" + .js-nothing-here-container.todos-all-done.hidden + = render "shared/empty_states/icons/todos_all_done.svg" + %h4.text-center + You're all done! - elsif current_user.todos.any? .todos-all-done = render "shared/empty_states/icons/todos_all_done.svg" |