summaryrefslogtreecommitdiff
path: root/app/views/admin/projects/index.html.haml
blob: f947e1749908f421463394d7fa00a0ce7aeb8306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- page_title _('Projects')
- params[:visibility_level] ||= []

.top-area.scrolling-tabs-container.inner-page-scroll-tabs
  = gl_tabs_nav({ class: 'gl-border-b-0 gl-overflow-x-auto gl-flex-grow-1 gl-flex-nowrap gl-webkit-scrollbar-display-none' }) do
    = gl_tab_link_to _('All'), admin_projects_path(visibility_level: nil), { item_active: params[:visibility_level].empty? }
    = gl_tab_link_to _('Private'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
    = gl_tab_link_to _('Internal'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
    = gl_tab_link_to _('Public'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC)

  .nav-controls
    .search-holder
      = render 'shared/projects/search_form', autofocus: true, admin_view: true
      - current_namespace = _('Namespace')
      - if params[:namespace_id].present?
        - namespace = Namespace.find(params[:namespace_id])
        - current_namespace = "#{namespace.kind}: #{namespace.full_path}"
      %button.dropdown-menu-toggle.btn.btn-default.btn-md.gl-button.js-namespace-select{ data: { show_any: 'true', field_name: 'namespace_id', placeholder: current_namespace, update_location: 'true' }, type: 'button' }
        %span.gl-new-dropdown-button-text
          = current_namespace

      = render 'shared/projects/dropdown'
      = link_to new_project_path, class: 'gl-button btn btn-confirm' do
        = _('New Project')
      = button_tag _("Search"), class: "gl-button btn btn-confirm btn-search hide"

= render 'projects'