diff options
author | Fatih Acet <acetfatih@gmail.com> | 2019-09-03 09:03:35 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-09-03 09:03:35 +0000 |
commit | 3741402a241df2ad6ab28e4b76edafe5083ce733 (patch) | |
tree | 90c67bb90414724df6559cf1d2e6f22d4b3aa035 /app/views/admin/projects | |
parent | af5f2424cace62f8712dbabfd60bb0f1c36f1590 (diff) | |
download | gitlab-ce-3741402a241df2ad6ab28e4b76edafe5083ce733.tar.gz |
Make flash notifications sticky
This commit also unifies layout structure
and remove no_container flag
Diffstat (limited to 'app/views/admin/projects')
-rw-r--r-- | app/views/admin/projects/index.html.haml | 73 |
1 files changed, 35 insertions, 38 deletions
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index b88b760536d..7e03eb4f075 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -1,44 +1,41 @@ -- @no_container = true - page_title "Projects" - params[:visibility_level] ||= [] +.top-area.scrolling-tabs-container.inner-page-scroll-tabs + .prepend-top-default + .search-holder + = render 'shared/projects/search_form', autofocus: true, icon: true, admin_view: 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', is_filter: 'true' }, { toggle_class: 'js-namespace-select large' }) + .dropdown-menu.dropdown-select.dropdown-menu-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-success' do + New Project + = button_tag "Search", class: "btn btn-primary btn-search hide" -%div{ class: container_class } - .top-area.scrolling-tabs-container.inner-page-scroll-tabs - .prepend-top-default - .search-holder - = render 'shared/projects/search_form', autofocus: true, icon: true, admin_view: 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', is_filter: 'true' }, { toggle_class: 'js-namespace-select large' }) - .dropdown-menu.dropdown-select.dropdown-menu-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-success' do - New Project - = button_tag "Search", class: "btn btn-primary btn-search hide" + %ul.nav-links.nav.nav-tabs + - opts = params[:visibility_level].present? ? {} : { page: admin_projects_path } + = nav_link(opts) do + = link_to admin_projects_path do + All - %ul.nav-links.nav.nav-tabs - - opts = params[:visibility_level].present? ? {} : { page: admin_projects_path } - = nav_link(opts) do - = link_to admin_projects_path do - All + = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s) }) do + = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) do + Private + = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s) }) do + = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) do + Internal + = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s) }) do + = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) do + Public - = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s) }) do - = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) do - Private - = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s) }) do - = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) do - Internal - = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s) }) do - = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) do - Public - - = render 'projects' += render 'projects' |