BigW Consortium Gitlab

index.html.haml 3.62 KB
Newer Older
1
- page_title "Projects"
2 3
= render 'shared/show_aside'

4
.row
5
  %aside.col-md-3
6
    .admin-filter
Vinnie Okada committed
7
      = form_tag admin_namespaces_projects_path, method: :get, class: '' do
8
        .form-group
9 10
          = label_tag :name, 'Name:'
          = text_field_tag :name, params[:name], class: "form-control"
11

12
        .form-group
13 14 15 16 17 18
          = label_tag :namespace_id, "Namespace"
          = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'

        .form-group
          %strong Activity
          .checkbox
19 20 21
            = label_tag :with_push do
              = check_box_tag :with_push, 1, params[:with_push]
              %span Projects with push events
22
          .checkbox
23 24 25
            = label_tag :abandoned do
              = check_box_tag :abandoned, 1, params[:abandoned]
              %span No activity over 6 month
26

27 28 29 30 31 32 33 34 35 36
        %fieldset
          %strong Visibility level:
          .visibility-levels
            - Project.visibility_levels.each do |label, level|
              .checkbox
                %label
                  = check_box_tag 'visibility_levels[]', level, params[:visibility_levels].present? && params[:visibility_levels].include?(level.to_s)
                  %span.descr
                    = visibility_level_icon(level)
                    = label
37 38
        %hr
        = hidden_field_tag :sort, params[:sort]
39
        = button_tag "Search", class: "btn submit btn-primary"
Vinnie Okada committed
40
        = link_to "Reset", admin_namespaces_projects_path, class: "btn btn-cancel"
41

42
  %section.col-md-9
43
    .panel.panel-default
44
      .panel-heading
45
        Projects (#{@projects.total_count})
46
        .panel-head-actions
47
          .dropdown.inline
48
            %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'}
49 50
              %span.light sort:
              - if @sort.present?
51
                = sort_options_hash[@sort]
52
              - else
53
                = sort_title_recently_created
54 55 56
              %b.caret
            %ul.dropdown-menu
              %li
Vinnie Okada committed
57
                = link_to admin_namespaces_projects_path(sort: sort_value_recently_created) do
58
                  = sort_title_recently_created
Vinnie Okada committed
59
                = link_to admin_namespaces_projects_path(sort: sort_value_oldest_created) do
60
                  = sort_title_oldest_created
Vinnie Okada committed
61
                = link_to admin_namespaces_projects_path(sort: sort_value_recently_updated) do
62
                  = sort_title_recently_updated
Vinnie Okada committed
63
                = link_to admin_namespaces_projects_path(sort: sort_value_oldest_updated) do
64
                  = sort_title_oldest_updated
Vinnie Okada committed
65
                = link_to admin_namespaces_projects_path(sort: sort_value_largest_repo) do
66
                  = sort_title_largest_repo
67
          = link_to 'New Project', new_project_path, class: "btn btn-sm btn-success"
68 69 70
      %ul.well-list
        - @projects.each do |project|
          %li
71 72 73
            .list-item-name
              %span{ class: visibility_level_color(project.visibility_level) }
                = visibility_level_icon(project.visibility_level)
Vinnie Okada committed
74
              = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
75
            .pull-right
76 77
              %span.label.label-gray
                = repository_size(project)
Dmitriy Zaporozhets committed
78 79
              = link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-sm"
              = link_to 'Destroy', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-sm btn-remove"
80
        - if @projects.blank?
Dmitriy Zaporozhets committed
81
          .nothing-here-block 0 projects matches
82
    = paginate @projects, theme: "gitlab"