2017-07-06 12:24:03 -04:00
|
|
|
- @hide_top_links = true
|
2016-02-20 08:59:59 -05:00
|
|
|
- page_title "Todos"
|
|
|
|
- header_title "Todos", dashboard_todos_path
|
2016-02-12 13:45:44 -05:00
|
|
|
|
2018-12-06 08:41:20 -05:00
|
|
|
= render_if_exists "shared/gold_trial_callout"
|
|
|
|
|
2018-10-06 10:21:38 -04:00
|
|
|
.page-title-holder
|
|
|
|
%h1.page-title= _('Todos')
|
|
|
|
|
2016-10-12 07:40:15 -04:00
|
|
|
- if current_user.todos.any?
|
|
|
|
.top-area
|
2018-04-19 23:34:20 -04:00
|
|
|
%ul.nav-links.mobile-separator.nav.nav-tabs
|
2017-02-12 03:02:26 -05:00
|
|
|
%li.todos-pending{ class: active_when(params[:state].blank? || params[:state] == 'pending') }>
|
2016-10-12 07:40:15 -04:00
|
|
|
= link_to todos_filter_path(state: 'pending') do
|
|
|
|
%span
|
2017-11-02 20:01:56 -04:00
|
|
|
Todos
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2016-10-12 07:40:15 -04:00
|
|
|
= number_with_delimiter(todos_pending_count)
|
2017-02-12 03:02:26 -05:00
|
|
|
%li.todos-done{ class: active_when(params[:state] == 'done') }>
|
2016-10-12 07:40:15 -04:00
|
|
|
= link_to todos_filter_path(state: 'done') do
|
|
|
|
%span
|
|
|
|
Done
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2016-10-12 07:40:15 -04:00
|
|
|
= number_with_delimiter(todos_done_count)
|
2016-02-17 22:20:31 -05:00
|
|
|
|
2016-10-12 07:40:15 -04:00
|
|
|
.nav-controls
|
|
|
|
- if @todos.any?(&:pending?)
|
2017-03-23 02:19:41 -04:00
|
|
|
.append-right-default
|
|
|
|
= 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')
|
2016-02-20 14:53:25 -05:00
|
|
|
|
2016-10-12 07:40:15 -04:00
|
|
|
.todos-filters
|
|
|
|
.row-content-block.second-block
|
2018-07-16 09:35:19 -04:00
|
|
|
= 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-02-23 15:24:28 -05:00
|
|
|
.filter-item.sort-filter
|
|
|
|
.dropdown
|
|
|
|
%button.dropdown-menu-toggle.dropdown-menu-toggle-sort{ type: 'button', 'data-toggle' => 'dropdown' }
|
2016-10-12 07:40:15 -04:00
|
|
|
%span.light
|
|
|
|
- if @sort.present?
|
|
|
|
= sort_options_hash[@sort]
|
|
|
|
- else
|
2016-07-26 17:21:20 -04:00
|
|
|
= sort_title_recently_created
|
2016-11-22 16:28:07 -05:00
|
|
|
= icon('chevron-down')
|
2018-04-17 13:18:41 -04:00
|
|
|
%ul.dropdown-menu.dropdown-menu-sort.dropdown-menu-right
|
2016-10-12 07:40:15 -04:00
|
|
|
%li
|
2017-03-10 06:10:48 -05:00
|
|
|
= link_to todos_filter_path(sort: sort_value_label_priority) do
|
|
|
|
= sort_title_label_priority
|
2016-10-12 07:40:15 -04:00
|
|
|
= 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-07-26 17:21:20 -04:00
|
|
|
|
2017-01-26 13:08:35 -05:00
|
|
|
.js-todos-all
|
|
|
|
- if @todos.any?
|
2017-01-29 04:44:30 -05:00
|
|
|
.js-todos-list-container
|
|
|
|
.js-todos-options{ data: { per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages } }
|
2018-04-10 13:11:34 -04:00
|
|
|
.card.card-without-border.card-without-margin
|
2017-01-29 04:44:30 -05:00
|
|
|
%ul.content-list.todos-list
|
|
|
|
= render @todos
|
|
|
|
= paginate @todos, theme: "gitlab"
|
2017-09-22 04:39:47 -04:00
|
|
|
.js-nothing-here-container.todos-all-done.hidden.svg-content
|
|
|
|
= image_tag 'illustrations/todos_all_done.svg'
|
2017-01-29 04:44:30 -05:00
|
|
|
%h4.text-center
|
|
|
|
You're all done!
|
2017-01-26 13:08:35 -05:00
|
|
|
- elsif current_user.todos.any?
|
|
|
|
.todos-all-done
|
2017-12-11 07:08:55 -05:00
|
|
|
.svg-content.svg-250
|
2017-09-22 04:39:47 -04:00
|
|
|
= image_tag 'illustrations/todos_all_done.svg'
|
2017-01-26 13:08:35 -05:00
|
|
|
- if todos_filter_empty?
|
|
|
|
%h4.text-center
|
|
|
|
= Gitlab.config.gitlab.no_todos_messages.sample
|
2017-12-11 07:08:55 -05:00
|
|
|
%p
|
2017-01-26 13:08:35 -05:00
|
|
|
Are you looking for things to do? Take a look at
|
|
|
|
= succeed "," do
|
|
|
|
= link_to "the opened issues", issues_dashboard_path
|
|
|
|
contribute to
|
|
|
|
= link_to "merge requests", merge_requests_dashboard_path
|
|
|
|
or mention someone in a comment to assign a new todo automatically.
|
|
|
|
- else
|
|
|
|
%h4.text-center
|
|
|
|
There are no todos to show.
|
|
|
|
- else
|
|
|
|
.todos-empty
|
2017-09-22 04:39:47 -04:00
|
|
|
.todos-empty-hero.svg-content
|
|
|
|
= image_tag 'illustrations/todos_empty.svg'
|
2017-01-26 13:08:35 -05:00
|
|
|
.todos-empty-content
|
|
|
|
%h4
|
2017-12-11 07:08:55 -05:00
|
|
|
Todos let you see what you should do next
|
2017-01-26 13:08:35 -05:00
|
|
|
%p
|
|
|
|
When an issue or merge request is assigned to you, or when you
|
|
|
|
%strong
|
|
|
|
@mention
|
|
|
|
in a comment, this will trigger a new item in your todo list, automatically.
|
|
|
|
%p
|
|
|
|
You will always know what to work on next.
|