Simplified browsing view

This commit is contained in:
Christoph Haas 2021-02-14 11:14:13 +01:00
parent fce8fe2dce
commit c636ee40a5
6 changed files with 56 additions and 71 deletions

View file

@ -5,10 +5,14 @@ class PackagesController < ApplicationController
def list
@packages = query_packages.paginate(page: params[:page], per_page: 6)
@view_style = :list
render :browse
end
def grid
@packages = query_packages.paginate(page: params[:page], per_page: 24)
@view_style = :grid
render :browse
end
def details
@ -185,7 +189,6 @@ class PackagesController < ApplicationController
end
# Return a 404 if the package has no screenshots or the image was not found
thumbnail_path = @screenshot.image.path(:large)
unless @screenshot
thumbnail404
return