debian-mirror-gitlab/app/views/shared/_new_project_item_select.html.haml

21 lines
677 B
Text
Raw Normal View History

2015-12-23 02:04:40 +05:30
- if @projects.any?
2016-04-02 18:10:28 +05:30
.prepend-left-10.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' }
2015-12-23 02:04:40 +05:30
%a.btn.btn-new.new-project-item-select-button
= icon('plus')
= local_assigns[:label]
%b.caret
:javascript
$('.new-project-item-select-button').on('click', function() {
2016-04-02 18:10:28 +05:30
$('.project-item-select').select2('open');
2015-12-23 02:04:40 +05:30
});
var relativePath = '#{local_assigns[:path]}';
2016-04-02 18:10:28 +05:30
$('.project-item-select').on('click', function() {
2015-12-23 02:04:40 +05:30
window.location = $(this).val() + '/' + relativePath;
});
new ProjectSelect()