2016-12-16 11:52:54 +00:00
|
|
|
- type = local_assigns.fetch(:type)
|
|
|
|
|
2016-11-04 21:27:11 +00:00
|
|
|
.issues-filters
|
2016-12-11 00:53:56 +00:00
|
|
|
.issues-details-filters.row-content-block.second-block.filtered-search-block
|
2016-11-04 21:27:11 +00:00
|
|
|
= form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_title, :label_name, :search]), method: :get, class: 'filter-form js-filter-form' do
|
|
|
|
- if params[:search].present?
|
|
|
|
= hidden_field_tag :search, params[:search]
|
|
|
|
- if @bulk_edit
|
|
|
|
.check-all-holder
|
|
|
|
= check_box_tag "check_all_issues", nil, false,
|
|
|
|
class: "check_all_issues left"
|
|
|
|
.issues-other-filters.filtered-search-container
|
|
|
|
.filtered-search-input-container
|
2017-01-30 22:53:18 +00:00
|
|
|
.scroll-container
|
|
|
|
%ul.tokens-container.list-unstyled
|
|
|
|
%li.input-token
|
|
|
|
%input.form-control.filtered-search{ placeholder: 'Search or filter results...', 'data-id' => 'filtered-search', 'data-project-id' => @project.id, 'data-username-params' => @users.to_json(only: [:id, :username]), 'data-base-endpoint' => namespace_project_path(@project.namespace, @project) }
|
|
|
|
= icon('filter')
|
|
|
|
%button.clear-search.hidden{ type: 'button' }
|
|
|
|
= icon('times')
|
2016-12-06 21:13:31 +00:00
|
|
|
#js-dropdown-hint.dropdown-menu.hint-dropdown
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul{ 'data-dropdown' => true }
|
2017-01-21 07:44:36 +00:00
|
|
|
%li.filter-dropdown-item{ 'data-action' => 'submit' }
|
2016-12-06 21:13:31 +00:00
|
|
|
%button.btn.btn-link
|
|
|
|
= icon('search')
|
|
|
|
%span
|
|
|
|
Keep typing and press Enter
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
|
2016-12-06 21:13:31 +00:00
|
|
|
%li.filter-dropdown-item
|
|
|
|
%button.btn.btn-link
|
2017-01-05 17:01:56 +00:00
|
|
|
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
|
|
|
|
-# haml lint's ClassAttributeWithStaticValue
|
2017-01-05 16:57:43 +00:00
|
|
|
%i.fa{ class: "#{'{{icon}}'}" }
|
2016-12-06 21:13:31 +00:00
|
|
|
%span.js-filter-hint
|
|
|
|
{{hint}}
|
|
|
|
%span.js-filter-tag.dropdown-light-content
|
|
|
|
{{tag}}
|
2017-02-15 22:13:53 +00:00
|
|
|
#js-dropdown-author.dropdown-menu{ data: { icon: 'pencil', hint: 'author', tag: '@author' } }
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
|
2016-12-05 19:17:43 +00:00
|
|
|
%li.filter-dropdown-item
|
2016-12-05 18:35:28 +00:00
|
|
|
%button.btn.btn-link.dropdown-user
|
2017-01-05 16:57:43 +00:00
|
|
|
%img.avatar.avatar-inline{ 'data-src' => '{{avatar_url}}', alt: '{{name}}\'s avatar', width: '30' }
|
2016-12-05 18:35:28 +00:00
|
|
|
.dropdown-user-details
|
|
|
|
%span
|
|
|
|
{{name}}
|
|
|
|
%span.dropdown-light-content
|
|
|
|
@{{username}}
|
2017-02-15 22:13:53 +00:00
|
|
|
#js-dropdown-assignee.dropdown-menu{ data: { icon: 'user', hint: 'assignee', tag: '@assignee' } }
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul{ 'data-dropdown' => true }
|
2016-12-14 19:52:11 +00:00
|
|
|
%li.filter-dropdown-item{ 'data-value' => 'none' }
|
2016-12-02 21:04:10 +00:00
|
|
|
%button.btn.btn-link
|
2016-12-11 00:42:20 +00:00
|
|
|
No Assignee
|
2016-12-05 19:00:54 +00:00
|
|
|
%li.divider
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
|
2016-12-05 19:17:43 +00:00
|
|
|
%li.filter-dropdown-item
|
2016-12-05 19:00:54 +00:00
|
|
|
%button.btn.btn-link.dropdown-user
|
2017-01-05 16:57:43 +00:00
|
|
|
%img.avatar.avatar-inline{ 'data-src' => '{{avatar_url}}', alt: '{{name}}\'s avatar', width: '30' }
|
2016-12-05 19:00:54 +00:00
|
|
|
.dropdown-user-details
|
|
|
|
%span
|
|
|
|
{{name}}
|
|
|
|
%span.dropdown-light-content
|
|
|
|
@{{username}}
|
2017-02-15 22:13:53 +00:00
|
|
|
#js-dropdown-milestone.dropdown-menu{ data: { icon: 'clock-o', hint: 'milestone', tag: '%milestone' } }
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul{ 'data-dropdown' => true }
|
2016-12-14 19:52:11 +00:00
|
|
|
%li.filter-dropdown-item{ 'data-value' => 'none' }
|
2016-12-05 19:00:54 +00:00
|
|
|
%button.btn.btn-link
|
2016-12-11 00:42:20 +00:00
|
|
|
No Milestone
|
2016-12-14 19:52:11 +00:00
|
|
|
%li.filter-dropdown-item{ 'data-value' => 'upcoming' }
|
2016-12-11 00:42:20 +00:00
|
|
|
%button.btn.btn-link
|
|
|
|
Upcoming
|
2016-12-05 19:00:54 +00:00
|
|
|
%li.divider
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
|
2016-12-05 19:17:43 +00:00
|
|
|
%li.filter-dropdown-item
|
2016-12-12 00:05:55 +00:00
|
|
|
%button.btn.btn-link.js-data-value
|
2016-12-02 22:43:15 +00:00
|
|
|
{{title}}
|
2017-02-15 22:13:53 +00:00
|
|
|
#js-dropdown-label.dropdown-menu{ data: { icon: 'tag', hint: 'label', tag: '~label' } }
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul{ 'data-dropdown' => true }
|
2016-12-14 19:52:11 +00:00
|
|
|
%li.filter-dropdown-item{ 'data-value' => 'none' }
|
2016-12-05 19:00:54 +00:00
|
|
|
%button.btn.btn-link
|
2016-12-11 00:42:20 +00:00
|
|
|
No Label
|
2016-12-05 19:00:54 +00:00
|
|
|
%li.divider
|
2016-12-09 18:11:29 +00:00
|
|
|
%ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
|
2016-12-05 19:17:43 +00:00
|
|
|
%li.filter-dropdown-item
|
2016-12-02 22:43:15 +00:00
|
|
|
%button.btn.btn-link
|
2017-01-05 16:57:43 +00:00
|
|
|
%span.dropdown-label-box{ style: 'background: {{color}}' }
|
2016-12-12 00:05:55 +00:00
|
|
|
%span.label-title.js-data-value
|
2016-12-05 22:05:30 +00:00
|
|
|
{{title}}
|
2017-03-07 09:24:01 +00:00
|
|
|
.filter-dropdown-container
|
|
|
|
- if type == :boards
|
|
|
|
- if can?(current_user, :admin_list, @project)
|
|
|
|
.dropdown.prepend-left-10
|
|
|
|
%button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path, namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path) } }
|
|
|
|
Add list
|
|
|
|
.dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable
|
|
|
|
= render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" }
|
|
|
|
- if can?(current_user, :admin_label, @project)
|
|
|
|
= render partial: "shared/issuable/label_page_create"
|
|
|
|
= dropdown_loading
|
|
|
|
#js-add-issues-btn.prepend-left-10
|
|
|
|
- else
|
|
|
|
= render 'shared/sort_dropdown'
|
2016-11-04 21:27:11 +00:00
|
|
|
|
|
|
|
- if @bulk_edit
|
|
|
|
.issues_bulk_update.hide
|
|
|
|
= form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: 'bulk-update' do
|
|
|
|
.filter-item.inline
|
|
|
|
= dropdown_tag("Status", options: { toggle_class: "js-issue-status", title: "Change status", dropdown_class: "dropdown-menu-status dropdown-menu-selectable", data: { field_name: "update[state_event]" } } ) do
|
|
|
|
%ul
|
|
|
|
%li
|
2017-01-05 16:57:43 +00:00
|
|
|
%a{ href: "#", data: { id: "reopen" } } Open
|
2016-11-04 21:27:11 +00:00
|
|
|
%li
|
2017-01-05 16:57:43 +00:00
|
|
|
%a{ href: "#", data: { id: "close" } } Closed
|
2016-11-04 21:27:11 +00:00
|
|
|
.filter-item.inline
|
|
|
|
= dropdown_tag("Assignee", options: { toggle_class: "js-user-search js-update-assignee js-filter-submit js-filter-bulk-update", title: "Assign to", filter: true, dropdown_class: "dropdown-menu-user dropdown-menu-selectable",
|
|
|
|
placeholder: "Search authors", data: { first_user: (current_user.username if current_user), null_user: true, current_user: true, project_id: @project.id, field_name: "update[assignee_id]" } })
|
|
|
|
.filter-item.inline
|
|
|
|
= dropdown_tag("Milestone", options: { title: "Assign milestone", toggle_class: 'js-milestone-select js-extra-options js-filter-submit js-filter-bulk-update', filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone", placeholder: "Search milestones", data: { show_no: true, field_name: "update[milestone_id]", project_id: @project.id, milestones: namespace_project_milestones_path(@project.namespace, @project, :json), use_id: true } })
|
|
|
|
.filter-item.inline.labels-filter
|
2017-01-27 19:25:13 +00:00
|
|
|
= render "shared/issuable/label_dropdown", classes: ['js-filter-bulk-update', 'js-multiselect'], dropdown_title: 'Apply a label', show_create: false, show_footer: false, extra_options: false, filter_submit: false, data_options: { persist_when_hide: "true", field_name: "update[label_ids][]", show_no: false, show_any: false, use_id: true }
|
2016-11-04 21:27:11 +00:00
|
|
|
.filter-item.inline
|
|
|
|
= dropdown_tag("Subscription", options: { toggle_class: "js-subscription-event", title: "Change subscription", dropdown_class: "dropdown-menu-selectable", data: { field_name: "update[subscription_event]" } } ) do
|
|
|
|
%ul
|
|
|
|
%li
|
2017-01-05 16:57:43 +00:00
|
|
|
%a{ href: "#", data: { id: "subscribe" } } Subscribe
|
2016-11-04 21:27:11 +00:00
|
|
|
%li
|
2017-01-05 16:57:43 +00:00
|
|
|
%a{ href: "#", data: { id: "unsubscribe" } } Unsubscribe
|
2016-11-04 21:27:11 +00:00
|
|
|
|
|
|
|
= hidden_field_tag 'update[issuable_ids]', []
|
|
|
|
= hidden_field_tag :state_event, params[:state_event]
|
2017-03-07 22:08:29 +00:00
|
|
|
.filter-item.inline.update-issues-btn
|
2016-11-04 21:27:11 +00:00
|
|
|
= button_tag "Update #{type.to_s.humanize(capitalize: false)}", class: "btn update_selected_issues btn-save"
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
new UsersSelect();
|
|
|
|
new LabelsSelect();
|
|
|
|
new MilestoneSelect();
|
|
|
|
new IssueStatusSelect();
|
|
|
|
new SubscriptionSelect();
|
2017-01-20 22:59:27 +00:00
|
|
|
|
|
|
|
$(document).off('page:restore').on('page:restore', function (event) {
|
|
|
|
if (gl.FilteredSearchManager) {
|
|
|
|
new gl.FilteredSearchManager();
|
|
|
|
}
|
|
|
|
Issuable.init();
|
|
|
|
new gl.IssuableBulkActions({
|
|
|
|
prefixId: 'issue_',
|
|
|
|
});
|
|
|
|
});
|