5bb6a85b90
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>
27 lines
1.5 KiB
Text
27 lines
1.5 KiB
Text
- projects_limit = 20 unless local_assigns[:projects_limit]
|
|
- avatar = true unless local_assigns[:avatar] == false
|
|
- use_creator_avatar = false unless local_assigns[:use_creator_avatar] == true
|
|
- stars = true unless local_assigns[:stars] == false
|
|
- forks = false unless local_assigns[:forks] == true
|
|
- ci = false unless local_assigns[:ci] == true
|
|
- skip_namespace = false unless local_assigns[:skip_namespace] == true
|
|
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true
|
|
- remote = false unless local_assigns[:remote] == true
|
|
|
|
.js-projects-list-holder
|
|
- if projects.any?
|
|
%ul.projects-list.content-list
|
|
- projects.each_with_index do |project, i|
|
|
- css_class = (i >= projects_limit) ? 'hide' : nil
|
|
= render "shared/projects/project", project: project, skip_namespace: skip_namespace,
|
|
avatar: avatar, stars: stars, css_class: css_class, ci: ci, use_creator_avatar: use_creator_avatar,
|
|
forks: forks, show_last_commit_as_description: show_last_commit_as_description
|
|
|
|
- if @private_forks_count && @private_forks_count > 0
|
|
%li.project-row.private-forks-notice
|
|
= icon('lock fw', base: 'circle', class: 'fa-lg private-fork-icon')
|
|
%strong= pluralize(@private_forks_count, 'private fork')
|
|
%span you have no access to.
|
|
= paginate(projects, remote: remote, theme: "gitlab") if projects.respond_to? :total_pages
|
|
- else
|
|
.nothing-here-block No projects found
|