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