BigW Consortium Gitlab

index.html.haml 2 KB
Newer Older
1
- @no_container = true
2
- page_title "Projects"
3 4
- params[:visibility_level] ||= []

5
= render "admin/dashboard/head"
6

7
%div{ class: container_class }
8 9
  .top-area
    .prepend-top-default
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
      .search-holder
        = render 'shared/projects/search_form', autofocus: true, icon: true
        .dropdown
          - toggle_text = 'Namespace'
          - if params[:namespace_id].present?
            = hidden_field_tag :namespace_id, params[:namespace_id]
            - namespace = Namespace.find(params[:namespace_id])
            - toggle_text = "#{namespace.kind}: #{namespace.full_path}"
          = dropdown_toggle(toggle_text, { toggle: 'dropdown' }, { toggle_class: 'js-namespace-select large' })
          .dropdown-menu.dropdown-select.dropdown-menu-align-right
            = dropdown_title('Namespaces')
            = dropdown_filter("Search for Namespace")
            = dropdown_content
            = dropdown_loading
        = render 'shared/projects/dropdown'
        = link_to new_project_path, class: 'btn btn-new' do
          New Project
        = button_tag "Search", class: "btn btn-primary btn-search hide"
28 29

    %ul.nav-links
30
      - opts = params[:visibility_level].present? ? {} : { page: admin_projects_path }
31
      = nav_link(opts) do
32
        = link_to admin_projects_path do
33
          All
34

Semyon Pupkov committed
35
      = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s) }) do
36
        = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) do
37
          Private
Semyon Pupkov committed
38
      = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s) }) do
39
        = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) do
40
          Internal
Semyon Pupkov committed
41
      = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s) }) do
42
        = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) do
43
          Public
44

45
  = render 'projects'