debian-mirror-gitlab/app/views/admin/projects/index.html.haml

95 lines
4.1 KiB
Text
Raw Normal View History

- @no_container = true
2015-09-11 14:41:01 +05:30
- page_title "Projects"
2016-08-24 12:49:21 +05:30
- params[:visibility_level] ||= []
= render "admin/dashboard/head"
2015-09-11 14:41:01 +05:30
2016-08-24 12:49:21 +05:30
%div{ class: container_class }
.top-area
.prepend-top-default
= form_tag admin_namespaces_projects_path, method: :get do |f|
.search-holder
.search-field-holder
= search_field_tag :name, params[:name], class: "form-control search-text-input js-search-input", id: "dashboard_search", autofocus: true, spellcheck: false, placeholder: 'Search by name'
- if params[:visibility_level].present?
= hidden_field_tag 'visibility_level', params[:visibility_level]
- if params[:sort].present?
= hidden_field_tag 'sort', params[:sort]
- if params[:personal].present?
= hidden_field_tag 'visibility_level', 'true'
- if params[:archived].present?
= hidden_field_tag 'archived', 'true'
= icon("search", class: "search-icon")
.dropdown
- toggle_text = 'Search for Namespace'
- if params[:namespace_id].present?
- namespace = Namespace.find(params[:namespace_id])
- toggle_text = "#{namespace.kind}: #{namespace.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
= button_tag "Search", class: "btn btn-primary btn-search"
%ul.nav-links
- opts = params[:visibility_level].present? ? {} : { page: admin_namespaces_projects_path }
= nav_link(opts) do
= link_to admin_namespaces_projects_path do
All
2014-09-02 18:07:02 +05:30
2016-08-24 12:49:21 +05:30
= nav_link(html_options: { class: params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s ? 'active' : '' }) do
= link_to admin_namespaces_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) do
Private
= nav_link(html_options: { class: params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s ? 'active' : '' }) do
= link_to admin_namespaces_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) do
Internal
= nav_link(html_options: { class: params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s ? 'active' : '' }) do
= link_to admin_namespaces_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) do
Public
2014-09-02 18:07:02 +05:30
2016-08-24 12:49:21 +05:30
.nav-controls
= render 'shared/projects/dropdown'
= link_to new_project_path, class: 'btn btn-new' do
New Project
2014-09-02 18:07:02 +05:30
2016-08-24 12:49:21 +05:30
.projects-list-holder
- if @projects.any?
%ul.projects-list.content-list
- @projects.each_with_index do |project|
%li.project-row
.controls
- if project.archived
%span.label.label-warning archived
%span.label.label-gray
= repository_size(project)
= link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn"
= link_to 'Delete', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-remove"
.title
= link_to [:admin, project.namespace.becomes(Namespace), project] do
.dash-project-avatar
= project_icon(project, alt: '', class: 'avatar project-avatar s40')
%span.project-full-name
%span.namespace-name
- if project.namespace
= project.namespace.human_name
\/
%span.project-name.filter-title
= project.name
2016-06-02 11:05:42 +05:30
2016-08-24 12:49:21 +05:30
- if project.description.present?
.description
= markdown(project.description, pipeline: :description)
2014-09-02 18:07:02 +05:30
2016-08-24 12:49:21 +05:30
= paginate @projects, theme: 'gitlab'
- else
.nothing-here-block No projects found