20 lines
663 B
Text
20 lines
663 B
Text
- if @projects.any?
|
|
.prepend-left-10.new-project-item-select-holder
|
|
= project_select_tag :project_path, class: "new-project-item-select", data: { include_groups: local_assigns[:include_groups] }
|
|
%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() {
|
|
$('.new-project-item-select').select2('open');
|
|
});
|
|
|
|
var relativePath = '#{local_assigns[:path]}';
|
|
|
|
$('.new-project-item-select').on('click', function() {
|
|
window.location = $(this).val() + '/' + relativePath;
|
|
});
|
|
|
|
new ProjectSelect()
|