summaryrefslogtreecommitdiff
path: root/app/views/admin/projects/_projects.html.haml
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-03-03 12:13:03 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-03-03 18:39:30 +0200
commit5bb6a85b902c6096970d6c82bb63cae7985e55e8 (patch)
tree4621bdcade58234a3c97d6198ff7adde776a4d45 /app/views/admin/projects/_projects.html.haml
parent8fd5aeee7fee7506c44674d61f794ff8685b90e6 (diff)
downloadgitlab-ce-5bb6a85b902c6096970d6c82bb63cae7985e55e8.tar.gz
Refactor projects filtering by name
Reuse same search form and behavior for dashboard#projects, group#projects and admin#projects. Repsect all other options like sorting, personal filter when search projects by name. Create FilterableList JS class to handle identical behaviour of projects and groups lists. This change also makes filtering and sorting availabe on explore#projects and explore#groups no matter if you are logged in or not. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/admin/projects/_projects.html.haml')
-rw-r--r--app/views/admin/projects/_projects.html.haml32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml
new file mode 100644
index 00000000000..c1a9f8d6ddd
--- /dev/null
+++ b/app/views/admin/projects/_projects.html.haml
@@ -0,0 +1,32 @@
+.js-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.badge
+ = storage_counter(project.statistics.storage_size)
+ = 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
+ .avatar-container.s40
+ = 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
+
+ - if project.description.present?
+ .description
+ = markdown_field(project, :description)
+
+ = paginate @projects, theme: 'gitlab'
+ - else
+ .nothing-here-block No projects found