One partial view eliminated

This commit is contained in:
Christoph Haas 2021-02-14 15:33:22 +01:00
parent a46a44ac39
commit 1f7ba785a1
2 changed files with 10 additions and 9 deletions

View file

@ -1,7 +0,0 @@
a.black href=package_path(name: pkg.name)
.image
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '')
.text.pkgname
= pkg.name
.text
= pkg.description

View file

@ -16,12 +16,20 @@
.grid-x.grid-margin-x.small-up-1.medium-up-2.large-up-3 data-equalizer=true data-equalize-on="medium"
- @packages.all.each do |pkg|
.cell.pkgcard data-equalizer-watch=true
= render partial: 'packages/grid_small_image', locals: { pkg: pkg }
a.black href=package_path(name: pkg.name)
.image
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '')
.text.pkgname
= pkg.name
.text
= pkg.description
- elsif @view_style==:list
- @packages.to_a.each do |pkg|
.grid-x.listview
.small-12.medium-4.cell.pkgcard
= render partial: 'packages/grid_small_image', locals: { pkg: pkg }
a.black href=package_path(name: pkg.name)
.image
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '')
.small-12.medium-8.cell
h1
a href=package_path(name: pkg.name)