Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_new_project_item_select.html.haml « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 51622931e24c0cf422cc47c4b355e690fcaea11b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- 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]
      %b.caret

  :javascript
    $('.new-project-item-select-button').on('click', function() {
      $('.project-item-select').select2('open');
    });

    var relativePath = '#{local_assigns[:path]}';

    $('.project-item-select').on('click', function() {
      window.location = $(this).val() + '/' + relativePath;
    });

    new ProjectSelect()