2017-09-10 17:25:29 +05:30
|
|
|
- @hide_top_links = true
|
2020-07-28 23:09:34 +05:30
|
|
|
- page_title _("To-Do List")
|
|
|
|
- header_title _("To-Do List"), dashboard_todos_path
|
2016-04-02 18:10:28 +05:30
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
= render_dashboard_gold_trial(current_user)
|
2021-01-03 14:25:43 +05:30
|
|
|
- add_page_specific_style 'page_bundles/todos'
|
2019-02-15 15:39:39 +05:30
|
|
|
|
2019-07-31 22:56:46 +05:30
|
|
|
.page-title-holder.d-flex.align-items-center
|
2019-09-30 21:07:59 +05:30
|
|
|
%h1.page-title= _('To-Do List')
|
2018-12-05 23:21:45 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
- if current_user.todos.any?
|
|
|
|
.top-area
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.nav-links.mobile-separator.nav.nav-tabs
|
2017-08-17 22:00:37 +05:30
|
|
|
%li.todos-pending{ class: active_when(params[:state].blank? || params[:state] == 'pending') }>
|
|
|
|
= link_to todos_filter_path(state: 'pending') do
|
|
|
|
%span
|
2019-09-30 21:07:59 +05:30
|
|
|
To Do
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill
|
2017-08-17 22:00:37 +05:30
|
|
|
= number_with_delimiter(todos_pending_count)
|
|
|
|
%li.todos-done{ class: active_when(params[:state] == 'done') }>
|
|
|
|
= link_to todos_filter_path(state: 'done') do
|
|
|
|
%span
|
|
|
|
Done
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill
|
2017-08-17 22:00:37 +05:30
|
|
|
= number_with_delimiter(todos_done_count)
|
2016-04-02 18:10:28 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
.nav-controls
|
|
|
|
- if @todos.any?(&:pending?)
|
2020-07-28 23:09:34 +05:30
|
|
|
.gl-mr-3
|
2021-01-29 00:20:46 +05:30
|
|
|
= link_to destroy_all_dashboard_todos_path(todos_filter_params), class: 'gl-button btn btn-loading align-items-center js-todos-mark-all', method: :delete, data: { href: destroy_all_dashboard_todos_path(todos_filter_params) } do
|
2017-08-17 22:00:37 +05:30
|
|
|
Mark all as done
|
2020-04-08 14:13:33 +05:30
|
|
|
%span.spinner.ml-1
|
2021-01-29 00:20:46 +05:30
|
|
|
= link_to bulk_restore_dashboard_todos_path, class: 'gl-button btn btn-loading align-items-center js-todos-undo-all hidden', method: :patch , data: { href: bulk_restore_dashboard_todos_path(todos_filter_params) } do
|
2017-08-17 22:00:37 +05:30
|
|
|
Undo mark all as done
|
2020-04-08 14:13:33 +05:30
|
|
|
%span.spinner.ml-1
|
2016-04-02 18:10:28 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
.todos-filters
|
2019-09-04 21:01:54 +05:30
|
|
|
.issues-details-filters.row-content-block.second-block
|
2018-11-18 11:00:15 +05:30
|
|
|
= form_tag todos_filter_path(without: [:project_id, :author_id, :type, :action_id]), method: :get, class: 'filter-form d-sm-flex' do
|
|
|
|
.filter-categories.flex-fill
|
|
|
|
.filter-item.inline
|
|
|
|
- if params[:group_id].present?
|
|
|
|
= hidden_field_tag(:group_id, params[:group_id])
|
|
|
|
= dropdown_tag(group_dropdown_label(params[:group_id], 'Group'), options: { toggle_class: 'js-group-search js-filter-submit', title: 'Filter by group', filter: true, filterInput: 'input#group-search', dropdown_class: 'dropdown-menu-selectable dropdown-menu-group js-filter-submit',
|
|
|
|
placeholder: 'Search groups', data: { data: todo_group_options, default_label: 'Group', display: 'static' } })
|
|
|
|
.filter-item.inline
|
|
|
|
- if params[:project_id].present?
|
|
|
|
= hidden_field_tag(:project_id, params[:project_id])
|
|
|
|
= dropdown_tag(project_dropdown_label(params[:project_id], 'Project'), options: { toggle_class: 'js-project-search js-filter-submit', title: 'Filter by project', filter: true, filterInput: 'input#project-search', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit',
|
|
|
|
placeholder: 'Search projects', data: { data: todo_projects_options, default_label: 'Project', display: 'static' } })
|
|
|
|
.filter-item.inline
|
|
|
|
- if params[:author_id].present?
|
|
|
|
= hidden_field_tag(:author_id, params[:author_id])
|
|
|
|
= dropdown_tag(user_dropdown_label(params[:author_id], 'Author'), options: { toggle_class: 'js-user-search js-filter-submit js-author-search', title: 'Filter by author', filter: true, filterInput: 'input#author-search', dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author js-filter-submit',
|
|
|
|
placeholder: 'Search authors', data: { any_user: 'Any Author', first_user: (current_user.username if current_user), project_id: (@project.id if @project), selected: params[:author_id], field_name: 'author_id', default_label: 'Author', todo_filter: true, todo_state_filter: params[:state] || 'pending' } })
|
|
|
|
.filter-item.inline
|
|
|
|
- if params[:type].present?
|
|
|
|
= hidden_field_tag(:type, params[:type])
|
|
|
|
= dropdown_tag(todo_types_dropdown_label(params[:type], 'Type'), options: { toggle_class: 'js-type-search js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-type js-filter-submit',
|
|
|
|
data: { data: todo_types_options, default_label: 'Type' } })
|
|
|
|
.filter-item.inline.actions-filter
|
|
|
|
- if params[:action_id].present?
|
|
|
|
= hidden_field_tag(:action_id, params[:action_id])
|
|
|
|
= dropdown_tag(todo_actions_dropdown_label(params[:action_id], 'Action'), options: { toggle_class: 'js-action-search js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-action js-filter-submit',
|
|
|
|
data: { data: todo_actions_options, default_label: 'Action' } })
|
2017-08-17 22:00:37 +05:30
|
|
|
.filter-item.sort-filter
|
|
|
|
.dropdown
|
|
|
|
%button.dropdown-menu-toggle.dropdown-menu-toggle-sort{ type: 'button', 'data-toggle' => 'dropdown' }
|
|
|
|
%span.light
|
|
|
|
- if @sort.present?
|
|
|
|
= sort_options_hash[@sort]
|
|
|
|
- else
|
2016-09-13 17:45:13 +05:30
|
|
|
= sort_title_recently_created
|
2021-02-22 17:27:13 +05:30
|
|
|
= sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.dropdown-menu.dropdown-menu-sort.dropdown-menu-right
|
2017-08-17 22:00:37 +05:30
|
|
|
%li
|
|
|
|
= link_to todos_filter_path(sort: sort_value_label_priority) do
|
|
|
|
= sort_title_label_priority
|
|
|
|
= link_to todos_filter_path(sort: sort_value_recently_created) do
|
|
|
|
= sort_title_recently_created
|
|
|
|
= link_to todos_filter_path(sort: sort_value_oldest_created) do
|
|
|
|
= sort_title_oldest_created
|
2016-09-13 17:45:13 +05:30
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
.todos-list-container.js-todos-all
|
2016-04-02 18:10:28 +05:30
|
|
|
- if @todos.any?
|
2021-01-03 14:25:43 +05:30
|
|
|
.js-todos-list-container{ data: { qa_selector: "todos_list_container" } }
|
2017-08-17 22:00:37 +05:30
|
|
|
.js-todos-options{ data: { per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages } }
|
2021-02-22 17:27:13 +05:30
|
|
|
%ul.content-list.todos-list
|
|
|
|
= render @todos
|
2017-08-17 22:00:37 +05:30
|
|
|
= paginate @todos, theme: "gitlab"
|
2018-03-17 18:26:18 +05:30
|
|
|
.js-nothing-here-container.todos-all-done.hidden.svg-content
|
|
|
|
= image_tag 'illustrations/todos_all_done.svg'
|
2017-08-17 22:00:37 +05:30
|
|
|
%h4.text-center
|
|
|
|
You're all done!
|
|
|
|
- elsif current_user.todos.any?
|
|
|
|
.todos-all-done
|
2018-03-17 18:26:18 +05:30
|
|
|
.svg-content.svg-250
|
|
|
|
= image_tag 'illustrations/todos_all_done.svg'
|
2017-08-17 22:00:37 +05:30
|
|
|
- if todos_filter_empty?
|
|
|
|
%h4.text-center
|
|
|
|
= Gitlab.config.gitlab.no_todos_messages.sample
|
2018-03-17 18:26:18 +05:30
|
|
|
%p
|
2017-08-17 22:00:37 +05:30
|
|
|
Are you looking for things to do? Take a look at
|
|
|
|
= succeed "," do
|
2019-09-30 21:07:59 +05:30
|
|
|
= link_to "open issues", issues_dashboard_path
|
2017-08-17 22:00:37 +05:30
|
|
|
contribute to
|
2019-09-30 21:07:59 +05:30
|
|
|
= link_to "a merge request\,", merge_requests_dashboard_path
|
|
|
|
or mention someone in a comment to automatically assign them a new to-do item.
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
|
|
|
%h4.text-center
|
2019-09-30 21:07:59 +05:30
|
|
|
Nothing is on your to-do list. Nice work!
|
2016-04-02 18:10:28 +05:30
|
|
|
- else
|
2017-08-17 22:00:37 +05:30
|
|
|
.todos-empty
|
2018-03-17 18:26:18 +05:30
|
|
|
.todos-empty-hero.svg-content
|
|
|
|
= image_tag 'illustrations/todos_empty.svg'
|
2021-01-29 00:20:46 +05:30
|
|
|
.todos-empty-content.gl-mx-5
|
2017-08-17 22:00:37 +05:30
|
|
|
%h4
|
2019-09-30 21:07:59 +05:30
|
|
|
Your To-Do List shows what to work on next
|
2017-08-17 22:00:37 +05:30
|
|
|
%p
|
2019-09-30 21:07:59 +05:30
|
|
|
When an issue or merge request is assigned to you, or when you receive a
|
2017-08-17 22:00:37 +05:30
|
|
|
%strong
|
|
|
|
@mention
|
2019-09-30 21:07:59 +05:30
|
|
|
in a comment, this automatically triggers a new item in your To-Do List.
|
2017-08-17 22:00:37 +05:30
|
|
|
%p
|
2019-09-30 21:07:59 +05:30
|
|
|
It's how you always know what to work on next.
|