BigW Consortium Gitlab

_list.html.haml 813 Bytes
Newer Older
1 2 3
- projects_limit = 20 unless local_assigns[:projects_limit]
- avatar = true unless local_assigns[:avatar] == false
- stars = true unless local_assigns[:stars] == false
4
- ci = false unless local_assigns[:ci] == true
5
- skip_namespace = false unless local_assigns[:skip_namespace] == true
6 7 8 9

%ul.projects-list
  - projects.each_with_index do |project, i|
    - css_class = (i >= projects_limit) ? 'hide' : nil
10
    = render "shared/projects/project", project: project, skip_namespace: skip_namespace,
11
      avatar: avatar, stars: stars, css_class: css_class, ci: ci
12

13
  - if projects.size > projects_limit
14 15 16 17 18 19
    %li.bottom.center
      .light
        #{projects_limit} of #{pluralize(projects.count, 'project')} displayed.
        = link_to '#', class: 'js-expand' do
          Show all

20 21
:javascript
  new ProjectsList();