7455d950bc
1. Fix double bottom border if pagination 2. Fix broken search on forks page 4. Remove duplicate js logic 4. Remove unused show all link 5. Remove duplicate “no project” message in different views After this merge request you can easily render shared projects template with all necessary html/js included to make searchable list with pagination. All you need to provide is controller that returns projects list with seach nad pagination and render html form with project-filter-form id and text field with filter_projects name. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
24 lines
1.2 KiB
Text
24 lines
1.2 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
|
|
|
|
.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
|
|
= paginate(projects, remote: remote, theme: "gitlab") if projects.respond_to? :total_pages
|
|
- else
|
|
.nothing-here-block No projects found
|
|
|
|
:javascript
|
|
ProjectsList.init();
|