BigW Consortium Gitlab

index.html.haml 3.33 KB
Newer Older
1
.row
2
  .col-md-3
3
    .admin-filter
4
      = form_tag admin_projects_path, method: :get, class: '' do
5
        .form-group
6 7
          = label_tag :name, 'Name:'
          = text_field_tag :name, params[:name], class: "form-control"
8

9
        .form-group
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
          = label_tag :namespace_id, "Namespace"
          = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'

        .form-group
          %strong Activity
          .checkbox
            = label_tag :with_push, 'Not empty'
            = check_box_tag :with_push, 1, params[:with_push]
             
            %span.light Projects with push events
          .checkbox
            = label_tag :abandoned, 'Abandoned'
            = check_box_tag :abandoned, 1, params[:abandoned]
             
            %span.light No activity over 6 month
25

26 27 28 29 30 31 32 33 34 35
        %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
36 37 38 39
        %hr
        = hidden_field_tag :sort, params[:sort]
        = submit_tag "Search", class: "btn submit btn-primary"
        = link_to "Reset", admin_projects_path, class: "btn btn-cancel"
40

41
  .col-md-9
42
    .panel.panel-default
43
      .panel-heading
44
        Projects (#{@projects.total_count})
45
        .panel-head-actions
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
          .dropdown.inline
            %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
              %span.light sort:
              - if @sort.present?
                = @sort.humanize
              - else
                Name
              %b.caret
            %ul.dropdown-menu
              %li
                = link_to admin_projects_path(sort: nil) do
                  Name
                = link_to admin_projects_path(sort: 'newest') do
                  Newest
                = link_to admin_projects_path(sort: 'oldest') do
                  Oldest
                = link_to admin_projects_path(sort: 'recently_updated') do
                  Recently updated
                = link_to admin_projects_path(sort: 'last_updated') do
                  Last updated
                = link_to admin_projects_path(sort: 'largest_repository') do
                  Largest repository
68
          = link_to 'New Project', new_project_path, class: "btn btn-new"
69 70 71
      %ul.well-list
        - @projects.each do |project|
          %li
72 73 74 75
            .list-item-name
              %span{ class: visibility_level_color(project.visibility_level) }
                = visibility_level_icon(project.visibility_level)
              = link_to project.name_with_namespace, [:admin, project]
76
            .pull-right
77 78
              %span.label.label-gray
                = repository_size(project)
79
              = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
80
              = link_to 'Destroy', [project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-small btn-remove"
81
        - if @projects.blank?
Dmitriy Zaporozhets committed
82
          .nothing-here-block 0 projects matches
83
    = paginate @projects, theme: "gitlab"