gitlab-org--gitlab-foss/app/views/shared/_new_project_item_select.html.haml

20 lines
652 B
Text
Raw Normal View History

- if @projects.any?
.project-item-select-holder
= project_select_tag :project_path, class: "project-item-select", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at' }
%a.btn.btn-new.new-project-item-select-button
= local_assigns[:label]
= icon('caret-down')
:javascript
$('.new-project-item-select-button').on('click', function() {
2016-01-15 04:13:12 -05:00
$('.project-item-select').select2('open');
});
var relativePath = '#{local_assigns[:path]}';
2016-01-15 04:13:12 -05:00
$('.project-item-select').on('click', function() {
window.location = $(this).val() + '/' + relativePath;
});
new ProjectSelect()