debian-mirror-gitlab/app/views/shared/projects/_list.html.haml

31 lines
1.4 KiB
Text
Raw Normal View History

2015-09-25 12:07:36 +05:30
- projects_limit = 20 unless local_assigns[:projects_limit]
- avatar = true unless local_assigns[:avatar] == false
2016-04-02 18:10:28 +05:30
- use_creator_avatar = false unless local_assigns[:use_creator_avatar] == true
2015-09-25 12:07:36 +05:30
- stars = true unless local_assigns[:stars] == false
2016-04-02 18:10:28 +05:30
- forks = false unless local_assigns[:forks] == true
2015-10-24 18:46:33 +05:30
- ci = false unless local_assigns[:ci] == true
- skip_namespace = false unless local_assigns[:skip_namespace] == true
2016-04-02 18:10:28 +05:30
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true
2015-09-25 12:07:36 +05:30
%ul.projects-list
2016-04-02 18:10:28 +05:30
- if projects.any?
- 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
2015-09-25 12:07:36 +05:30
2016-04-02 18:10:28 +05:30
- if projects.size > projects_limit && projects.kind_of?(Array)
%li.bottom.center
.light
#{projects_limit} of #{pluralize(projects.count, 'project')} displayed.
= link_to '#', class: 'js-expand' do
Show all
= paginate projects, theme: "gitlab" if projects.respond_to? :total_pages
- else
.nothing-here-block No projects found
2015-09-25 12:07:36 +05:30
2015-11-26 14:37:03 +05:30
:javascript
new ProjectsList();
2016-04-02 18:10:28 +05:30
Dashboard.init();