2015-12-23 02:04:40 +05:30
|
|
|
- if @projects.any?
|
2016-06-16 23:09:34 +05:30
|
|
|
.project-item-select-holder
|
2016-04-02 18:10:28 +05:30
|
|
|
= 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
|
|
|
|
= local_assigns[:label]
|
2016-11-03 12:29:30 +05:30
|
|
|
= icon('caret-down')
|
2015-12-23 02:04:40 +05:30
|
|
|
|
|
|
|
: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()
|