BigW Consortium Gitlab

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

4
.row.prepend-top-default
5
  %aside.col-md-3
Jacob Vosmaer committed
6
    .panel.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
          .checkbox
            = label_tag :with_archived do
              = check_box_tag :with_archived, 1, params[:with_archived]
              %span Show archived projects
30

31 32 33 34 35 36 37 38 39 40
        %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
Jacob Vosmaer committed
41 42 43
        %fieldset
          %strong Problems
          .checkbox
44 45 46
            = label_tag :last_repository_check_failed do
              = check_box_tag :last_repository_check_failed, 1, params[:last_repository_check_failed]
              %span Last repository check failed
Jacob Vosmaer committed
47

48
        = hidden_field_tag :sort, params[:sort]
49
        = button_tag "Search", class: "btn submit btn-primary"
Vinnie Okada committed
50
        = link_to "Reset", admin_namespaces_projects_path, class: "btn btn-cancel"
51

52
  %section.col-md-9
53
    .panel.panel-default
54
      .panel-heading
55
        Projects (#{@projects.total_count})
56
        .controls
57
          .dropdown.inline
58
            %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'}
59
              %span.light
60
              - if @sort.present?
61
                = sort_options_hash[@sort]
62
              - else
63
                = sort_title_recently_created
64 65 66
              %b.caret
            %ul.dropdown-menu
              %li
Vinnie Okada committed
67
                = link_to admin_namespaces_projects_path(sort: sort_value_recently_created) do
68
                  = sort_title_recently_created
Vinnie Okada committed
69
                = link_to admin_namespaces_projects_path(sort: sort_value_oldest_created) do
70
                  = sort_title_oldest_created
Vinnie Okada committed
71
                = link_to admin_namespaces_projects_path(sort: sort_value_recently_updated) do
72
                  = sort_title_recently_updated
Vinnie Okada committed
73
                = link_to admin_namespaces_projects_path(sort: sort_value_oldest_updated) do
74
                  = sort_title_oldest_updated
Vinnie Okada committed
75
                = link_to admin_namespaces_projects_path(sort: sort_value_largest_repo) do
76
                  = sort_title_largest_repo
77
          = link_to 'New Project', new_project_path, class: "btn btn-sm btn-success"
78 79 80
      %ul.well-list
        - @projects.each do |project|
          %li
81 82 83
            .list-item-name
              %span{ class: visibility_level_color(project.visibility_level) }
                = visibility_level_icon(project.visibility_level)
Vinnie Okada committed
84
              = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
85
            .pull-right
86 87
              - if project.archived
                %span.label.label-warning archived
88 89
              %span.label.label-gray
                = repository_size(project)
Dmitriy Zaporozhets committed
90 91
              = 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"
92
        - if @projects.blank?
Dmitriy Zaporozhets committed
93
          .nothing-here-block 0 projects matches
94
    = paginate @projects, theme: "gitlab"