2016-02-18 17:25:46 -05:00
|
|
|
- page_title "Tasks"
|
|
|
|
- header_title "Tasks", dashboard_tasks_path
|
2016-02-12 13:45:44 -05:00
|
|
|
|
|
|
|
.top-area
|
|
|
|
%ul.nav-links
|
2016-02-17 22:20:31 -05:00
|
|
|
%li{class: ('active' if params[:state].blank? || params[:state] == 'pending')}
|
|
|
|
= link_to page_filter_path(state: 'pending') do
|
|
|
|
%span
|
|
|
|
Tasks
|
|
|
|
%span{class: 'badge'}
|
|
|
|
= tasks_pending_count
|
|
|
|
%li{class: ('active' if params[:state] == 'done')}
|
|
|
|
= link_to page_filter_path(state: 'done') do
|
|
|
|
%span
|
|
|
|
Done
|
|
|
|
%span{class: 'badge'}
|
|
|
|
= tasks_done_count
|
|
|
|
|
|
|
|
.tasks-filters
|
|
|
|
.gray-content-block.second-block
|
|
|
|
= form_tag page_filter_path(without: [:assignee_id, :milestone_title, :label_name, :scope, :sort]), method: :get, class: 'filter-form' do
|
|
|
|
.filter-item.inline
|
|
|
|
= select_tag('project_id', task_projects_options,
|
|
|
|
class: 'select2 trigger-submit', include_blank: true,
|
|
|
|
data: {placeholder: 'Project'})
|
|
|
|
.filter-item.inline
|
|
|
|
= users_select_tag(:author_id, selected: params[:author_id],
|
|
|
|
placeholder: 'Author', class: 'trigger-submit', any_user: "Any Author", first_user: true, current_user: true)
|
|
|
|
.filter-item.inline
|
|
|
|
= select_tag('type', task_types_options,
|
|
|
|
class: 'select2 trigger-submit', include_blank: true,
|
|
|
|
data: {placeholder: 'Type'})
|
|
|
|
.filter-item.inline.actions-filter
|
|
|
|
= select_tag('action_id', task_actions_options,
|
|
|
|
class: 'select2 trigger-submit', include_blank: true,
|
|
|
|
data: {placeholder: 'Action'})
|
2016-02-12 13:45:44 -05:00
|
|
|
|
2016-02-19 13:37:29 -05:00
|
|
|
.prepend-top-default
|
2016-02-12 13:45:44 -05:00
|
|
|
- if @tasks.any?
|
|
|
|
- @tasks.group_by(&:project).each do |group|
|
2016-02-19 13:37:29 -05:00
|
|
|
.panel.panel-default.panel-small
|
2016-02-12 13:45:44 -05:00
|
|
|
- project = group[0]
|
|
|
|
.panel-heading
|
|
|
|
= link_to project.name_with_namespace, namespace_project_path(project.namespace, project)
|
|
|
|
|
|
|
|
%ul.well-list.tasks-list
|
|
|
|
= render group[1]
|
|
|
|
= paginate @tasks, theme: "gitlab"
|
|
|
|
- else
|
|
|
|
.nothing-here-block No tasks to show
|
2016-02-17 22:20:31 -05:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
new UsersSelect();
|
|
|
|
|
|
|
|
$('form.filter-form').on('submit', function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
Turbolinks.visit(this.action + '&' + $(this).serialize());
|
|
|
|
});
|