2016-06-14 16:37:02 -04:00
|
|
|
- @no_container = true
|
2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Projects"
|
2016-05-26 18:55:49 -04:00
|
|
|
- params[:visibility_level] ||= []
|
|
|
|
|
2016-06-14 16:37:02 -04:00
|
|
|
= render "admin/dashboard/head"
|
2015-04-26 18:43:02 -04:00
|
|
|
|
2016-06-30 09:01:26 -04:00
|
|
|
%div{ class: container_class }
|
2016-05-26 18:55:49 -04:00
|
|
|
.top-area
|
|
|
|
.prepend-top-default
|
2016-12-08 13:59:41 -05:00
|
|
|
= form_tag admin_projects_path, method: :get do |f|
|
2016-05-26 18:55:49 -04:00
|
|
|
.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
|
2016-12-08 13:59:41 -05:00
|
|
|
- opts = params[:visibility_level].present? ? {} : { page: admin_projects_path }
|
2016-05-26 18:55:49 -04:00
|
|
|
= nav_link(opts) do
|
2016-12-08 13:59:41 -05:00
|
|
|
= link_to admin_projects_path do
|
2016-05-26 18:55:49 -04:00
|
|
|
All
|
2013-01-13 10:24:29 -05:00
|
|
|
|
2016-05-26 18:55:49 -04:00
|
|
|
= nav_link(html_options: { class: params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s ? 'active' : '' }) do
|
2016-12-08 13:59:41 -05:00
|
|
|
= link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) do
|
2016-05-26 18:55:49 -04:00
|
|
|
Private
|
|
|
|
= nav_link(html_options: { class: params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s ? 'active' : '' }) do
|
2016-12-08 13:59:41 -05:00
|
|
|
= link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) do
|
2016-05-26 18:55:49 -04:00
|
|
|
Internal
|
|
|
|
= nav_link(html_options: { class: params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s ? 'active' : '' }) do
|
2016-12-08 13:59:41 -05:00
|
|
|
= link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) do
|
2016-05-26 18:55:49 -04:00
|
|
|
Public
|
2014-06-03 07:19:11 -04:00
|
|
|
|
2016-05-26 18:55:49 -04:00
|
|
|
.nav-controls
|
|
|
|
= render 'shared/projects/dropdown'
|
|
|
|
= link_to new_project_path, class: 'btn btn-new' do
|
|
|
|
New Project
|
2013-01-13 10:24:29 -05:00
|
|
|
|
2016-05-26 18:55:49 -04:00
|
|
|
.projects-list-holder
|
|
|
|
- if @projects.any?
|
|
|
|
%ul.projects-list.content-list
|
|
|
|
- @projects.each_with_index do |project|
|
|
|
|
%li.project-row
|
2016-07-11 13:58:32 -04:00
|
|
|
.controls
|
2016-05-26 18:55:49 -04:00
|
|
|
- if project.archived
|
|
|
|
%span.label.label-warning archived
|
2016-11-22 11:58:10 -05:00
|
|
|
%span.badge
|
|
|
|
= storage_counter(project.statistics.storage_size)
|
2016-05-26 18:55:49 -04:00
|
|
|
= 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
|
2016-11-03 10:26:22 -04:00
|
|
|
.avatar-container.s40
|
2016-10-31 15:14:05 -04:00
|
|
|
= project_icon(project, alt: '', class: 'avatar project-avatar s40')
|
2016-05-26 18:55:49 -04:00
|
|
|
%span.project-full-name
|
|
|
|
%span.namespace-name
|
|
|
|
- if project.namespace
|
|
|
|
= project.namespace.human_name
|
|
|
|
\/
|
|
|
|
%span.project-name.filter-title
|
|
|
|
= project.name
|
2016-04-04 11:23:43 -04:00
|
|
|
|
2016-05-26 18:55:49 -04:00
|
|
|
- if project.description.present?
|
|
|
|
.description
|
2016-10-06 18:01:42 -04:00
|
|
|
= markdown_field(project, :description)
|
2014-01-03 16:46:32 -05:00
|
|
|
|
2016-05-26 18:55:49 -04:00
|
|
|
= paginate @projects, theme: 'gitlab'
|
|
|
|
- else
|
|
|
|
.nothing-here-block No projects found
|